mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01: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:
committed by
Schuyler Cebulskie
parent
8f0e2e0c56
commit
50a1d1cbef
File diff suppressed because one or more lines are too long
@@ -45,6 +45,22 @@ class VoiceChannel extends GuildChannel {
|
||||
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
|
||||
* @param {number} bitrate The new bitrate
|
||||
|
||||
Reference in New Issue
Block a user