Initial commit
This commit is contained in:
46
src/structures/VoiceRegion.js
Normal file
46
src/structures/VoiceRegion.js
Normal file
@@ -0,0 +1,46 @@
|
||||
'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 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;
|
||||
Reference in New Issue
Block a user