summaryrefslogtreecommitdiff
path: root/node_modules/discord.js/src/structures/ChannelSelectMenuBuilder.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/discord.js/src/structures/ChannelSelectMenuBuilder.js')
-rw-r--r--node_modules/discord.js/src/structures/ChannelSelectMenuBuilder.js31
1 files changed, 31 insertions, 0 deletions
diff --git a/node_modules/discord.js/src/structures/ChannelSelectMenuBuilder.js b/node_modules/discord.js/src/structures/ChannelSelectMenuBuilder.js
new file mode 100644
index 0000000..6d99474
--- /dev/null
+++ b/node_modules/discord.js/src/structures/ChannelSelectMenuBuilder.js
@@ -0,0 +1,31 @@
+'use strict';
+
+const { ChannelSelectMenuBuilder: BuildersChannelSelectMenu } = require('@discordjs/builders');
+const { isJSONEncodable } = require('@discordjs/util');
+const { toSnakeCase } = require('../util/Transformers');
+
+/**
+ * Class used to build select menu components to be sent through the API
+ * @extends {BuildersChannelSelectMenu}
+ */
+class ChannelSelectMenuBuilder extends BuildersChannelSelectMenu {
+ constructor(data = {}) {
+ super(toSnakeCase(data));
+ }
+
+ /**
+ * Creates a new select menu builder from JSON data
+ * @param {ChannelSelectMenuBuilder|ChannelSelectMenuComponent|APIChannelSelectComponent} other The other data
+ * @returns {ChannelSelectMenuBuilder}
+ */
+ static from(other) {
+ return new this(isJSONEncodable(other) ? other.toJSON() : other);
+ }
+}
+
+module.exports = ChannelSelectMenuBuilder;
+
+/**
+ * @external BuildersChannelSelectMenu
+ * @see {@link https://discord.js.org/docs/packages/builders/stable/ChannelSelectMenuBuilder:Class}
+ */