mirror of
https://github.com/danbulant/discord.js
synced 2026-06-09 17:52:55 +00:00
Simplify voice channel joining
This commit is contained in:
parent
c4da8d1009
commit
5dd76069f8
1 changed files with 1 additions and 1 deletions
|
|
@ -80,7 +80,7 @@ class ClientVoiceManager {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
if (this.pending.get(channel.guild.id)) throw new Error('Already connecting to this guild\'s voice server.');
|
if (this.pending.get(channel.guild.id)) throw new Error('Already connecting to this guild\'s voice server.');
|
||||||
|
|
||||||
if (!channel.permissionsFor(this.client.user).hasPermission('CONNECT')) {
|
if (!channel.joinable) {
|
||||||
throw new Error('You do not have permission to join this voice channel');
|
throw new Error('You do not have permission to join this voice channel');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue