mirror of
https://github.com/danbulant/discord.js
synced 2026-05-27 22:11:53 +00:00
feat(VoiceChannel): add editable (#3173)
* add VoiceChannel#editable * replace unnecessary super with this Co-Authored-By: izexi <43889168+izexi@users.noreply.github.com>
This commit is contained in:
parent
23191da13d
commit
870528ed33
2 changed files with 10 additions and 0 deletions
|
|
@ -71,6 +71,15 @@ class VoiceChannel extends GuildChannel {
|
|||
return super.deletable && this.permissionsFor(this.client.user).has(Permissions.FLAGS.CONNECT, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the channel is editable by the client user
|
||||
* @type {boolean}
|
||||
* @readonly
|
||||
*/
|
||||
get editable() {
|
||||
return this.manageable && this.permissionsFor(this.client.user).has(Permissions.FLAGS.CONNECT, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the channel is joinable by the client user
|
||||
* @type {boolean}
|
||||
|
|
|
|||
1
typings/index.d.ts
vendored
1
typings/index.d.ts
vendored
|
|
@ -1148,6 +1148,7 @@ declare module 'discord.js' {
|
|||
constructor(guild: Guild, data?: object);
|
||||
public bitrate: number;
|
||||
public readonly connection: VoiceConnection;
|
||||
public readonly editable: boolean;
|
||||
public readonly full: boolean;
|
||||
public readonly joinable: boolean;
|
||||
public readonly members: Collection<Snowflake, GuildMember>;
|
||||
|
|
|
|||
Loading…
Reference in a new issue