Files
discord.js/src/structures/VoiceRegion.js
Jiralite b9802f4b6f refactor: deprecate v13 properties and methods (#7782)
* refactor: deprecate splitting

* refactor: deprecate `IntegrationApplication#summary`

https://github.com/discordjs/discord.js/pull/7729

* docs: amend store channel wording

* refactor: deprecate fetching of application assets

* docs: deprecate vip field in voice regions
2022-04-17 10:52:50 +02:00

54 lines
923 B
JavaScript

'use strict';
const Util = require('../util/Util');
/**
* Represents a Discord voice region for guilds.
*/
class VoiceRegion {
constructor(data) {
/**
* The region's id
* @type {string}
*/
this.id = data.id;
/**
* Name of the region
* @type {string}
*/
this.name = data.name;
/**
* Whether the region is VIP-only
* @type {boolean}
* @deprecated This property is no longer being sent by the API.
*/
this.vip = data.vip;
/**
* Whether the region is deprecated
* @type {boolean}
*/
this.deprecated = data.deprecated;
/**
* Whether the region is optimal
* @type {boolean}
*/
this.optimal = data.optimal;
/**
* Whether the region is custom
* @type {boolean}
*/
this.custom = data.custom;
}
toJSON() {
return Util.flatten(this);
}
}
module.exports = VoiceRegion;