mirror of
https://github.com/danbulant/discord.js
synced 2026-06-20 07:02:00 +00:00
Webpack build for branch master: d10ca8e7ba
This commit is contained in:
parent
70b06c1d6d
commit
b57962a0b0
2 changed files with 15 additions and 5 deletions
|
|
@ -10724,13 +10724,23 @@ class VoiceChannel extends GuildChannel {
|
|||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the voice channel is full
|
||||
* @type {boolean}
|
||||
*/
|
||||
get full() {
|
||||
return this.members.size >= this.userLimit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the client has permission join the voice channel
|
||||
* @type {boolean}
|
||||
*/
|
||||
get joinable() {
|
||||
if (this.client.browser) return false;
|
||||
return this.permissionsFor(this.client.user).hasPermission('CONNECT');
|
||||
if (!this.permissionsFor(this.client.user).hasPermission('CONNECT')) return false;
|
||||
if (this.full && !this.permissionsFor(this.client.user).hasPermission('MOVE_MEMBERS')) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
8
discord.master.min.js
vendored
8
discord.master.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue