fix(xxxable): follow more properly with discord behavior (#6551)

Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
This commit is contained in:
tig
2021-09-23 20:41:18 +09:00
committed by GitHub
parent 603350645d
commit 5d87398f9f
3 changed files with 29 additions and 28 deletions

View File

@@ -8,15 +8,6 @@ const Permissions = require('../util/Permissions');
* @extends {BaseGuildVoiceChannel}
*/
class VoiceChannel extends BaseGuildVoiceChannel {
/**
* Whether the channel is deletable by the client user
* @type {boolean}
* @readonly
*/
get deletable() {
return super.deletable && this.permissionsFor(this.client.user).has(Permissions.FLAGS.CONNECT, false);
}
/**
* Whether the channel is editable by the client user
* @type {boolean}
@@ -24,7 +15,7 @@ class VoiceChannel extends BaseGuildVoiceChannel {
* @deprecated Use {@link VoiceChannel#manageable} instead
*/
get editable() {
return this.manageable && this.permissionsFor(this.client.user).has(Permissions.FLAGS.CONNECT, false);
return this.manageable;
}
/**