Skip to content

Commit

Permalink
refactor: Remove VoiceChannel#editable (#7291)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jiralite authored Jan 19, 2022
1 parent 347ff80 commit 164589c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 24 deletions.
22 changes: 0 additions & 22 deletions packages/discord.js/src/structures/VoiceChannel.js
Original file line number Diff line number Diff line change
@@ -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}
Expand Down
2 changes: 0 additions & 2 deletions packages/discord.js/typings/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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>;
Expand Down

0 comments on commit 164589c

Please sign in to comment.