mirror of
https://github.com/danbulant/discord.js
synced 2026-06-09 17:52:55 +00:00
Add VoiceChannel.joinable/speakable (#802)
* add some getters to voice channels * Update VoiceChannel.js * Update VoiceChannel.js * Update VoiceChannel.js
This commit is contained in:
parent
8f0e2e0c56
commit
50a1d1cbef
2 changed files with 17 additions and 1 deletions
File diff suppressed because one or more lines are too long
|
|
@ -45,6 +45,22 @@ class VoiceChannel extends GuildChannel {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if the client has permission join the voice channel
|
||||||
|
* @type {boolean}
|
||||||
|
*/
|
||||||
|
get joinable() {
|
||||||
|
return this.permissionsFor(this.client.user).hasPermission('CONNECT');
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if the client has permission to send audio to the voice channel
|
||||||
|
* @type {boolean}
|
||||||
|
*/
|
||||||
|
get speakable() {
|
||||||
|
return this.permissionsFor(this.client.user).hasPermission('SPEAK');
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the bitrate of the channel
|
* Sets the bitrate of the channel
|
||||||
* @param {number} bitrate The new bitrate
|
* @param {number} bitrate The new bitrate
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue