summaryrefslogtreecommitdiff
path: root/node_modules/discord.js/src/structures/VoiceRegion.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/discord.js/src/structures/VoiceRegion.js')
-rw-r--r--node_modules/discord.js/src/structures/VoiceRegion.js46
1 files changed, 46 insertions, 0 deletions
diff --git a/node_modules/discord.js/src/structures/VoiceRegion.js b/node_modules/discord.js/src/structures/VoiceRegion.js
new file mode 100644
index 0000000..1f5652a
--- /dev/null
+++ b/node_modules/discord.js/src/structures/VoiceRegion.js
@@ -0,0 +1,46 @@
+'use strict';
+
+const { flatten } = 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 flatten(this);
+ }
+}
+
+module.exports = VoiceRegion;