refactor: Remove VoiceChannel#editable (#7291)

This commit is contained in:
Jiralite
2022-01-19 06:14:33 +00:00
committed by GitHub
parent 347ff80bbc
commit 164589c551
2 changed files with 0 additions and 24 deletions

View File

@@ -1,35 +1,13 @@
'use strict';
const process = require('node:process');
const BaseGuildVoiceChannel = require('./BaseGuildVoiceChannel');
const Permissions = require('../util/Permissions');
let deprecationEmittedForEditable = false;
/**
* Represents a guild voice channel on Discord.
* @extends {BaseGuildVoiceChannel}
*/
class VoiceChannel extends BaseGuildVoiceChannel {
/**
* Whether the channel is editable by the client user
* @type {boolean}
* @readonly
* @deprecated Use {@link VoiceChannel#manageable} instead
*/
get editable() {
if (!deprecationEmittedForEditable) {
process.emitWarning(
'The VoiceChannel#editable getter is deprecated. Use VoiceChannel#manageable instead.',
'DeprecationWarning',
);
deprecationEmittedForEditable = true;
}
return this.manageable;
}
/**
* Whether the channel is joinable by the client user
* @type {boolean}

View File

@@ -2398,8 +2398,6 @@ export class Formatters extends null {
}
export class VoiceChannel extends BaseGuildVoiceChannel {
/** @deprecated Use manageable instead */
public readonly editable: boolean;
public readonly speakable: boolean;
public type: 'GuildVoice';
public setBitrate(bitrate: number, reason?: string): Promise<VoiceChannel>;