mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 11:33:30 +01: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:
@@ -71,6 +71,15 @@ class VoiceChannel extends GuildChannel {
|
|||||||
return super.deletable && this.permissionsFor(this.client.user).has(Permissions.FLAGS.CONNECT, false);
|
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
|
* Whether the channel is joinable by the client user
|
||||||
* @type {boolean}
|
* @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);
|
constructor(guild: Guild, data?: object);
|
||||||
public bitrate: number;
|
public bitrate: number;
|
||||||
public readonly connection: VoiceConnection;
|
public readonly connection: VoiceConnection;
|
||||||
|
public readonly editable: boolean;
|
||||||
public readonly full: boolean;
|
public readonly full: boolean;
|
||||||
public readonly joinable: boolean;
|
public readonly joinable: boolean;
|
||||||
public readonly members: Collection<Snowflake, GuildMember>;
|
public readonly members: Collection<Snowflake, GuildMember>;
|
||||||
|
|||||||
Reference in New Issue
Block a user