diff --git a/.gitignore b/.gitignore
index cc0d461..45c1f4c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,6 @@
-# IGNORED FILES
+# IGNORED FOLDERS
node_modules
+
+# IGNORED FILES
config.json
+*.env
diff --git a/config.json b/config.json
new file mode 100644
index 0000000..c55e70d
--- /dev/null
+++ b/config.json
@@ -0,0 +1,3 @@
+{
+ "token": "MTIwMTYwMjAxMzE0MjcxMjQzMQ.Gi0l5n.tldSN9fnBzxoWAgtdFBVr8jdXyOxaQKJ2_OOZk"
+}
diff --git a/main.js b/main.js
index 7f3d5ac..cf6854b 100644
--- a/main.js
+++ b/main.js
@@ -76,29 +76,48 @@ client.on(Events.InteractionCreate, async interaction => {
});
client.on(Events.MessageReactionAdd, async (reaction, user) => {
- if (reaction.partial) {
- try {
- await reaction.fetch();
+ try {
+ await reaction.fetch();
+ console.log(informationStatus + "Reaction noticed!");
- const starChannel = client.channels.cache.get(starChannelID);
+ const starChannel = client.channels.cache.get(starChannelID);
- starChannel.send(reaction.message.attachments);
+ if (reaction.emoji.name == '⭐') {
+ if (reaction.count <= 1) {
+ const starEmbed = {
+ color: 0x0F3061,
+ author: {
+ name: reaction.message.author.tag,
+ icon_url: reaction.message.author.displayAvatarURL(),
+ },
+ footer: {
+ text: new Date().toLocaleString(),
+ },
+ };
- if (reaction.emoji.name == '⭐') {
- const starEmbed = new EmbedBuilder()
- //.setImage()
- .setDescription(reaction.message.content)
- .setAuthor({ name: `${reaction.message.author.tag}` });
- starChannel.send({ embeds: [starEmbed] });
+ if(reaction.message.attachments.first()){
+ starEmbed.image = {
+ url: reaction.message.attachments.first().url,
+ };
+ }
+
+ if(!reaction.message.content == '') {
+ starEmbed.description = reaction.message.content;
+ }
+
+ starChannel.send({ embeds: [starEmbed] });
+ console.log(informationStatus + "Star message has been added!");
} else {
return;
}
- } catch (error) {
- console.log(errorStatus + 'Something wrong happend while fetching reactions for message! Please use information below to debug.');
- console.error(error);
- }}
+ } else {
+ return;
+ }
+ } catch(error) {
+ console.log(errorStatus + 'Something wrong happend while fetching reactions for message! Please use information below to debug.');
+ console.error(error);
}
-);
+});
client.login(token);
diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json
new file mode 100644
index 0000000..848e8dd
--- /dev/null
+++ b/node_modules/.package-lock.json
@@ -0,0 +1,310 @@
+{
+ "name": "mbot",
+ "version": "1.0.0",
+ "lockfileVersion": 3,
+ "requires": true,
+ "packages": {
+ "node_modules/@discordjs/builders": {
+ "version": "1.8.1",
+ "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-1.8.1.tgz",
+ "integrity": "sha512-GkF+HM01FHy+NSoTaUPR8z44otfQgJ1AIsRxclYGUZDyUbdZEFyD/5QVv2Y1Flx6M+B0bQLzg2M9CJv5lGTqpA==",
+ "dependencies": {
+ "@discordjs/formatters": "^0.4.0",
+ "@discordjs/util": "^1.1.0",
+ "@sapphire/shapeshift": "^3.9.7",
+ "discord-api-types": "0.37.83",
+ "fast-deep-equal": "^3.1.3",
+ "ts-mixer": "^6.0.4",
+ "tslib": "^2.6.2"
+ },
+ "engines": {
+ "node": ">=16.11.0"
+ },
+ "funding": {
+ "url": "https://github.com/discordjs/discord.js?sponsor"
+ }
+ },
+ "node_modules/@discordjs/collection": {
+ "version": "1.5.3",
+ "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-1.5.3.tgz",
+ "integrity": "sha512-SVb428OMd3WO1paV3rm6tSjM4wC+Kecaa1EUGX7vc6/fddvw/6lg90z4QtCqm21zvVe92vMMDt9+DkIvjXImQQ==",
+ "engines": {
+ "node": ">=16.11.0"
+ }
+ },
+ "node_modules/@discordjs/formatters": {
+ "version": "0.4.0",
+ "resolved": "https://registry.npmjs.org/@discordjs/formatters/-/formatters-0.4.0.tgz",
+ "integrity": "sha512-fJ06TLC1NiruF35470q3Nr1bi95BdvKFAF+T5bNfZJ4bNdqZ3VZ+Ttg6SThqTxm6qumSG3choxLBHMC69WXNXQ==",
+ "dependencies": {
+ "discord-api-types": "0.37.83"
+ },
+ "engines": {
+ "node": ">=16.11.0"
+ },
+ "funding": {
+ "url": "https://github.com/discordjs/discord.js?sponsor"
+ }
+ },
+ "node_modules/@discordjs/rest": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/@discordjs/rest/-/rest-2.3.0.tgz",
+ "integrity": "sha512-C1kAJK8aSYRv3ZwMG8cvrrW4GN0g5eMdP8AuN8ODH5DyOCbHgJspze1my3xHOAgwLJdKUbWNVyAeJ9cEdduqIg==",
+ "dependencies": {
+ "@discordjs/collection": "^2.1.0",
+ "@discordjs/util": "^1.1.0",
+ "@sapphire/async-queue": "^1.5.2",
+ "@sapphire/snowflake": "^3.5.3",
+ "@vladfrangu/async_event_emitter": "^2.2.4",
+ "discord-api-types": "0.37.83",
+ "magic-bytes.js": "^1.10.0",
+ "tslib": "^2.6.2",
+ "undici": "6.13.0"
+ },
+ "engines": {
+ "node": ">=16.11.0"
+ },
+ "funding": {
+ "url": "https://github.com/discordjs/discord.js?sponsor"
+ }
+ },
+ "node_modules/@discordjs/rest/node_modules/@discordjs/collection": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-2.1.0.tgz",
+ "integrity": "sha512-mLcTACtXUuVgutoznkh6hS3UFqYirDYAg5Dc1m8xn6OvPjetnUlf/xjtqnnc47OwWdaoCQnHmHh9KofhD6uRqw==",
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/discordjs/discord.js?sponsor"
+ }
+ },
+ "node_modules/@discordjs/util": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@discordjs/util/-/util-1.1.0.tgz",
+ "integrity": "sha512-IndcI5hzlNZ7GS96RV3Xw1R2kaDuXEp7tRIy/KlhidpN/BQ1qh1NZt3377dMLTa44xDUNKT7hnXkA/oUAzD/lg==",
+ "engines": {
+ "node": ">=16.11.0"
+ },
+ "funding": {
+ "url": "https://github.com/discordjs/discord.js?sponsor"
+ }
+ },
+ "node_modules/@discordjs/ws": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/@discordjs/ws/-/ws-1.1.0.tgz",
+ "integrity": "sha512-O97DIeSvfNTn5wz5vaER6ciyUsr7nOqSEtsLoMhhIgeFkhnxLRqSr00/Fpq2/ppLgjDGLbQCDzIK7ilGoB/M7A==",
+ "dependencies": {
+ "@discordjs/collection": "^2.1.0",
+ "@discordjs/rest": "^2.3.0",
+ "@discordjs/util": "^1.1.0",
+ "@sapphire/async-queue": "^1.5.2",
+ "@types/ws": "^8.5.10",
+ "@vladfrangu/async_event_emitter": "^2.2.4",
+ "discord-api-types": "0.37.83",
+ "tslib": "^2.6.2",
+ "ws": "^8.16.0"
+ },
+ "engines": {
+ "node": ">=16.11.0"
+ },
+ "funding": {
+ "url": "https://github.com/discordjs/discord.js?sponsor"
+ }
+ },
+ "node_modules/@discordjs/ws/node_modules/@discordjs/collection": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-2.1.0.tgz",
+ "integrity": "sha512-mLcTACtXUuVgutoznkh6hS3UFqYirDYAg5Dc1m8xn6OvPjetnUlf/xjtqnnc47OwWdaoCQnHmHh9KofhD6uRqw==",
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/discordjs/discord.js?sponsor"
+ }
+ },
+ "node_modules/@sapphire/async-queue": {
+ "version": "1.5.2",
+ "resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.5.2.tgz",
+ "integrity": "sha512-7X7FFAA4DngXUl95+hYbUF19bp1LGiffjJtu7ygrZrbdCSsdDDBaSjB7Akw0ZbOu6k0xpXyljnJ6/RZUvLfRdg==",
+ "engines": {
+ "node": ">=v14.0.0",
+ "npm": ">=7.0.0"
+ }
+ },
+ "node_modules/@sapphire/shapeshift": {
+ "version": "3.9.7",
+ "resolved": "https://registry.npmjs.org/@sapphire/shapeshift/-/shapeshift-3.9.7.tgz",
+ "integrity": "sha512-4It2mxPSr4OGn4HSQWGmhFMsNFGfFVhWeRPCRwbH972Ek2pzfGRZtb0pJ4Ze6oIzcyh2jw7nUDa6qGlWofgd9g==",
+ "dependencies": {
+ "fast-deep-equal": "^3.1.3",
+ "lodash": "^4.17.21"
+ },
+ "engines": {
+ "node": ">=v16"
+ }
+ },
+ "node_modules/@sapphire/snowflake": {
+ "version": "3.5.3",
+ "resolved": "https://registry.npmjs.org/@sapphire/snowflake/-/snowflake-3.5.3.tgz",
+ "integrity": "sha512-jjmJywLAFoWeBi1W7994zZyiNWPIiqRRNAmSERxyg93xRGzNYvGjlZ0gR6x0F4gPRi2+0O6S71kOZYyr3cxaIQ==",
+ "engines": {
+ "node": ">=v14.0.0",
+ "npm": ">=7.0.0"
+ }
+ },
+ "node_modules/@types/node": {
+ "version": "20.12.11",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.11.tgz",
+ "integrity": "sha512-vDg9PZ/zi+Nqp6boSOT7plNuthRugEKixDv5sFTIpkE89MmNtEArAShI4mxuX2+UrLEe9pxC1vm2cjm9YlWbJw==",
+ "dependencies": {
+ "undici-types": "~5.26.4"
+ }
+ },
+ "node_modules/@types/ws": {
+ "version": "8.5.10",
+ "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.10.tgz",
+ "integrity": "sha512-vmQSUcfalpIq0R9q7uTo2lXs6eGIpt9wtnLdMv9LVpIjCA/+ufZRozlVoVelIYixx1ugCBKDhn89vnsEGOCx9A==",
+ "dependencies": {
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@vladfrangu/async_event_emitter": {
+ "version": "2.2.4",
+ "resolved": "https://registry.npmjs.org/@vladfrangu/async_event_emitter/-/async_event_emitter-2.2.4.tgz",
+ "integrity": "sha512-ButUPz9E9cXMLgvAW8aLAKKJJsPu1dY1/l/E8xzLFuysowXygs6GBcyunK9rnGC4zTsnIc2mQo71rGw9U+Ykug==",
+ "engines": {
+ "node": ">=v14.0.0",
+ "npm": ">=7.0.0"
+ }
+ },
+ "node_modules/discord-api-types": {
+ "version": "0.37.83",
+ "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.83.tgz",
+ "integrity": "sha512-urGGYeWtWNYMKnYlZnOnDHm8fVRffQs3U0SpE8RHeiuLKb/u92APS8HoQnPTFbnXmY1vVnXjXO4dOxcAn3J+DA=="
+ },
+ "node_modules/discord.js": {
+ "version": "14.15.2",
+ "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-14.15.2.tgz",
+ "integrity": "sha512-wGD37YCaTUNprtpqMIRuNiswwsvSWXrHykBSm2SAosoTYut0VUDj9yo9t4iLtMKvuhI49zYkvKc2TNdzdvpJhg==",
+ "dependencies": {
+ "@discordjs/builders": "^1.8.1",
+ "@discordjs/collection": "1.5.3",
+ "@discordjs/formatters": "^0.4.0",
+ "@discordjs/rest": "^2.3.0",
+ "@discordjs/util": "^1.1.0",
+ "@discordjs/ws": "^1.1.0",
+ "@sapphire/snowflake": "3.5.3",
+ "discord-api-types": "0.37.83",
+ "fast-deep-equal": "3.1.3",
+ "lodash.snakecase": "4.1.1",
+ "tslib": "2.6.2",
+ "undici": "6.13.0"
+ },
+ "engines": {
+ "node": ">=16.11.0"
+ },
+ "funding": {
+ "url": "https://github.com/discordjs/discord.js?sponsor"
+ }
+ },
+ "node_modules/fast-deep-equal": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
+ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="
+ },
+ "node_modules/fs": {
+ "version": "0.0.1-security",
+ "resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz",
+ "integrity": "sha512-3XY9e1pP0CVEUCdj5BmfIZxRBTSDycnbqhIOGec9QYtmVH2fbLpj86CFWkrNOkt/Fvty4KZG5lTglL9j/gJ87w=="
+ },
+ "node_modules/inherits": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
+ "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw=="
+ },
+ "node_modules/lodash": {
+ "version": "4.17.21",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
+ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
+ },
+ "node_modules/lodash.snakecase": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz",
+ "integrity": "sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw=="
+ },
+ "node_modules/magic-bytes.js": {
+ "version": "1.10.0",
+ "resolved": "https://registry.npmjs.org/magic-bytes.js/-/magic-bytes.js-1.10.0.tgz",
+ "integrity": "sha512-/k20Lg2q8LE5xiaaSkMXk4sfvI+9EGEykFS4b0CHHGWqDYU0bGUFSwchNOMA56D7TCs9GwVTkqe9als1/ns8UQ=="
+ },
+ "node_modules/path": {
+ "version": "0.12.7",
+ "resolved": "https://registry.npmjs.org/path/-/path-0.12.7.tgz",
+ "integrity": "sha512-aXXC6s+1w7otVF9UletFkFcDsJeO7lSZBPUQhtb5O0xJe8LtYhj/GxldoL09bBj9+ZmE2hNoHqQSFMN5fikh4Q==",
+ "dependencies": {
+ "process": "^0.11.1",
+ "util": "^0.10.3"
+ }
+ },
+ "node_modules/process": {
+ "version": "0.11.10",
+ "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
+ "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==",
+ "engines": {
+ "node": ">= 0.6.0"
+ }
+ },
+ "node_modules/ts-mixer": {
+ "version": "6.0.4",
+ "resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.4.tgz",
+ "integrity": "sha512-ufKpbmrugz5Aou4wcr5Wc1UUFWOLhq+Fm6qa6P0w0K5Qw2yhaUoiWszhCVuNQyNwrlGiscHOmqYoAox1PtvgjA=="
+ },
+ "node_modules/tslib": {
+ "version": "2.6.2",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz",
+ "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q=="
+ },
+ "node_modules/undici": {
+ "version": "6.13.0",
+ "resolved": "https://registry.npmjs.org/undici/-/undici-6.13.0.tgz",
+ "integrity": "sha512-Q2rtqmZWrbP8nePMq7mOJIN98M0fYvSgV89vwl/BQRT4mDOeY2GXZngfGpcBBhtky3woM7G24wZV3Q304Bv6cw==",
+ "engines": {
+ "node": ">=18.0"
+ }
+ },
+ "node_modules/undici-types": {
+ "version": "5.26.5",
+ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
+ "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA=="
+ },
+ "node_modules/util": {
+ "version": "0.10.4",
+ "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz",
+ "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==",
+ "dependencies": {
+ "inherits": "2.0.3"
+ }
+ },
+ "node_modules/ws": {
+ "version": "8.17.0",
+ "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.0.tgz",
+ "integrity": "sha512-uJq6108EgZMAl20KagGkzCKfMEjxmKvZHG7Tlq0Z6nOky7YF7aq4mOx6xK8TJ/i1LeK4Qus7INktacctDgY8Ow==",
+ "engines": {
+ "node": ">=10.0.0"
+ },
+ "peerDependencies": {
+ "bufferutil": "^4.0.1",
+ "utf-8-validate": ">=5.0.2"
+ },
+ "peerDependenciesMeta": {
+ "bufferutil": {
+ "optional": true
+ },
+ "utf-8-validate": {
+ "optional": true
+ }
+ }
+ }
+ }
+}
diff --git a/node_modules/@discordjs/builders/LICENSE b/node_modules/@discordjs/builders/LICENSE
new file mode 100644
index 0000000..cbe9c65
--- /dev/null
+++ b/node_modules/@discordjs/builders/LICENSE
@@ -0,0 +1,191 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ Copyright 2021 Noel Buechler
+ Copyright 2021 Vlad Frangu
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/node_modules/@discordjs/builders/README.md b/node_modules/@discordjs/builders/README.md
new file mode 100644
index 0000000..dc88b7f
--- /dev/null
+++ b/node_modules/@discordjs/builders/README.md
@@ -0,0 +1,72 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+## About
+
+`@discordjs/builders` is a utility package for easily building Discord API payloads.
+
+## Installation
+
+**Node.js 16.11.0 or newer is required.**
+
+```sh
+npm install @discordjs/builders
+yarn add @discordjs/builders
+pnpm add @discordjs/builders
+```
+
+## Examples
+
+You can find examples of how to use the builders in the [Slash Command Builders][example] examples.
+
+## Links
+
+- [Website][website] ([source][website-source])
+- [Documentation][documentation]
+- [Guide][guide] ([source][guide-source])
+ Also see the v13 to v14 [Update Guide][guide-update], which includes updated and removed items from the library.
+- [discord.js Discord server][discord]
+- [Discord API Discord server][discord-api]
+- [GitHub][source]
+- [npm][npm]
+- [Related libraries][related-libs]
+
+## Contributing
+
+Before creating an issue, please ensure that it hasn't already been reported/suggested, and double-check the
+[documentation][documentation].
+See [the contribution guide][contributing] if you'd like to submit a PR.
+
+## Help
+
+If you don't understand something in the documentation, you are experiencing problems, or you just need a gentle nudge in the right direction, please don't hesitate to join our official [discord.js Server][discord].
+
+[example]: https://github.com/discordjs/discord.js/blob/main/packages/builders/docs/examples/Slash%20Command%20Builders.md
+[website]: https://discord.js.org
+[website-source]: https://github.com/discordjs/discord.js/tree/main/apps/website
+[documentation]: https://discord.js.org/docs/packages/builders/stable
+[guide]: https://discordjs.guide/
+[guide-source]: https://github.com/discordjs/guide
+[guide-update]: https://discordjs.guide/additional-info/changes-in-v14.html
+[discord]: https://discord.gg/djs
+[discord-api]: https://discord.gg/discord-api
+[source]: https://github.com/discordjs/discord.js/tree/main/packages/builders
+[npm]: https://www.npmjs.com/package/@discordjs/builders
+[related-libs]: https://discord.com/developers/docs/topics/community-resources#libraries
+[contributing]: https://github.com/discordjs/discord.js/blob/main/.github/CONTRIBUTING.md
diff --git a/node_modules/@discordjs/builders/dist/index.d.mts b/node_modules/@discordjs/builders/dist/index.d.mts
new file mode 100644
index 0000000..d129ca5
--- /dev/null
+++ b/node_modules/@discordjs/builders/dist/index.d.mts
@@ -0,0 +1,1971 @@
+import * as _sapphire_shapeshift from '@sapphire/shapeshift';
+import { APIEmbedField, APIEmbedAuthor, APIEmbedFooter, APIEmbedImage, APIEmbed, APISelectMenuOption, APIMessageComponentEmoji, ButtonStyle, ChannelType, APIActionRowComponent, APIActionRowComponentTypes, APIBaseComponent, ComponentType, APIButtonComponent, APISelectMenuComponent, APIChannelSelectComponent, Snowflake, APIMentionableSelectComponent, APISelectMenuDefaultValue, SelectMenuDefaultValueType, APIRoleSelectComponent, APIStringSelectComponent, APIUserSelectComponent, APITextInputComponent, TextInputStyle, APIMessageActionRowComponent, APIModalActionRowComponent, APIModalComponent, APIMessageComponent, APIModalInteractionResponseCallbackData, LocalizationMap, LocaleString, Permissions, RESTPostAPIChatInputApplicationCommandsJSONBody, ApplicationCommandOptionType, APIApplicationCommandBasicOption, APIApplicationCommandAttachmentOption, APIApplicationCommandBooleanOption, APIApplicationCommandChannelOption, APIApplicationCommandOptionChoice, APIApplicationCommandIntegerOption, APIApplicationCommandMentionableOption, APIApplicationCommandNumberOption, APIApplicationCommandRoleOption, APIApplicationCommandStringOption, APIApplicationCommandUserOption, APIApplicationCommandSubcommandGroupOption, APIApplicationCommandSubcommandOption, APIApplicationCommandOption, Locale, ApplicationCommandType, RESTPostAPIContextMenuApplicationCommandsJSONBody } from 'discord-api-types/v10';
+export * from '@discordjs/formatters';
+import { JSONEncodable, Equatable } from '@discordjs/util';
+
+declare const fieldNamePredicate: _sapphire_shapeshift.StringValidator;
+declare const fieldValuePredicate: _sapphire_shapeshift.StringValidator;
+declare const fieldInlinePredicate: _sapphire_shapeshift.UnionValidator;
+declare const embedFieldPredicate: _sapphire_shapeshift.ObjectValidator<{
+ name: string;
+ value: string;
+ inline: boolean | undefined;
+}, _sapphire_shapeshift.UndefinedToOptional<{
+ name: string;
+ value: string;
+ inline: boolean | undefined;
+}>>;
+declare const embedFieldsArrayPredicate: _sapphire_shapeshift.ArrayValidator<_sapphire_shapeshift.UndefinedToOptional<{
+ name: string;
+ value: string;
+ inline: boolean | undefined;
+}>[], _sapphire_shapeshift.UndefinedToOptional<{
+ name: string;
+ value: string;
+ inline: boolean | undefined;
+}>>;
+declare const fieldLengthPredicate: _sapphire_shapeshift.NumberValidator;
+declare function validateFieldLength(amountAdding: number, fields?: APIEmbedField[]): void;
+declare const authorNamePredicate: _sapphire_shapeshift.UnionValidator;
+declare const imageURLPredicate: _sapphire_shapeshift.UnionValidator;
+declare const urlPredicate: _sapphire_shapeshift.UnionValidator;
+declare const embedAuthorPredicate: _sapphire_shapeshift.ObjectValidator<{
+ name: string | null;
+ iconURL: string | null | undefined;
+ url: string | null | undefined;
+}, _sapphire_shapeshift.UndefinedToOptional<{
+ name: string | null;
+ iconURL: string | null | undefined;
+ url: string | null | undefined;
+}>>;
+declare const RGBPredicate: _sapphire_shapeshift.NumberValidator;
+declare const colorPredicate: _sapphire_shapeshift.UnionValidator;
+declare const descriptionPredicate: _sapphire_shapeshift.UnionValidator;
+declare const footerTextPredicate: _sapphire_shapeshift.UnionValidator;
+declare const embedFooterPredicate: _sapphire_shapeshift.ObjectValidator<{
+ text: string | null;
+ iconURL: string | null | undefined;
+}, _sapphire_shapeshift.UndefinedToOptional<{
+ text: string | null;
+ iconURL: string | null | undefined;
+}>>;
+declare const timestampPredicate: _sapphire_shapeshift.UnionValidator;
+declare const titlePredicate: _sapphire_shapeshift.UnionValidator;
+
+declare const Assertions$5_RGBPredicate: typeof RGBPredicate;
+declare const Assertions$5_authorNamePredicate: typeof authorNamePredicate;
+declare const Assertions$5_colorPredicate: typeof colorPredicate;
+declare const Assertions$5_descriptionPredicate: typeof descriptionPredicate;
+declare const Assertions$5_embedAuthorPredicate: typeof embedAuthorPredicate;
+declare const Assertions$5_embedFieldPredicate: typeof embedFieldPredicate;
+declare const Assertions$5_embedFieldsArrayPredicate: typeof embedFieldsArrayPredicate;
+declare const Assertions$5_embedFooterPredicate: typeof embedFooterPredicate;
+declare const Assertions$5_fieldInlinePredicate: typeof fieldInlinePredicate;
+declare const Assertions$5_fieldLengthPredicate: typeof fieldLengthPredicate;
+declare const Assertions$5_fieldNamePredicate: typeof fieldNamePredicate;
+declare const Assertions$5_fieldValuePredicate: typeof fieldValuePredicate;
+declare const Assertions$5_footerTextPredicate: typeof footerTextPredicate;
+declare const Assertions$5_imageURLPredicate: typeof imageURLPredicate;
+declare const Assertions$5_timestampPredicate: typeof timestampPredicate;
+declare const Assertions$5_titlePredicate: typeof titlePredicate;
+declare const Assertions$5_urlPredicate: typeof urlPredicate;
+declare const Assertions$5_validateFieldLength: typeof validateFieldLength;
+declare namespace Assertions$5 {
+ export { Assertions$5_RGBPredicate as RGBPredicate, Assertions$5_authorNamePredicate as authorNamePredicate, Assertions$5_colorPredicate as colorPredicate, Assertions$5_descriptionPredicate as descriptionPredicate, Assertions$5_embedAuthorPredicate as embedAuthorPredicate, Assertions$5_embedFieldPredicate as embedFieldPredicate, Assertions$5_embedFieldsArrayPredicate as embedFieldsArrayPredicate, Assertions$5_embedFooterPredicate as embedFooterPredicate, Assertions$5_fieldInlinePredicate as fieldInlinePredicate, Assertions$5_fieldLengthPredicate as fieldLengthPredicate, Assertions$5_fieldNamePredicate as fieldNamePredicate, Assertions$5_fieldValuePredicate as fieldValuePredicate, Assertions$5_footerTextPredicate as footerTextPredicate, Assertions$5_imageURLPredicate as imageURLPredicate, Assertions$5_timestampPredicate as timestampPredicate, Assertions$5_titlePredicate as titlePredicate, Assertions$5_urlPredicate as urlPredicate, Assertions$5_validateFieldLength as validateFieldLength };
+}
+
+/**
+ * Normalizes data that is a rest parameter or an array into an array with a depth of 1.
+ *
+ * @typeParam ItemType - The data that must satisfy {@link RestOrArray}.
+ * @param arr - The (possibly variadic) data to normalize
+ */
+declare function normalizeArray(arr: RestOrArray): ItemType[];
+/**
+ * Represents data that may be an array or came from a rest parameter.
+ *
+ * @remarks
+ * This type is used throughout builders to ensure both an array and variadic arguments
+ * may be used. It is normalized with {@link normalizeArray}.
+ */
+type RestOrArray = Type[] | [Type[]];
+
+/**
+ * A tuple satisfying the RGB color model.
+ *
+ * @see {@link https://developer.mozilla.org/docs/Glossary/RGB}
+ */
+type RGBTuple = [red: number, green: number, blue: number];
+/**
+ * The base icon data typically used in payloads.
+ */
+interface IconData {
+ /**
+ * The URL of the icon.
+ */
+ iconURL?: string;
+ /**
+ * The proxy URL of the icon.
+ */
+ proxyIconURL?: string;
+}
+/**
+ * Represents the author data of an embed.
+ */
+interface EmbedAuthorData extends IconData, Omit {
+}
+/**
+ * Represents the author options of an embed.
+ */
+interface EmbedAuthorOptions extends Omit {
+}
+/**
+ * Represents the footer data of an embed.
+ */
+interface EmbedFooterData extends IconData, Omit {
+}
+/**
+ * Represents the footer options of an embed.
+ */
+interface EmbedFooterOptions extends Omit {
+}
+/**
+ * Represents the image data of an embed.
+ */
+interface EmbedImageData extends Omit {
+ /**
+ * The proxy URL for the image.
+ */
+ proxyURL?: string;
+}
+/**
+ * A builder that creates API-compatible JSON data for embeds.
+ */
+declare class EmbedBuilder {
+ /**
+ * The API data associated with this embed.
+ */
+ readonly data: APIEmbed;
+ /**
+ * Creates a new embed from API data.
+ *
+ * @param data - The API data to create this embed with
+ */
+ constructor(data?: APIEmbed);
+ /**
+ * Appends fields to the embed.
+ *
+ * @remarks
+ * This method accepts either an array of fields or a variable number of field parameters.
+ * The maximum amount of fields that can be added is 25.
+ * @example
+ * Using an array:
+ * ```ts
+ * const fields: APIEmbedField[] = ...;
+ * const embed = new EmbedBuilder()
+ * .addFields(fields);
+ * ```
+ * @example
+ * Using rest parameters (variadic):
+ * ```ts
+ * const embed = new EmbedBuilder()
+ * .addFields(
+ * { name: 'Field 1', value: 'Value 1' },
+ * { name: 'Field 2', value: 'Value 2' },
+ * );
+ * ```
+ * @param fields - The fields to add
+ */
+ addFields(...fields: RestOrArray): this;
+ /**
+ * Removes, replaces, or inserts fields for this embed.
+ *
+ * @remarks
+ * This method behaves similarly
+ * to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice | Array.prototype.splice()}.
+ * The maximum amount of fields that can be added is 25.
+ *
+ * It's useful for modifying and adjusting order of the already-existing fields of an embed.
+ * @example
+ * Remove the first field:
+ * ```ts
+ * embed.spliceFields(0, 1);
+ * ```
+ * @example
+ * Remove the first n fields:
+ * ```ts
+ * const n = 4;
+ * embed.spliceFields(0, n);
+ * ```
+ * @example
+ * Remove the last field:
+ * ```ts
+ * embed.spliceFields(-1, 1);
+ * ```
+ * @param index - The index to start at
+ * @param deleteCount - The number of fields to remove
+ * @param fields - The replacing field objects
+ */
+ spliceFields(index: number, deleteCount: number, ...fields: APIEmbedField[]): this;
+ /**
+ * Sets the fields for this embed.
+ *
+ * @remarks
+ * This method is an alias for {@link EmbedBuilder.spliceFields}. More specifically,
+ * it splices the entire array of fields, replacing them with the provided fields.
+ *
+ * You can set a maximum of 25 fields.
+ * @param fields - The fields to set
+ */
+ setFields(...fields: RestOrArray): this;
+ /**
+ * Sets the author of this embed.
+ *
+ * @param options - The options to use
+ */
+ setAuthor(options: EmbedAuthorOptions | null): this;
+ /**
+ * Sets the color of this embed.
+ *
+ * @param color - The color to use
+ */
+ setColor(color: RGBTuple | number | null): this;
+ /**
+ * Sets the description of this embed.
+ *
+ * @param description - The description to use
+ */
+ setDescription(description: string | null): this;
+ /**
+ * Sets the footer of this embed.
+ *
+ * @param options - The footer to use
+ */
+ setFooter(options: EmbedFooterOptions | null): this;
+ /**
+ * Sets the image of this embed.
+ *
+ * @param url - The image URL to use
+ */
+ setImage(url: string | null): this;
+ /**
+ * Sets the thumbnail of this embed.
+ *
+ * @param url - The thumbnail URL to use
+ */
+ setThumbnail(url: string | null): this;
+ /**
+ * Sets the timestamp of this embed.
+ *
+ * @param timestamp - The timestamp or date to use
+ */
+ setTimestamp(timestamp?: Date | number | null): this;
+ /**
+ * Sets the title for this embed.
+ *
+ * @param title - The title to use
+ */
+ setTitle(title: string | null): this;
+ /**
+ * Sets the URL of this embed.
+ *
+ * @param url - The URL to use
+ */
+ setURL(url: string | null): this;
+ /**
+ * Serializes this builder to API-compatible JSON data.
+ *
+ * @remarks
+ * This method runs validations on the data before serializing it.
+ * As such, it may throw an error if the data is invalid.
+ */
+ toJSON(): APIEmbed;
+}
+
+/**
+ * A builder that creates API-compatible JSON data for string select menu options.
+ */
+declare class StringSelectMenuOptionBuilder implements JSONEncodable {
+ data: Partial;
+ /**
+ * Creates a new string select menu option from API data.
+ *
+ * @param data - The API data to create this string select menu option with
+ * @example
+ * Creating a string select menu option from an API data object:
+ * ```ts
+ * const selectMenuOption = new SelectMenuOptionBuilder({
+ * label: 'catchy label',
+ * value: '1',
+ * });
+ * ```
+ * @example
+ * Creating a string select menu option using setters and API data:
+ * ```ts
+ * const selectMenuOption = new SelectMenuOptionBuilder({
+ * default: true,
+ * value: '1',
+ * })
+ * .setLabel('woah');
+ * ```
+ */
+ constructor(data?: Partial);
+ /**
+ * Sets the label for this option.
+ *
+ * @param label - The label to use
+ */
+ setLabel(label: string): this;
+ /**
+ * Sets the value for this option.
+ *
+ * @param value - The value to use
+ */
+ setValue(value: string): this;
+ /**
+ * Sets the description for this option.
+ *
+ * @param description - The description to use
+ */
+ setDescription(description: string): this;
+ /**
+ * Sets whether this option is selected by default.
+ *
+ * @param isDefault - Whether this option is selected by default
+ */
+ setDefault(isDefault?: boolean): this;
+ /**
+ * Sets the emoji to display for this option.
+ *
+ * @param emoji - The emoji to use
+ */
+ setEmoji(emoji: APIMessageComponentEmoji): this;
+ /**
+ * {@inheritDoc BaseSelectMenuBuilder.toJSON}
+ */
+ toJSON(): APISelectMenuOption;
+}
+
+declare const customIdValidator: _sapphire_shapeshift.StringValidator;
+declare const emojiValidator: _sapphire_shapeshift.ObjectValidator<{
+ name?: string | undefined;
+ id?: string | undefined;
+ animated?: boolean | undefined;
+}, _sapphire_shapeshift.UndefinedToOptional<{
+ name?: string | undefined;
+ id?: string | undefined;
+ animated?: boolean | undefined;
+}>>;
+declare const disabledValidator: _sapphire_shapeshift.BooleanValidator;
+declare const buttonLabelValidator: _sapphire_shapeshift.StringValidator;
+declare const buttonStyleValidator: _sapphire_shapeshift.NativeEnumValidator;
+declare const placeholderValidator$1: _sapphire_shapeshift.StringValidator;
+declare const minMaxValidator: _sapphire_shapeshift.NumberValidator;
+declare const labelValueDescriptionValidator: _sapphire_shapeshift.StringValidator;
+declare const jsonOptionValidator: _sapphire_shapeshift.ObjectValidator<{
+ label: string;
+ value: string;
+ description: string | undefined;
+ emoji: _sapphire_shapeshift.UndefinedToOptional<{
+ name?: string | undefined;
+ id?: string | undefined;
+ animated?: boolean | undefined;
+ }> | undefined;
+ default: boolean | undefined;
+}, _sapphire_shapeshift.UndefinedToOptional<{
+ label: string;
+ value: string;
+ description: string | undefined;
+ emoji: _sapphire_shapeshift.UndefinedToOptional<{
+ name?: string | undefined;
+ id?: string | undefined;
+ animated?: boolean | undefined;
+ }> | undefined;
+ default: boolean | undefined;
+}>>;
+declare const optionValidator: _sapphire_shapeshift.InstanceValidator;
+declare const optionsValidator: _sapphire_shapeshift.ArrayValidator;
+declare const optionsLengthValidator: _sapphire_shapeshift.NumberValidator;
+declare function validateRequiredSelectMenuParameters(options: StringSelectMenuOptionBuilder[], customId?: string): void;
+declare const defaultValidator: _sapphire_shapeshift.BooleanValidator;
+declare function validateRequiredSelectMenuOptionParameters(label?: string, value?: string): void;
+declare const channelTypesValidator: _sapphire_shapeshift.ArrayValidator;
+declare const urlValidator: _sapphire_shapeshift.StringValidator;
+declare function validateRequiredButtonParameters(style?: ButtonStyle, label?: string, emoji?: APIMessageComponentEmoji, customId?: string, url?: string): void;
+
+declare const Assertions$4_buttonLabelValidator: typeof buttonLabelValidator;
+declare const Assertions$4_buttonStyleValidator: typeof buttonStyleValidator;
+declare const Assertions$4_channelTypesValidator: typeof channelTypesValidator;
+declare const Assertions$4_customIdValidator: typeof customIdValidator;
+declare const Assertions$4_defaultValidator: typeof defaultValidator;
+declare const Assertions$4_disabledValidator: typeof disabledValidator;
+declare const Assertions$4_emojiValidator: typeof emojiValidator;
+declare const Assertions$4_jsonOptionValidator: typeof jsonOptionValidator;
+declare const Assertions$4_labelValueDescriptionValidator: typeof labelValueDescriptionValidator;
+declare const Assertions$4_minMaxValidator: typeof minMaxValidator;
+declare const Assertions$4_optionValidator: typeof optionValidator;
+declare const Assertions$4_optionsLengthValidator: typeof optionsLengthValidator;
+declare const Assertions$4_optionsValidator: typeof optionsValidator;
+declare const Assertions$4_urlValidator: typeof urlValidator;
+declare const Assertions$4_validateRequiredButtonParameters: typeof validateRequiredButtonParameters;
+declare const Assertions$4_validateRequiredSelectMenuOptionParameters: typeof validateRequiredSelectMenuOptionParameters;
+declare const Assertions$4_validateRequiredSelectMenuParameters: typeof validateRequiredSelectMenuParameters;
+declare namespace Assertions$4 {
+ export { Assertions$4_buttonLabelValidator as buttonLabelValidator, Assertions$4_buttonStyleValidator as buttonStyleValidator, Assertions$4_channelTypesValidator as channelTypesValidator, Assertions$4_customIdValidator as customIdValidator, Assertions$4_defaultValidator as defaultValidator, Assertions$4_disabledValidator as disabledValidator, Assertions$4_emojiValidator as emojiValidator, Assertions$4_jsonOptionValidator as jsonOptionValidator, Assertions$4_labelValueDescriptionValidator as labelValueDescriptionValidator, Assertions$4_minMaxValidator as minMaxValidator, Assertions$4_optionValidator as optionValidator, Assertions$4_optionsLengthValidator as optionsLengthValidator, Assertions$4_optionsValidator as optionsValidator, placeholderValidator$1 as placeholderValidator, Assertions$4_urlValidator as urlValidator, Assertions$4_validateRequiredButtonParameters as validateRequiredButtonParameters, Assertions$4_validateRequiredSelectMenuOptionParameters as validateRequiredSelectMenuOptionParameters, Assertions$4_validateRequiredSelectMenuParameters as validateRequiredSelectMenuParameters };
+}
+
+/**
+ * Any action row component data represented as an object.
+ */
+type AnyAPIActionRowComponent = APIActionRowComponent | APIActionRowComponentTypes;
+/**
+ * The base component builder that contains common symbols for all sorts of components.
+ *
+ * @typeParam DataType - The type of internal API data that is stored within the component
+ */
+declare abstract class ComponentBuilder> = APIBaseComponent> implements JSONEncodable {
+ /**
+ * The API data associated with this component.
+ */
+ readonly data: Partial;
+ /**
+ * Serializes this builder to API-compatible JSON data.
+ *
+ * @remarks
+ * This method runs validations on the data before serializing it.
+ * As such, it may throw an error if the data is invalid.
+ */
+ abstract toJSON(): AnyAPIActionRowComponent;
+ /**
+ * Constructs a new kind of component.
+ *
+ * @param data - The data to construct a component out of
+ */
+ constructor(data: Partial);
+}
+
+/**
+ * A builder that creates API-compatible JSON data for buttons.
+ */
+declare class ButtonBuilder extends ComponentBuilder {
+ /**
+ * Creates a new button from API data.
+ *
+ * @param data - The API data to create this button with
+ * @example
+ * Creating a button from an API data object:
+ * ```ts
+ * const button = new ButtonBuilder({
+ * custom_id: 'a cool button',
+ * style: ButtonStyle.Primary,
+ * label: 'Click Me',
+ * emoji: {
+ * name: 'smile',
+ * id: '123456789012345678',
+ * },
+ * });
+ * ```
+ * @example
+ * Creating a button using setters and API data:
+ * ```ts
+ * const button = new ButtonBuilder({
+ * style: ButtonStyle.Secondary,
+ * label: 'Click Me',
+ * })
+ * .setEmoji({ name: '🙂' })
+ * .setCustomId('another cool button');
+ * ```
+ */
+ constructor(data?: Partial);
+ /**
+ * Sets the style of this button.
+ *
+ * @param style - The style to use
+ */
+ setStyle(style: ButtonStyle): this;
+ /**
+ * Sets the URL for this button.
+ *
+ * @remarks
+ * This method is only available to buttons using the `Link` button style.
+ * Only three types of URL schemes are currently supported: `https://`, `http://`, and `discord://`.
+ * @param url - The URL to use
+ */
+ setURL(url: string): this;
+ /**
+ * Sets the custom id for this button.
+ *
+ * @remarks
+ * This method is only applicable to buttons that are not using the `Link` button style.
+ * @param customId - The custom id to use
+ */
+ setCustomId(customId: string): this;
+ /**
+ * Sets the emoji to display on this button.
+ *
+ * @param emoji - The emoji to use
+ */
+ setEmoji(emoji: APIMessageComponentEmoji): this;
+ /**
+ * Sets whether this button is disabled.
+ *
+ * @param disabled - Whether to disable this button
+ */
+ setDisabled(disabled?: boolean): this;
+ /**
+ * Sets the label for this button.
+ *
+ * @param label - The label to use
+ */
+ setLabel(label: string): this;
+ /**
+ * {@inheritDoc ComponentBuilder.toJSON}
+ */
+ toJSON(): APIButtonComponent;
+}
+
+/**
+ * The base select menu builder that contains common symbols for select menu builders.
+ *
+ * @typeParam SelectMenuType - The type of select menu this would be instantiated for.
+ */
+declare abstract class BaseSelectMenuBuilder extends ComponentBuilder {
+ /**
+ * Sets the placeholder for this select menu.
+ *
+ * @param placeholder - The placeholder to use
+ */
+ setPlaceholder(placeholder: string): this;
+ /**
+ * Sets the minimum values that must be selected in the select menu.
+ *
+ * @param minValues - The minimum values that must be selected
+ */
+ setMinValues(minValues: number): this;
+ /**
+ * Sets the maximum values that must be selected in the select menu.
+ *
+ * @param maxValues - The maximum values that must be selected
+ */
+ setMaxValues(maxValues: number): this;
+ /**
+ * Sets the custom id for this select menu.
+ *
+ * @param customId - The custom id to use
+ */
+ setCustomId(customId: string): this;
+ /**
+ * Sets whether this select menu is disabled.
+ *
+ * @param disabled - Whether this select menu is disabled
+ */
+ setDisabled(disabled?: boolean): this;
+ /**
+ * {@inheritDoc ComponentBuilder.toJSON}
+ */
+ toJSON(): SelectMenuType;
+}
+
+/**
+ * A builder that creates API-compatible JSON data for channel select menus.
+ */
+declare class ChannelSelectMenuBuilder extends BaseSelectMenuBuilder {
+ /**
+ * Creates a new select menu from API data.
+ *
+ * @param data - The API data to create this select menu with
+ * @example
+ * Creating a select menu from an API data object:
+ * ```ts
+ * const selectMenu = new ChannelSelectMenuBuilder({
+ * custom_id: 'a cool select menu',
+ * placeholder: 'select an option',
+ * max_values: 2,
+ * });
+ * ```
+ * @example
+ * Creating a select menu using setters and API data:
+ * ```ts
+ * const selectMenu = new ChannelSelectMenuBuilder({
+ * custom_id: 'a cool select menu',
+ * })
+ * .addChannelTypes(ChannelType.GuildText, ChannelType.GuildAnnouncement)
+ * .setMinValues(2);
+ * ```
+ */
+ constructor(data?: Partial);
+ /**
+ * Adds channel types to this select menu.
+ *
+ * @param types - The channel types to use
+ */
+ addChannelTypes(...types: RestOrArray): this;
+ /**
+ * Sets channel types for this select menu.
+ *
+ * @param types - The channel types to use
+ */
+ setChannelTypes(...types: RestOrArray): this;
+ /**
+ * Adds default channels to this auto populated select menu.
+ *
+ * @param channels - The channels to add
+ */
+ addDefaultChannels(...channels: RestOrArray): this;
+ /**
+ * Sets default channels to this auto populated select menu.
+ *
+ * @param channels - The channels to set
+ */
+ setDefaultChannels(...channels: RestOrArray): this;
+ /**
+ * {@inheritDoc BaseSelectMenuBuilder.toJSON}
+ */
+ toJSON(): APIChannelSelectComponent;
+}
+
+/**
+ * A builder that creates API-compatible JSON data for mentionable select menus.
+ */
+declare class MentionableSelectMenuBuilder extends BaseSelectMenuBuilder {
+ /**
+ * Creates a new select menu from API data.
+ *
+ * @param data - The API data to create this select menu with
+ * @example
+ * Creating a select menu from an API data object:
+ * ```ts
+ * const selectMenu = new MentionableSelectMenuBuilder({
+ * custom_id: 'a cool select menu',
+ * placeholder: 'select an option',
+ * max_values: 2,
+ * });
+ * ```
+ * @example
+ * Creating a select menu using setters and API data:
+ * ```ts
+ * const selectMenu = new MentionableSelectMenuBuilder({
+ * custom_id: 'a cool select menu',
+ * })
+ * .setMinValues(1);
+ * ```
+ */
+ constructor(data?: Partial);
+ /**
+ * Adds default roles to this auto populated select menu.
+ *
+ * @param roles - The roles to add
+ */
+ addDefaultRoles(...roles: RestOrArray): this;
+ /**
+ * Adds default users to this auto populated select menu.
+ *
+ * @param users - The users to add
+ */
+ addDefaultUsers(...users: RestOrArray): this;
+ /**
+ * Adds default values to this auto populated select menu.
+ *
+ * @param values - The values to add
+ */
+ addDefaultValues(...values: RestOrArray | APISelectMenuDefaultValue>): this;
+ /**
+ * Sets default values to this auto populated select menu.
+ *
+ * @param values - The values to set
+ */
+ setDefaultValues(...values: RestOrArray | APISelectMenuDefaultValue>): this;
+}
+
+/**
+ * A builder that creates API-compatible JSON data for role select menus.
+ */
+declare class RoleSelectMenuBuilder extends BaseSelectMenuBuilder {
+ /**
+ * Creates a new select menu from API data.
+ *
+ * @param data - The API data to create this select menu with
+ * @example
+ * Creating a select menu from an API data object:
+ * ```ts
+ * const selectMenu = new RoleSelectMenuBuilder({
+ * custom_id: 'a cool select menu',
+ * placeholder: 'select an option',
+ * max_values: 2,
+ * });
+ * ```
+ * @example
+ * Creating a select menu using setters and API data:
+ * ```ts
+ * const selectMenu = new RoleSelectMenuBuilder({
+ * custom_id: 'a cool select menu',
+ * })
+ * .setMinValues(1);
+ * ```
+ */
+ constructor(data?: Partial);
+ /**
+ * Adds default roles to this auto populated select menu.
+ *
+ * @param roles - The roles to add
+ */
+ addDefaultRoles(...roles: RestOrArray): this;
+ /**
+ * Sets default roles to this auto populated select menu.
+ *
+ * @param roles - The roles to set
+ */
+ setDefaultRoles(...roles: RestOrArray): this;
+}
+
+/**
+ * A builder that creates API-compatible JSON data for string select menus.
+ */
+declare class StringSelectMenuBuilder extends BaseSelectMenuBuilder {
+ /**
+ * The options within this select menu.
+ */
+ readonly options: StringSelectMenuOptionBuilder[];
+ /**
+ * Creates a new select menu from API data.
+ *
+ * @param data - The API data to create this select menu with
+ * @example
+ * Creating a select menu from an API data object:
+ * ```ts
+ * const selectMenu = new StringSelectMenuBuilder({
+ * custom_id: 'a cool select menu',
+ * placeholder: 'select an option',
+ * max_values: 2,
+ * options: [
+ * { label: 'option 1', value: '1' },
+ * { label: 'option 2', value: '2' },
+ * { label: 'option 3', value: '3' },
+ * ],
+ * });
+ * ```
+ * @example
+ * Creating a select menu using setters and API data:
+ * ```ts
+ * const selectMenu = new StringSelectMenuBuilder({
+ * custom_id: 'a cool select menu',
+ * })
+ * .setMinValues(1)
+ * .addOptions({
+ * label: 'Catchy',
+ * value: 'catch',
+ * });
+ * ```
+ */
+ constructor(data?: Partial);
+ /**
+ * Adds options to this select menu.
+ *
+ * @param options - The options to add
+ */
+ addOptions(...options: RestOrArray): this;
+ /**
+ * Sets the options for this select menu.
+ *
+ * @param options - The options to set
+ */
+ setOptions(...options: RestOrArray): this;
+ /**
+ * Removes, replaces, or inserts options for this select menu.
+ *
+ * @remarks
+ * This method behaves similarly
+ * to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice | Array.prototype.splice()}.
+ * It's useful for modifying and adjusting the order of existing options.
+ * @example
+ * Remove the first option:
+ * ```ts
+ * selectMenu.spliceOptions(0, 1);
+ * ```
+ * @example
+ * Remove the first n option:
+ * ```ts
+ * const n = 4;
+ * selectMenu.spliceOptions(0, n);
+ * ```
+ * @example
+ * Remove the last option:
+ * ```ts
+ * selectMenu.spliceOptions(-1, 1);
+ * ```
+ * @param index - The index to start at
+ * @param deleteCount - The number of options to remove
+ * @param options - The replacing option objects or builders
+ */
+ spliceOptions(index: number, deleteCount: number, ...options: RestOrArray): this;
+ /**
+ * {@inheritDoc BaseSelectMenuBuilder.toJSON}
+ */
+ toJSON(): APIStringSelectComponent;
+}
+
+/**
+ * A builder that creates API-compatible JSON data for user select menus.
+ */
+declare class UserSelectMenuBuilder extends BaseSelectMenuBuilder {
+ /**
+ * Creates a new select menu from API data.
+ *
+ * @param data - The API data to create this select menu with
+ * @example
+ * Creating a select menu from an API data object:
+ * ```ts
+ * const selectMenu = new UserSelectMenuBuilder({
+ * custom_id: 'a cool select menu',
+ * placeholder: 'select an option',
+ * max_values: 2,
+ * });
+ * ```
+ * @example
+ * Creating a select menu using setters and API data:
+ * ```ts
+ * const selectMenu = new UserSelectMenuBuilder({
+ * custom_id: 'a cool select menu',
+ * })
+ * .setMinValues(1);
+ * ```
+ */
+ constructor(data?: Partial);
+ /**
+ * Adds default users to this auto populated select menu.
+ *
+ * @param users - The users to add
+ */
+ addDefaultUsers(...users: RestOrArray): this;
+ /**
+ * Sets default users to this auto populated select menu.
+ *
+ * @param users - The users to set
+ */
+ setDefaultUsers(...users: RestOrArray): this;
+}
+
+/**
+ * A builder that creates API-compatible JSON data for text inputs.
+ */
+declare class TextInputBuilder extends ComponentBuilder implements Equatable> {
+ /**
+ * Creates a new text input from API data.
+ *
+ * @param data - The API data to create this text input with
+ * @example
+ * Creating a select menu option from an API data object:
+ * ```ts
+ * const textInput = new TextInputBuilder({
+ * custom_id: 'a cool select menu',
+ * label: 'Type something',
+ * style: TextInputStyle.Short,
+ * });
+ * ```
+ * @example
+ * Creating a select menu option using setters and API data:
+ * ```ts
+ * const textInput = new TextInputBuilder({
+ * label: 'Type something else',
+ * })
+ * .setCustomId('woah')
+ * .setStyle(TextInputStyle.Paragraph);
+ * ```
+ */
+ constructor(data?: APITextInputComponent & {
+ type?: ComponentType.TextInput;
+ });
+ /**
+ * Sets the custom id for this text input.
+ *
+ * @param customId - The custom id to use
+ */
+ setCustomId(customId: string): this;
+ /**
+ * Sets the label for this text input.
+ *
+ * @param label - The label to use
+ */
+ setLabel(label: string): this;
+ /**
+ * Sets the style for this text input.
+ *
+ * @param style - The style to use
+ */
+ setStyle(style: TextInputStyle): this;
+ /**
+ * Sets the minimum length of text for this text input.
+ *
+ * @param minLength - The minimum length of text for this text input
+ */
+ setMinLength(minLength: number): this;
+ /**
+ * Sets the maximum length of text for this text input.
+ *
+ * @param maxLength - The maximum length of text for this text input
+ */
+ setMaxLength(maxLength: number): this;
+ /**
+ * Sets the placeholder for this text input.
+ *
+ * @param placeholder - The placeholder to use
+ */
+ setPlaceholder(placeholder: string): this;
+ /**
+ * Sets the value for this text input.
+ *
+ * @param value - The value to use
+ */
+ setValue(value: string): this;
+ /**
+ * Sets whether this text input is required.
+ *
+ * @param required - Whether this text input is required
+ */
+ setRequired(required?: boolean): this;
+ /**
+ * {@inheritDoc ComponentBuilder.toJSON}
+ */
+ toJSON(): APITextInputComponent;
+ /**
+ * Whether this is equal to another structure.
+ */
+ equals(other: APITextInputComponent | JSONEncodable): boolean;
+}
+
+/**
+ * The builders that may be used for messages.
+ */
+type MessageComponentBuilder = ActionRowBuilder | MessageActionRowComponentBuilder;
+/**
+ * The builders that may be used for modals.
+ */
+type ModalComponentBuilder = ActionRowBuilder | ModalActionRowComponentBuilder;
+/**
+ * The builders that may be used within an action row for messages.
+ */
+type MessageActionRowComponentBuilder = ButtonBuilder | ChannelSelectMenuBuilder | MentionableSelectMenuBuilder | RoleSelectMenuBuilder | StringSelectMenuBuilder | UserSelectMenuBuilder;
+/**
+ * The builders that may be used within an action row for modals.
+ */
+type ModalActionRowComponentBuilder = TextInputBuilder;
+/**
+ * Any builder.
+ */
+type AnyComponentBuilder = MessageActionRowComponentBuilder | ModalActionRowComponentBuilder;
+/**
+ * A builder that creates API-compatible JSON data for action rows.
+ *
+ * @typeParam ComponentType - The types of components this action row holds
+ */
+declare class ActionRowBuilder extends ComponentBuilder> {
+ /**
+ * The components within this action row.
+ */
+ readonly components: ComponentType[];
+ /**
+ * Creates a new action row from API data.
+ *
+ * @param data - The API data to create this action row with
+ * @example
+ * Creating an action row from an API data object:
+ * ```ts
+ * const actionRow = new ActionRowBuilder({
+ * components: [
+ * {
+ * custom_id: "custom id",
+ * label: "Type something",
+ * style: TextInputStyle.Short,
+ * type: ComponentType.TextInput,
+ * },
+ * ],
+ * });
+ * ```
+ * @example
+ * Creating an action row using setters and API data:
+ * ```ts
+ * const actionRow = new ActionRowBuilder({
+ * components: [
+ * {
+ * custom_id: "custom id",
+ * label: "Click me",
+ * style: ButtonStyle.Primary,
+ * type: ComponentType.Button,
+ * },
+ * ],
+ * })
+ * .addComponents(button2, button3);
+ * ```
+ */
+ constructor({ components, ...data }?: Partial>);
+ /**
+ * Adds components to this action row.
+ *
+ * @param components - The components to add
+ */
+ addComponents(...components: RestOrArray): this;
+ /**
+ * Sets components for this action row.
+ *
+ * @param components - The components to set
+ */
+ setComponents(...components: RestOrArray): this;
+ /**
+ * {@inheritDoc ComponentBuilder.toJSON}
+ */
+ toJSON(): APIActionRowComponent>;
+}
+
+/**
+ * Components here are mapped to their respective builder.
+ */
+interface MappedComponentTypes {
+ /**
+ * The action row component type is associated with an {@link ActionRowBuilder}.
+ */
+ [ComponentType.ActionRow]: ActionRowBuilder;
+ /**
+ * The button component type is associated with an {@link ButtonBuilder}.
+ */
+ [ComponentType.Button]: ButtonBuilder;
+ /**
+ * The string select component type is associated with an {@link StringSelectMenuBuilder}.
+ */
+ [ComponentType.StringSelect]: StringSelectMenuBuilder;
+ /**
+ * The text inpiut component type is associated with an {@link TextInputBuilder}.
+ */
+ [ComponentType.TextInput]: TextInputBuilder;
+ /**
+ * The user select component type is associated with an {@link UserSelectMenuBuilder}.
+ */
+ [ComponentType.UserSelect]: UserSelectMenuBuilder;
+ /**
+ * The role select component type is associated with an {@link RoleSelectMenuBuilder}.
+ */
+ [ComponentType.RoleSelect]: RoleSelectMenuBuilder;
+ /**
+ * The mentionable select component type is associated with an {@link MentionableSelectMenuBuilder}.
+ */
+ [ComponentType.MentionableSelect]: MentionableSelectMenuBuilder;
+ /**
+ * The channel select component type is associated with an {@link ChannelSelectMenuBuilder}.
+ */
+ [ComponentType.ChannelSelect]: ChannelSelectMenuBuilder;
+}
+/**
+ * Factory for creating components from API data.
+ *
+ * @typeParam ComponentType - The type of component to use
+ * @param data - The API data to transform to a component class
+ */
+declare function createComponentBuilder(data: (APIModalComponent | APIMessageComponent) & {
+ type: ComponentType;
+}): MappedComponentTypes[ComponentType];
+/**
+ * Factory for creating components from API data.
+ *
+ * @typeParam ComponentBuilder - The type of component to use
+ * @param data - The API data to transform to a component class
+ */
+declare function createComponentBuilder(data: ComponentBuilder): ComponentBuilder;
+
+declare const textInputStyleValidator: _sapphire_shapeshift.NativeEnumValidator;
+declare const minLengthValidator: _sapphire_shapeshift.NumberValidator;
+declare const maxLengthValidator: _sapphire_shapeshift.NumberValidator;
+declare const requiredValidator: _sapphire_shapeshift.BooleanValidator;
+declare const valueValidator: _sapphire_shapeshift.StringValidator;
+declare const placeholderValidator: _sapphire_shapeshift.StringValidator;
+declare const labelValidator: _sapphire_shapeshift.StringValidator;
+declare function validateRequiredParameters$3(customId?: string, style?: TextInputStyle, label?: string): void;
+
+declare const Assertions$3_labelValidator: typeof labelValidator;
+declare const Assertions$3_maxLengthValidator: typeof maxLengthValidator;
+declare const Assertions$3_minLengthValidator: typeof minLengthValidator;
+declare const Assertions$3_placeholderValidator: typeof placeholderValidator;
+declare const Assertions$3_requiredValidator: typeof requiredValidator;
+declare const Assertions$3_textInputStyleValidator: typeof textInputStyleValidator;
+declare const Assertions$3_valueValidator: typeof valueValidator;
+declare namespace Assertions$3 {
+ export { Assertions$3_labelValidator as labelValidator, Assertions$3_maxLengthValidator as maxLengthValidator, Assertions$3_minLengthValidator as minLengthValidator, Assertions$3_placeholderValidator as placeholderValidator, Assertions$3_requiredValidator as requiredValidator, Assertions$3_textInputStyleValidator as textInputStyleValidator, validateRequiredParameters$3 as validateRequiredParameters, Assertions$3_valueValidator as valueValidator };
+}
+
+/**
+ * A builder that creates API-compatible JSON data for modals.
+ */
+declare class ModalBuilder implements JSONEncodable {
+ /**
+ * The API data associated with this modal.
+ */
+ readonly data: Partial;
+ /**
+ * The components within this modal.
+ */
+ readonly components: ActionRowBuilder[];
+ /**
+ * Creates a new modal from API data.
+ *
+ * @param data - The API data to create this modal with
+ */
+ constructor({ components, ...data }?: Partial);
+ /**
+ * Sets the title of this modal.
+ *
+ * @param title - The title to use
+ */
+ setTitle(title: string): this;
+ /**
+ * Sets the custom id of this modal.
+ *
+ * @param customId - The custom id to use
+ */
+ setCustomId(customId: string): this;
+ /**
+ * Adds components to this modal.
+ *
+ * @param components - The components to add
+ */
+ addComponents(...components: RestOrArray | APIActionRowComponent>): this;
+ /**
+ * Sets components for this modal.
+ *
+ * @param components - The components to set
+ */
+ setComponents(...components: RestOrArray>): this;
+ /**
+ * {@inheritDoc ComponentBuilder.toJSON}
+ */
+ toJSON(): APIModalInteractionResponseCallbackData;
+}
+
+declare const titleValidator: _sapphire_shapeshift.StringValidator;
+declare const componentsValidator: _sapphire_shapeshift.ArrayValidator<[ActionRowBuilder, ...ActionRowBuilder[]], ActionRowBuilder>;
+declare function validateRequiredParameters$2(customId?: string, title?: string, components?: ActionRowBuilder[]): void;
+
+declare const Assertions$2_componentsValidator: typeof componentsValidator;
+declare const Assertions$2_titleValidator: typeof titleValidator;
+declare namespace Assertions$2 {
+ export { Assertions$2_componentsValidator as componentsValidator, Assertions$2_titleValidator as titleValidator, validateRequiredParameters$2 as validateRequiredParameters };
+}
+
+/**
+ * This mixin holds name and description symbols for slash commands.
+ */
+declare class SharedNameAndDescription {
+ /**
+ * The name of this command.
+ */
+ readonly name: string;
+ /**
+ * The name localizations of this command.
+ */
+ readonly name_localizations?: LocalizationMap;
+ /**
+ * The description of this command.
+ */
+ readonly description: string;
+ /**
+ * The description localizations of this command.
+ */
+ readonly description_localizations?: LocalizationMap;
+ /**
+ * Sets the name of this command.
+ *
+ * @param name - The name to use
+ */
+ setName(name: string): this;
+ /**
+ * Sets the description of this command.
+ *
+ * @param description - The description to use
+ */
+ setDescription(description: string): this;
+ /**
+ * Sets a name localization for this command.
+ *
+ * @param locale - The locale to set
+ * @param localizedName - The localized name for the given `locale`
+ */
+ setNameLocalization(locale: LocaleString, localizedName: string | null): this;
+ /**
+ * Sets the name localizations for this command.
+ *
+ * @param localizedNames - The object of localized names to set
+ */
+ setNameLocalizations(localizedNames: LocalizationMap | null): this;
+ /**
+ * Sets a description localization for this command.
+ *
+ * @param locale - The locale to set
+ * @param localizedDescription - The localized description for the given locale
+ */
+ setDescriptionLocalization(locale: LocaleString, localizedDescription: string | null): this;
+ /**
+ * Sets the description localizations for this command.
+ *
+ * @param localizedDescriptions - The object of localized descriptions to set
+ */
+ setDescriptionLocalizations(localizedDescriptions: LocalizationMap | null): this;
+}
+
+/**
+ * This mixin holds symbols that can be shared in slashcommands independent of options or subcommands.
+ */
+declare class SharedSlashCommand {
+ readonly name: string;
+ readonly name_localizations?: LocalizationMap;
+ readonly description: string;
+ readonly description_localizations?: LocalizationMap;
+ readonly options: ToAPIApplicationCommandOptions[];
+ /**
+ * Sets whether the command is enabled by default when the application is added to a guild.
+ *
+ * @remarks
+ * If set to `false`, you will have to later `PUT` the permissions for this command.
+ * @param value - Whether or not to enable this command by default
+ * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}
+ * @deprecated Use {@link SharedSlashCommand.setDefaultMemberPermissions} or {@link SharedSlashCommand.setDMPermission} instead.
+ */
+ setDefaultPermission(value: boolean): this;
+ /**
+ * Sets the default permissions a member should have in order to run the command.
+ *
+ * @remarks
+ * You can set this to `'0'` to disable the command by default.
+ * @param permissions - The permissions bit field to set
+ * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}
+ */
+ setDefaultMemberPermissions(permissions: Permissions | bigint | number | null | undefined): this;
+ /**
+ * Sets if the command is available in direct messages with the application.
+ *
+ * @remarks
+ * By default, commands are visible. This method is only for global commands.
+ * @param enabled - Whether the command should be enabled in direct messages
+ * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}
+ */
+ setDMPermission(enabled: boolean | null | undefined): this;
+ /**
+ * Sets whether this command is NSFW.
+ *
+ * @param nsfw - Whether this command is NSFW
+ */
+ setNSFW(nsfw?: boolean): this;
+ /**
+ * Serializes this builder to API-compatible JSON data.
+ *
+ * @remarks
+ * This method runs validations on the data before serializing it.
+ * As such, it may throw an error if the data is invalid.
+ */
+ toJSON(): RESTPostAPIChatInputApplicationCommandsJSONBody;
+}
+
+/**
+ * The base application command option builder that contains common symbols for application command builders.
+ */
+declare abstract class ApplicationCommandOptionBase extends SharedNameAndDescription {
+ /**
+ * The type of this option.
+ */
+ abstract readonly type: ApplicationCommandOptionType;
+ /**
+ * Whether this option is required.
+ *
+ * @defaultValue `false`
+ */
+ readonly required: boolean;
+ /**
+ * Sets whether this option is required.
+ *
+ * @param required - Whether this option should be required
+ */
+ setRequired(required: boolean): this;
+ /**
+ * Serializes this builder to API-compatible JSON data.
+ *
+ * @remarks
+ * This method runs validations on the data before serializing it.
+ * As such, it may throw an error if the data is invalid.
+ */
+ abstract toJSON(): APIApplicationCommandBasicOption;
+ /**
+ * This method runs required validators on this builder.
+ */
+ protected runRequiredValidations(): void;
+}
+
+/**
+ * A slash command attachment option.
+ */
+declare class SlashCommandAttachmentOption extends ApplicationCommandOptionBase {
+ /**
+ * The type of this option.
+ */
+ readonly type: ApplicationCommandOptionType.Attachment;
+ /**
+ * {@inheritDoc ApplicationCommandOptionBase.toJSON}
+ */
+ toJSON(): APIApplicationCommandAttachmentOption;
+}
+
+/**
+ * A slash command boolean option.
+ */
+declare class SlashCommandBooleanOption extends ApplicationCommandOptionBase {
+ /**
+ * The type of this option.
+ */
+ readonly type: ApplicationCommandOptionType.Boolean;
+ /**
+ * {@inheritDoc ApplicationCommandOptionBase.toJSON}
+ */
+ toJSON(): APIApplicationCommandBooleanOption;
+}
+
+/**
+ * The allowed channel types used for a channel option in a slash command builder.
+ *
+ * @privateRemarks This can't be dynamic because const enums are erased at runtime.
+ * @internal
+ */
+declare const allowedChannelTypes: readonly [ChannelType.GuildText, ChannelType.GuildVoice, ChannelType.GuildCategory, ChannelType.GuildAnnouncement, ChannelType.AnnouncementThread, ChannelType.PublicThread, ChannelType.PrivateThread, ChannelType.GuildStageVoice, ChannelType.GuildForum, ChannelType.GuildMedia];
+/**
+ * The type of allowed channel types used for a channel option.
+ */
+type ApplicationCommandOptionAllowedChannelTypes = (typeof allowedChannelTypes)[number];
+/**
+ * This mixin holds channel type symbols used for options.
+ */
+declare class ApplicationCommandOptionChannelTypesMixin {
+ /**
+ * The channel types of this option.
+ */
+ readonly channel_types?: ApplicationCommandOptionAllowedChannelTypes[];
+ /**
+ * Adds channel types to this option.
+ *
+ * @param channelTypes - The channel types
+ */
+ addChannelTypes(...channelTypes: RestOrArray): this;
+}
+
+/**
+ * A slash command channel option.
+ */
+declare class SlashCommandChannelOption extends ApplicationCommandOptionBase {
+ /**
+ * The type of this option.
+ */
+ readonly type: ApplicationCommandOptionType.Channel;
+ /**
+ * {@inheritDoc ApplicationCommandOptionBase.toJSON}
+ */
+ toJSON(): APIApplicationCommandChannelOption;
+}
+interface SlashCommandChannelOption extends ApplicationCommandOptionChannelTypesMixin {
+}
+
+/**
+ * This mixin holds minimum and maximum symbols used for options.
+ */
+declare abstract class ApplicationCommandNumericOptionMinMaxValueMixin {
+ /**
+ * The maximum value of this option.
+ */
+ readonly max_value?: number;
+ /**
+ * The minimum value of this option.
+ */
+ readonly min_value?: number;
+ /**
+ * Sets the maximum number value of this option.
+ *
+ * @param max - The maximum value this option can be
+ */
+ abstract setMaxValue(max: number): this;
+ /**
+ * Sets the minimum number value of this option.
+ *
+ * @param min - The minimum value this option can be
+ */
+ abstract setMinValue(min: number): this;
+}
+
+/**
+ * This mixin holds choices and autocomplete symbols used for options.
+ */
+declare class ApplicationCommandOptionWithAutocompleteMixin {
+ /**
+ * Whether this option utilizes autocomplete.
+ */
+ readonly autocomplete?: boolean;
+ /**
+ * The type of this option.
+ *
+ * @privateRemarks Since this is present and this is a mixin, this is needed.
+ */
+ readonly type: ApplicationCommandOptionType;
+ /**
+ * Whether this option uses autocomplete.
+ *
+ * @param autocomplete - Whether this option should use autocomplete
+ */
+ setAutocomplete(autocomplete: boolean): this;
+}
+
+/**
+ * This mixin holds choices and autocomplete symbols used for options.
+ */
+declare class ApplicationCommandOptionWithChoicesMixin {
+ /**
+ * The choices of this option.
+ */
+ readonly choices?: APIApplicationCommandOptionChoice[];
+ /**
+ * The type of this option.
+ *
+ * @privateRemarks Since this is present and this is a mixin, this is needed.
+ */
+ readonly type: ApplicationCommandOptionType;
+ /**
+ * Adds multiple choices to this option.
+ *
+ * @param choices - The choices to add
+ */
+ addChoices(...choices: RestOrArray>): this;
+ /**
+ * Sets multiple choices for this option.
+ *
+ * @param choices - The choices to set
+ */
+ setChoices>(...choices: RestOrArray): this;
+}
+
+/**
+ * A slash command integer option.
+ */
+declare class SlashCommandIntegerOption extends ApplicationCommandOptionBase implements ApplicationCommandNumericOptionMinMaxValueMixin {
+ /**
+ * The type of this option.
+ */
+ readonly type: ApplicationCommandOptionType.Integer;
+ /**
+ * {@inheritDoc ApplicationCommandNumericOptionMinMaxValueMixin.setMaxValue}
+ */
+ setMaxValue(max: number): this;
+ /**
+ * {@inheritDoc ApplicationCommandNumericOptionMinMaxValueMixin.setMinValue}
+ */
+ setMinValue(min: number): this;
+ /**
+ * {@inheritDoc ApplicationCommandOptionBase.toJSON}
+ */
+ toJSON(): APIApplicationCommandIntegerOption;
+}
+interface SlashCommandIntegerOption extends ApplicationCommandNumericOptionMinMaxValueMixin, ApplicationCommandOptionWithChoicesMixin, ApplicationCommandOptionWithAutocompleteMixin {
+}
+
+/**
+ * A slash command mentionable option.
+ */
+declare class SlashCommandMentionableOption extends ApplicationCommandOptionBase {
+ /**
+ * The type of this option.
+ */
+ readonly type: ApplicationCommandOptionType.Mentionable;
+ /**
+ * {@inheritDoc ApplicationCommandOptionBase.toJSON}
+ */
+ toJSON(): APIApplicationCommandMentionableOption;
+}
+
+/**
+ * A slash command number option.
+ */
+declare class SlashCommandNumberOption extends ApplicationCommandOptionBase implements ApplicationCommandNumericOptionMinMaxValueMixin {
+ /**
+ * The type of this option.
+ */
+ readonly type: ApplicationCommandOptionType.Number;
+ /**
+ * {@inheritDoc ApplicationCommandNumericOptionMinMaxValueMixin.setMaxValue}
+ */
+ setMaxValue(max: number): this;
+ /**
+ * {@inheritDoc ApplicationCommandNumericOptionMinMaxValueMixin.setMinValue}
+ */
+ setMinValue(min: number): this;
+ /**
+ * {@inheritDoc ApplicationCommandOptionBase.toJSON}
+ */
+ toJSON(): APIApplicationCommandNumberOption;
+}
+interface SlashCommandNumberOption extends ApplicationCommandNumericOptionMinMaxValueMixin, ApplicationCommandOptionWithChoicesMixin, ApplicationCommandOptionWithAutocompleteMixin {
+}
+
+/**
+ * A slash command role option.
+ */
+declare class SlashCommandRoleOption extends ApplicationCommandOptionBase {
+ /**
+ * The type of this option.
+ */
+ readonly type: ApplicationCommandOptionType.Role;
+ /**
+ * {@inheritDoc ApplicationCommandOptionBase.toJSON}
+ */
+ toJSON(): APIApplicationCommandRoleOption;
+}
+
+/**
+ * A slash command string option.
+ */
+declare class SlashCommandStringOption extends ApplicationCommandOptionBase {
+ /**
+ * The type of this option.
+ */
+ readonly type: ApplicationCommandOptionType.String;
+ /**
+ * The maximum length of this option.
+ */
+ readonly max_length?: number;
+ /**
+ * The minimum length of this option.
+ */
+ readonly min_length?: number;
+ /**
+ * Sets the maximum length of this string option.
+ *
+ * @param max - The maximum length this option can be
+ */
+ setMaxLength(max: number): this;
+ /**
+ * Sets the minimum length of this string option.
+ *
+ * @param min - The minimum length this option can be
+ */
+ setMinLength(min: number): this;
+ /**
+ * {@inheritDoc ApplicationCommandOptionBase.toJSON}
+ */
+ toJSON(): APIApplicationCommandStringOption;
+}
+interface SlashCommandStringOption extends ApplicationCommandOptionWithChoicesMixin, ApplicationCommandOptionWithAutocompleteMixin {
+}
+
+/**
+ * A slash command user option.
+ */
+declare class SlashCommandUserOption extends ApplicationCommandOptionBase {
+ /**
+ * The type of this option.
+ */
+ readonly type: ApplicationCommandOptionType.User;
+ /**
+ * {@inheritDoc ApplicationCommandOptionBase.toJSON}
+ */
+ toJSON(): APIApplicationCommandUserOption;
+}
+
+/**
+ * This mixin holds symbols that can be shared in slash command options.
+ *
+ * @typeParam TypeAfterAddingOptions - The type this class should return after adding an option.
+ */
+declare class SharedSlashCommandOptions> {
+ readonly options: ToAPIApplicationCommandOptions[];
+ /**
+ * Adds a boolean option.
+ *
+ * @param input - A function that returns an option builder or an already built builder
+ */
+ addBooleanOption(input: SlashCommandBooleanOption | ((builder: SlashCommandBooleanOption) => SlashCommandBooleanOption)): TypeAfterAddingOptions;
+ /**
+ * Adds a user option.
+ *
+ * @param input - A function that returns an option builder or an already built builder
+ */
+ addUserOption(input: SlashCommandUserOption | ((builder: SlashCommandUserOption) => SlashCommandUserOption)): TypeAfterAddingOptions;
+ /**
+ * Adds a channel option.
+ *
+ * @param input - A function that returns an option builder or an already built builder
+ */
+ addChannelOption(input: SlashCommandChannelOption | ((builder: SlashCommandChannelOption) => SlashCommandChannelOption)): TypeAfterAddingOptions;
+ /**
+ * Adds a role option.
+ *
+ * @param input - A function that returns an option builder or an already built builder
+ */
+ addRoleOption(input: SlashCommandRoleOption | ((builder: SlashCommandRoleOption) => SlashCommandRoleOption)): TypeAfterAddingOptions;
+ /**
+ * Adds an attachment option.
+ *
+ * @param input - A function that returns an option builder or an already built builder
+ */
+ addAttachmentOption(input: SlashCommandAttachmentOption | ((builder: SlashCommandAttachmentOption) => SlashCommandAttachmentOption)): TypeAfterAddingOptions;
+ /**
+ * Adds a mentionable option.
+ *
+ * @param input - A function that returns an option builder or an already built builder
+ */
+ addMentionableOption(input: SlashCommandMentionableOption | ((builder: SlashCommandMentionableOption) => SlashCommandMentionableOption)): TypeAfterAddingOptions;
+ /**
+ * Adds a string option.
+ *
+ * @param input - A function that returns an option builder or an already built builder
+ */
+ addStringOption(input: SlashCommandStringOption | ((builder: SlashCommandStringOption) => SlashCommandStringOption)): TypeAfterAddingOptions;
+ /**
+ * Adds an integer option.
+ *
+ * @param input - A function that returns an option builder or an already built builder
+ */
+ addIntegerOption(input: SlashCommandIntegerOption | ((builder: SlashCommandIntegerOption) => SlashCommandIntegerOption)): TypeAfterAddingOptions;
+ /**
+ * Adds a number option.
+ *
+ * @param input - A function that returns an option builder or an already built builder
+ */
+ addNumberOption(input: SlashCommandNumberOption | ((builder: SlashCommandNumberOption) => SlashCommandNumberOption)): TypeAfterAddingOptions;
+ /**
+ * Where the actual adding magic happens. ✨
+ *
+ * @param input - The input. What else?
+ * @param Instance - The instance of whatever is being added
+ * @internal
+ */
+ private _sharedAddOptionMethod;
+}
+
+/**
+ * Represents a folder for subcommands.
+ *
+ * @see {@link https://discord.com/developers/docs/interactions/application-commands#subcommands-and-subcommand-groups}
+ */
+declare class SlashCommandSubcommandGroupBuilder implements ToAPIApplicationCommandOptions {
+ /**
+ * The name of this subcommand group.
+ */
+ readonly name: string;
+ /**
+ * The description of this subcommand group.
+ */
+ readonly description: string;
+ /**
+ * The subcommands within this subcommand group.
+ */
+ readonly options: SlashCommandSubcommandBuilder[];
+ /**
+ * Adds a new subcommand to this group.
+ *
+ * @param input - A function that returns a subcommand builder or an already built builder
+ */
+ addSubcommand(input: SlashCommandSubcommandBuilder | ((subcommandGroup: SlashCommandSubcommandBuilder) => SlashCommandSubcommandBuilder)): this;
+ /**
+ * Serializes this builder to API-compatible JSON data.
+ *
+ * @remarks
+ * This method runs validations on the data before serializing it.
+ * As such, it may throw an error if the data is invalid.
+ */
+ toJSON(): APIApplicationCommandSubcommandGroupOption;
+}
+interface SlashCommandSubcommandGroupBuilder extends SharedNameAndDescription {
+}
+/**
+ * A builder that creates API-compatible JSON data for slash command subcommands.
+ *
+ * @see {@link https://discord.com/developers/docs/interactions/application-commands#subcommands-and-subcommand-groups}
+ */
+declare class SlashCommandSubcommandBuilder implements ToAPIApplicationCommandOptions {
+ /**
+ * The name of this subcommand.
+ */
+ readonly name: string;
+ /**
+ * The description of this subcommand.
+ */
+ readonly description: string;
+ /**
+ * The options within this subcommand.
+ */
+ readonly options: ApplicationCommandOptionBase[];
+ /**
+ * Serializes this builder to API-compatible JSON data.
+ *
+ * @remarks
+ * This method runs validations on the data before serializing it.
+ * As such, it may throw an error if the data is invalid.
+ */
+ toJSON(): APIApplicationCommandSubcommandOption;
+}
+interface SlashCommandSubcommandBuilder extends SharedNameAndDescription, SharedSlashCommandOptions {
+}
+
+/**
+ * This mixin holds symbols that can be shared in slash subcommands.
+ *
+ * @typeParam TypeAfterAddingSubcommands - The type this class should return after adding a subcommand or subcommand group.
+ */
+declare class SharedSlashCommandSubcommands> {
+ readonly options: ToAPIApplicationCommandOptions[];
+ /**
+ * Adds a new subcommand group to this command.
+ *
+ * @param input - A function that returns a subcommand group builder or an already built builder
+ */
+ addSubcommandGroup(input: SlashCommandSubcommandGroupBuilder | ((subcommandGroup: SlashCommandSubcommandGroupBuilder) => SlashCommandSubcommandGroupBuilder)): TypeAfterAddingSubcommands;
+ /**
+ * Adds a new subcommand to this command.
+ *
+ * @param input - A function that returns a subcommand builder or an already built builder
+ */
+ addSubcommand(input: SlashCommandSubcommandBuilder | ((subcommandGroup: SlashCommandSubcommandBuilder) => SlashCommandSubcommandBuilder)): TypeAfterAddingSubcommands;
+}
+
+/**
+ * A builder that creates API-compatible JSON data for slash commands.
+ */
+declare class SlashCommandBuilder {
+ /**
+ * The name of this command.
+ */
+ readonly name: string;
+ /**
+ * The name localizations of this command.
+ */
+ readonly name_localizations?: LocalizationMap;
+ /**
+ * The description of this command.
+ */
+ readonly description: string;
+ /**
+ * The description localizations of this command.
+ */
+ readonly description_localizations?: LocalizationMap;
+ /**
+ * The options of this command.
+ */
+ readonly options: ToAPIApplicationCommandOptions[];
+ /**
+ * Whether this command is enabled by default when the application is added to a guild.
+ *
+ * @deprecated Use {@link SharedSlashCommand.setDefaultMemberPermissions} or {@link SharedSlashCommand.setDMPermission} instead.
+ */
+ readonly default_permission: boolean | undefined;
+ /**
+ * The set of permissions represented as a bit set for the command.
+ */
+ readonly default_member_permissions: Permissions | null | undefined;
+ /**
+ * Indicates whether the command is available in direct messages with the application.
+ *
+ * @remarks
+ * By default, commands are visible. This property is only for global commands.
+ */
+ readonly dm_permission: boolean | undefined;
+ /**
+ * Whether this command is NSFW.
+ */
+ readonly nsfw: boolean | undefined;
+}
+interface SlashCommandBuilder extends SharedNameAndDescription, SharedSlashCommandOptions, SharedSlashCommandSubcommands, SharedSlashCommand {
+}
+/**
+ * An interface specifically for slash command subcommands.
+ */
+interface SlashCommandSubcommandsOnlyBuilder extends SharedNameAndDescription, SharedSlashCommandSubcommands, SharedSlashCommand {
+}
+/**
+ * An interface specifically for slash command options.
+ */
+interface SlashCommandOptionsOnlyBuilder extends SharedNameAndDescription, SharedSlashCommandOptions, SharedSlashCommand {
+}
+/**
+ * An interface that ensures the `toJSON()` call will return something
+ * that can be serialized into API-compatible data.
+ */
+interface ToAPIApplicationCommandOptions {
+ toJSON(): APIApplicationCommandOption;
+}
+
+declare function validateName$1(name: unknown): asserts name is string;
+declare function validateDescription(description: unknown): asserts description is string;
+declare function validateLocale(locale: unknown): Locale;
+declare function validateMaxOptionsLength(options: unknown): asserts options is ToAPIApplicationCommandOptions[];
+declare function validateRequiredParameters$1(name: string, description: string, options: ToAPIApplicationCommandOptions[]): void;
+declare function validateDefaultPermission$1(value: unknown): asserts value is boolean;
+declare function validateRequired(required: unknown): asserts required is boolean;
+declare function validateChoicesLength(amountAdding: number, choices?: APIApplicationCommandOptionChoice[]): void;
+declare function assertReturnOfBuilder(input: unknown, ExpectedInstanceOf: new () => ReturnType): asserts input is ReturnType;
+declare const localizationMapPredicate: _sapphire_shapeshift.UnionValidator<_sapphire_shapeshift.UndefinedToOptional>> | null | undefined>;
+declare function validateLocalizationMap(value: unknown): asserts value is LocalizationMap;
+declare function validateDMPermission$1(value: unknown): asserts value is boolean | null | undefined;
+declare function validateDefaultMemberPermissions$1(permissions: unknown): string | null | undefined;
+declare function validateNSFW(value: unknown): asserts value is boolean;
+
+declare const Assertions$1_assertReturnOfBuilder: typeof assertReturnOfBuilder;
+declare const Assertions$1_localizationMapPredicate: typeof localizationMapPredicate;
+declare const Assertions$1_validateChoicesLength: typeof validateChoicesLength;
+declare const Assertions$1_validateDescription: typeof validateDescription;
+declare const Assertions$1_validateLocale: typeof validateLocale;
+declare const Assertions$1_validateLocalizationMap: typeof validateLocalizationMap;
+declare const Assertions$1_validateMaxOptionsLength: typeof validateMaxOptionsLength;
+declare const Assertions$1_validateNSFW: typeof validateNSFW;
+declare const Assertions$1_validateRequired: typeof validateRequired;
+declare namespace Assertions$1 {
+ export { Assertions$1_assertReturnOfBuilder as assertReturnOfBuilder, Assertions$1_localizationMapPredicate as localizationMapPredicate, Assertions$1_validateChoicesLength as validateChoicesLength, validateDMPermission$1 as validateDMPermission, validateDefaultMemberPermissions$1 as validateDefaultMemberPermissions, validateDefaultPermission$1 as validateDefaultPermission, Assertions$1_validateDescription as validateDescription, Assertions$1_validateLocale as validateLocale, Assertions$1_validateLocalizationMap as validateLocalizationMap, Assertions$1_validateMaxOptionsLength as validateMaxOptionsLength, Assertions$1_validateNSFW as validateNSFW, validateName$1 as validateName, Assertions$1_validateRequired as validateRequired, validateRequiredParameters$1 as validateRequiredParameters };
+}
+
+/**
+ * The type a context menu command can be.
+ */
+type ContextMenuCommandType = ApplicationCommandType.Message | ApplicationCommandType.User;
+/**
+ * A builder that creates API-compatible JSON data for context menu commands.
+ */
+declare class ContextMenuCommandBuilder {
+ /**
+ * The name of this command.
+ */
+ readonly name: string;
+ /**
+ * The name localizations of this command.
+ */
+ readonly name_localizations?: LocalizationMap;
+ /**
+ * The type of this command.
+ */
+ readonly type: ContextMenuCommandType;
+ /**
+ * Whether this command is enabled by default when the application is added to a guild.
+ *
+ * @deprecated Use {@link ContextMenuCommandBuilder.setDefaultMemberPermissions} or {@link ContextMenuCommandBuilder.setDMPermission} instead.
+ */
+ readonly default_permission: boolean | undefined;
+ /**
+ * The set of permissions represented as a bit set for the command.
+ */
+ readonly default_member_permissions: Permissions | null | undefined;
+ /**
+ * Indicates whether the command is available in direct messages with the application.
+ *
+ * @remarks
+ * By default, commands are visible. This property is only for global commands.
+ */
+ readonly dm_permission: boolean | undefined;
+ /**
+ * Sets the name of this command.
+ *
+ * @param name - The name to use
+ */
+ setName(name: string): this;
+ /**
+ * Sets the type of this command.
+ *
+ * @param type - The type to use
+ */
+ setType(type: ContextMenuCommandType): this;
+ /**
+ * Sets whether the command is enabled by default when the application is added to a guild.
+ *
+ * @remarks
+ * If set to `false`, you will have to later `PUT` the permissions for this command.
+ * @param value - Whether to enable this command by default
+ * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}
+ * @deprecated Use {@link ContextMenuCommandBuilder.setDefaultMemberPermissions} or {@link ContextMenuCommandBuilder.setDMPermission} instead.
+ */
+ setDefaultPermission(value: boolean): this;
+ /**
+ * Sets the default permissions a member should have in order to run this command.
+ *
+ * @remarks
+ * You can set this to `'0'` to disable the command by default.
+ * @param permissions - The permissions bit field to set
+ * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}
+ */
+ setDefaultMemberPermissions(permissions: Permissions | bigint | number | null | undefined): this;
+ /**
+ * Sets if the command is available in direct messages with the application.
+ *
+ * @remarks
+ * By default, commands are visible. This method is only for global commands.
+ * @param enabled - Whether the command should be enabled in direct messages
+ * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}
+ */
+ setDMPermission(enabled: boolean | null | undefined): this;
+ /**
+ * Sets a name localization for this command.
+ *
+ * @param locale - The locale to set
+ * @param localizedName - The localized name for the given `locale`
+ */
+ setNameLocalization(locale: LocaleString, localizedName: string | null): this;
+ /**
+ * Sets the name localizations for this command.
+ *
+ * @param localizedNames - The object of localized names to set
+ */
+ setNameLocalizations(localizedNames: LocalizationMap | null): this;
+ /**
+ * Serializes this builder to API-compatible JSON data.
+ *
+ * @remarks
+ * This method runs validations on the data before serializing it.
+ * As such, it may throw an error if the data is invalid.
+ */
+ toJSON(): RESTPostAPIContextMenuApplicationCommandsJSONBody;
+}
+
+declare function validateDefaultPermission(value: unknown): asserts value is boolean;
+declare function validateName(name: unknown): asserts name is string;
+declare function validateType(type: unknown): asserts type is ContextMenuCommandType;
+declare function validateRequiredParameters(name: string, type: number): void;
+declare function validateDMPermission(value: unknown): asserts value is boolean | null | undefined;
+declare function validateDefaultMemberPermissions(permissions: unknown): string | null | undefined;
+
+declare const Assertions_validateDMPermission: typeof validateDMPermission;
+declare const Assertions_validateDefaultMemberPermissions: typeof validateDefaultMemberPermissions;
+declare const Assertions_validateDefaultPermission: typeof validateDefaultPermission;
+declare const Assertions_validateName: typeof validateName;
+declare const Assertions_validateRequiredParameters: typeof validateRequiredParameters;
+declare const Assertions_validateType: typeof validateType;
+declare namespace Assertions {
+ export { Assertions_validateDMPermission as validateDMPermission, Assertions_validateDefaultMemberPermissions as validateDefaultMemberPermissions, Assertions_validateDefaultPermission as validateDefaultPermission, Assertions_validateName as validateName, Assertions_validateRequiredParameters as validateRequiredParameters, Assertions_validateType as validateType };
+}
+
+/**
+ * Calculates the length of the embed.
+ *
+ * @param data - The embed data to check
+ */
+declare function embedLength(data: APIEmbed): number;
+
+/**
+ * Enables validators.
+ *
+ * @returns Whether validation is occurring.
+ */
+declare function enableValidators(): boolean;
+/**
+ * Disables validators.
+ *
+ * @returns Whether validation is occurring.
+ */
+declare function disableValidators(): boolean;
+/**
+ * Checks whether validation is occurring.
+ */
+declare function isValidationEnabled(): boolean;
+
+/**
+ * The {@link https://github.com/discordjs/discord.js/blob/main/packages/builders#readme | @discordjs/builders} version
+ * that you are currently using.
+ *
+ * @privateRemarks This needs to explicitly be `string` so it is not typed as a "const string" that gets injected by esbuild.
+ */
+declare const version: string;
+
+export { ActionRowBuilder, type AnyAPIActionRowComponent, type AnyComponentBuilder, ApplicationCommandNumericOptionMinMaxValueMixin, type ApplicationCommandOptionAllowedChannelTypes, ApplicationCommandOptionBase, ApplicationCommandOptionChannelTypesMixin, ApplicationCommandOptionWithAutocompleteMixin, ApplicationCommandOptionWithChoicesMixin, BaseSelectMenuBuilder, ButtonBuilder, ChannelSelectMenuBuilder, Assertions$4 as ComponentAssertions, ComponentBuilder, Assertions as ContextMenuCommandAssertions, ContextMenuCommandBuilder, type ContextMenuCommandType, Assertions$5 as EmbedAssertions, type EmbedAuthorData, type EmbedAuthorOptions, EmbedBuilder, type EmbedFooterData, type EmbedFooterOptions, type EmbedImageData, type IconData, type MappedComponentTypes, MentionableSelectMenuBuilder, type MessageActionRowComponentBuilder, type MessageComponentBuilder, type ModalActionRowComponentBuilder, Assertions$2 as ModalAssertions, ModalBuilder, type ModalComponentBuilder, type RGBTuple, type RestOrArray, RoleSelectMenuBuilder, StringSelectMenuBuilder as SelectMenuBuilder, StringSelectMenuOptionBuilder as SelectMenuOptionBuilder, SharedNameAndDescription, SharedSlashCommand, SharedSlashCommandOptions, SharedSlashCommandSubcommands, Assertions$1 as SlashCommandAssertions, SlashCommandAttachmentOption, SlashCommandBooleanOption, SlashCommandBuilder, SlashCommandChannelOption, SlashCommandIntegerOption, SlashCommandMentionableOption, SlashCommandNumberOption, type SlashCommandOptionsOnlyBuilder, SlashCommandRoleOption, SlashCommandStringOption, SlashCommandSubcommandBuilder, SlashCommandSubcommandGroupBuilder, type SlashCommandSubcommandsOnlyBuilder, SlashCommandUserOption, StringSelectMenuBuilder, StringSelectMenuOptionBuilder, Assertions$3 as TextInputAssertions, TextInputBuilder, type ToAPIApplicationCommandOptions, UserSelectMenuBuilder, createComponentBuilder, disableValidators, embedLength, enableValidators, isValidationEnabled, normalizeArray, version };
diff --git a/node_modules/@discordjs/builders/dist/index.d.ts b/node_modules/@discordjs/builders/dist/index.d.ts
new file mode 100644
index 0000000..d129ca5
--- /dev/null
+++ b/node_modules/@discordjs/builders/dist/index.d.ts
@@ -0,0 +1,1971 @@
+import * as _sapphire_shapeshift from '@sapphire/shapeshift';
+import { APIEmbedField, APIEmbedAuthor, APIEmbedFooter, APIEmbedImage, APIEmbed, APISelectMenuOption, APIMessageComponentEmoji, ButtonStyle, ChannelType, APIActionRowComponent, APIActionRowComponentTypes, APIBaseComponent, ComponentType, APIButtonComponent, APISelectMenuComponent, APIChannelSelectComponent, Snowflake, APIMentionableSelectComponent, APISelectMenuDefaultValue, SelectMenuDefaultValueType, APIRoleSelectComponent, APIStringSelectComponent, APIUserSelectComponent, APITextInputComponent, TextInputStyle, APIMessageActionRowComponent, APIModalActionRowComponent, APIModalComponent, APIMessageComponent, APIModalInteractionResponseCallbackData, LocalizationMap, LocaleString, Permissions, RESTPostAPIChatInputApplicationCommandsJSONBody, ApplicationCommandOptionType, APIApplicationCommandBasicOption, APIApplicationCommandAttachmentOption, APIApplicationCommandBooleanOption, APIApplicationCommandChannelOption, APIApplicationCommandOptionChoice, APIApplicationCommandIntegerOption, APIApplicationCommandMentionableOption, APIApplicationCommandNumberOption, APIApplicationCommandRoleOption, APIApplicationCommandStringOption, APIApplicationCommandUserOption, APIApplicationCommandSubcommandGroupOption, APIApplicationCommandSubcommandOption, APIApplicationCommandOption, Locale, ApplicationCommandType, RESTPostAPIContextMenuApplicationCommandsJSONBody } from 'discord-api-types/v10';
+export * from '@discordjs/formatters';
+import { JSONEncodable, Equatable } from '@discordjs/util';
+
+declare const fieldNamePredicate: _sapphire_shapeshift.StringValidator;
+declare const fieldValuePredicate: _sapphire_shapeshift.StringValidator;
+declare const fieldInlinePredicate: _sapphire_shapeshift.UnionValidator;
+declare const embedFieldPredicate: _sapphire_shapeshift.ObjectValidator<{
+ name: string;
+ value: string;
+ inline: boolean | undefined;
+}, _sapphire_shapeshift.UndefinedToOptional<{
+ name: string;
+ value: string;
+ inline: boolean | undefined;
+}>>;
+declare const embedFieldsArrayPredicate: _sapphire_shapeshift.ArrayValidator<_sapphire_shapeshift.UndefinedToOptional<{
+ name: string;
+ value: string;
+ inline: boolean | undefined;
+}>[], _sapphire_shapeshift.UndefinedToOptional<{
+ name: string;
+ value: string;
+ inline: boolean | undefined;
+}>>;
+declare const fieldLengthPredicate: _sapphire_shapeshift.NumberValidator;
+declare function validateFieldLength(amountAdding: number, fields?: APIEmbedField[]): void;
+declare const authorNamePredicate: _sapphire_shapeshift.UnionValidator;
+declare const imageURLPredicate: _sapphire_shapeshift.UnionValidator;
+declare const urlPredicate: _sapphire_shapeshift.UnionValidator;
+declare const embedAuthorPredicate: _sapphire_shapeshift.ObjectValidator<{
+ name: string | null;
+ iconURL: string | null | undefined;
+ url: string | null | undefined;
+}, _sapphire_shapeshift.UndefinedToOptional<{
+ name: string | null;
+ iconURL: string | null | undefined;
+ url: string | null | undefined;
+}>>;
+declare const RGBPredicate: _sapphire_shapeshift.NumberValidator;
+declare const colorPredicate: _sapphire_shapeshift.UnionValidator;
+declare const descriptionPredicate: _sapphire_shapeshift.UnionValidator;
+declare const footerTextPredicate: _sapphire_shapeshift.UnionValidator;
+declare const embedFooterPredicate: _sapphire_shapeshift.ObjectValidator<{
+ text: string | null;
+ iconURL: string | null | undefined;
+}, _sapphire_shapeshift.UndefinedToOptional<{
+ text: string | null;
+ iconURL: string | null | undefined;
+}>>;
+declare const timestampPredicate: _sapphire_shapeshift.UnionValidator;
+declare const titlePredicate: _sapphire_shapeshift.UnionValidator;
+
+declare const Assertions$5_RGBPredicate: typeof RGBPredicate;
+declare const Assertions$5_authorNamePredicate: typeof authorNamePredicate;
+declare const Assertions$5_colorPredicate: typeof colorPredicate;
+declare const Assertions$5_descriptionPredicate: typeof descriptionPredicate;
+declare const Assertions$5_embedAuthorPredicate: typeof embedAuthorPredicate;
+declare const Assertions$5_embedFieldPredicate: typeof embedFieldPredicate;
+declare const Assertions$5_embedFieldsArrayPredicate: typeof embedFieldsArrayPredicate;
+declare const Assertions$5_embedFooterPredicate: typeof embedFooterPredicate;
+declare const Assertions$5_fieldInlinePredicate: typeof fieldInlinePredicate;
+declare const Assertions$5_fieldLengthPredicate: typeof fieldLengthPredicate;
+declare const Assertions$5_fieldNamePredicate: typeof fieldNamePredicate;
+declare const Assertions$5_fieldValuePredicate: typeof fieldValuePredicate;
+declare const Assertions$5_footerTextPredicate: typeof footerTextPredicate;
+declare const Assertions$5_imageURLPredicate: typeof imageURLPredicate;
+declare const Assertions$5_timestampPredicate: typeof timestampPredicate;
+declare const Assertions$5_titlePredicate: typeof titlePredicate;
+declare const Assertions$5_urlPredicate: typeof urlPredicate;
+declare const Assertions$5_validateFieldLength: typeof validateFieldLength;
+declare namespace Assertions$5 {
+ export { Assertions$5_RGBPredicate as RGBPredicate, Assertions$5_authorNamePredicate as authorNamePredicate, Assertions$5_colorPredicate as colorPredicate, Assertions$5_descriptionPredicate as descriptionPredicate, Assertions$5_embedAuthorPredicate as embedAuthorPredicate, Assertions$5_embedFieldPredicate as embedFieldPredicate, Assertions$5_embedFieldsArrayPredicate as embedFieldsArrayPredicate, Assertions$5_embedFooterPredicate as embedFooterPredicate, Assertions$5_fieldInlinePredicate as fieldInlinePredicate, Assertions$5_fieldLengthPredicate as fieldLengthPredicate, Assertions$5_fieldNamePredicate as fieldNamePredicate, Assertions$5_fieldValuePredicate as fieldValuePredicate, Assertions$5_footerTextPredicate as footerTextPredicate, Assertions$5_imageURLPredicate as imageURLPredicate, Assertions$5_timestampPredicate as timestampPredicate, Assertions$5_titlePredicate as titlePredicate, Assertions$5_urlPredicate as urlPredicate, Assertions$5_validateFieldLength as validateFieldLength };
+}
+
+/**
+ * Normalizes data that is a rest parameter or an array into an array with a depth of 1.
+ *
+ * @typeParam ItemType - The data that must satisfy {@link RestOrArray}.
+ * @param arr - The (possibly variadic) data to normalize
+ */
+declare function normalizeArray(arr: RestOrArray): ItemType[];
+/**
+ * Represents data that may be an array or came from a rest parameter.
+ *
+ * @remarks
+ * This type is used throughout builders to ensure both an array and variadic arguments
+ * may be used. It is normalized with {@link normalizeArray}.
+ */
+type RestOrArray = Type[] | [Type[]];
+
+/**
+ * A tuple satisfying the RGB color model.
+ *
+ * @see {@link https://developer.mozilla.org/docs/Glossary/RGB}
+ */
+type RGBTuple = [red: number, green: number, blue: number];
+/**
+ * The base icon data typically used in payloads.
+ */
+interface IconData {
+ /**
+ * The URL of the icon.
+ */
+ iconURL?: string;
+ /**
+ * The proxy URL of the icon.
+ */
+ proxyIconURL?: string;
+}
+/**
+ * Represents the author data of an embed.
+ */
+interface EmbedAuthorData extends IconData, Omit {
+}
+/**
+ * Represents the author options of an embed.
+ */
+interface EmbedAuthorOptions extends Omit {
+}
+/**
+ * Represents the footer data of an embed.
+ */
+interface EmbedFooterData extends IconData, Omit {
+}
+/**
+ * Represents the footer options of an embed.
+ */
+interface EmbedFooterOptions extends Omit {
+}
+/**
+ * Represents the image data of an embed.
+ */
+interface EmbedImageData extends Omit {
+ /**
+ * The proxy URL for the image.
+ */
+ proxyURL?: string;
+}
+/**
+ * A builder that creates API-compatible JSON data for embeds.
+ */
+declare class EmbedBuilder {
+ /**
+ * The API data associated with this embed.
+ */
+ readonly data: APIEmbed;
+ /**
+ * Creates a new embed from API data.
+ *
+ * @param data - The API data to create this embed with
+ */
+ constructor(data?: APIEmbed);
+ /**
+ * Appends fields to the embed.
+ *
+ * @remarks
+ * This method accepts either an array of fields or a variable number of field parameters.
+ * The maximum amount of fields that can be added is 25.
+ * @example
+ * Using an array:
+ * ```ts
+ * const fields: APIEmbedField[] = ...;
+ * const embed = new EmbedBuilder()
+ * .addFields(fields);
+ * ```
+ * @example
+ * Using rest parameters (variadic):
+ * ```ts
+ * const embed = new EmbedBuilder()
+ * .addFields(
+ * { name: 'Field 1', value: 'Value 1' },
+ * { name: 'Field 2', value: 'Value 2' },
+ * );
+ * ```
+ * @param fields - The fields to add
+ */
+ addFields(...fields: RestOrArray): this;
+ /**
+ * Removes, replaces, or inserts fields for this embed.
+ *
+ * @remarks
+ * This method behaves similarly
+ * to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice | Array.prototype.splice()}.
+ * The maximum amount of fields that can be added is 25.
+ *
+ * It's useful for modifying and adjusting order of the already-existing fields of an embed.
+ * @example
+ * Remove the first field:
+ * ```ts
+ * embed.spliceFields(0, 1);
+ * ```
+ * @example
+ * Remove the first n fields:
+ * ```ts
+ * const n = 4;
+ * embed.spliceFields(0, n);
+ * ```
+ * @example
+ * Remove the last field:
+ * ```ts
+ * embed.spliceFields(-1, 1);
+ * ```
+ * @param index - The index to start at
+ * @param deleteCount - The number of fields to remove
+ * @param fields - The replacing field objects
+ */
+ spliceFields(index: number, deleteCount: number, ...fields: APIEmbedField[]): this;
+ /**
+ * Sets the fields for this embed.
+ *
+ * @remarks
+ * This method is an alias for {@link EmbedBuilder.spliceFields}. More specifically,
+ * it splices the entire array of fields, replacing them with the provided fields.
+ *
+ * You can set a maximum of 25 fields.
+ * @param fields - The fields to set
+ */
+ setFields(...fields: RestOrArray): this;
+ /**
+ * Sets the author of this embed.
+ *
+ * @param options - The options to use
+ */
+ setAuthor(options: EmbedAuthorOptions | null): this;
+ /**
+ * Sets the color of this embed.
+ *
+ * @param color - The color to use
+ */
+ setColor(color: RGBTuple | number | null): this;
+ /**
+ * Sets the description of this embed.
+ *
+ * @param description - The description to use
+ */
+ setDescription(description: string | null): this;
+ /**
+ * Sets the footer of this embed.
+ *
+ * @param options - The footer to use
+ */
+ setFooter(options: EmbedFooterOptions | null): this;
+ /**
+ * Sets the image of this embed.
+ *
+ * @param url - The image URL to use
+ */
+ setImage(url: string | null): this;
+ /**
+ * Sets the thumbnail of this embed.
+ *
+ * @param url - The thumbnail URL to use
+ */
+ setThumbnail(url: string | null): this;
+ /**
+ * Sets the timestamp of this embed.
+ *
+ * @param timestamp - The timestamp or date to use
+ */
+ setTimestamp(timestamp?: Date | number | null): this;
+ /**
+ * Sets the title for this embed.
+ *
+ * @param title - The title to use
+ */
+ setTitle(title: string | null): this;
+ /**
+ * Sets the URL of this embed.
+ *
+ * @param url - The URL to use
+ */
+ setURL(url: string | null): this;
+ /**
+ * Serializes this builder to API-compatible JSON data.
+ *
+ * @remarks
+ * This method runs validations on the data before serializing it.
+ * As such, it may throw an error if the data is invalid.
+ */
+ toJSON(): APIEmbed;
+}
+
+/**
+ * A builder that creates API-compatible JSON data for string select menu options.
+ */
+declare class StringSelectMenuOptionBuilder implements JSONEncodable {
+ data: Partial;
+ /**
+ * Creates a new string select menu option from API data.
+ *
+ * @param data - The API data to create this string select menu option with
+ * @example
+ * Creating a string select menu option from an API data object:
+ * ```ts
+ * const selectMenuOption = new SelectMenuOptionBuilder({
+ * label: 'catchy label',
+ * value: '1',
+ * });
+ * ```
+ * @example
+ * Creating a string select menu option using setters and API data:
+ * ```ts
+ * const selectMenuOption = new SelectMenuOptionBuilder({
+ * default: true,
+ * value: '1',
+ * })
+ * .setLabel('woah');
+ * ```
+ */
+ constructor(data?: Partial);
+ /**
+ * Sets the label for this option.
+ *
+ * @param label - The label to use
+ */
+ setLabel(label: string): this;
+ /**
+ * Sets the value for this option.
+ *
+ * @param value - The value to use
+ */
+ setValue(value: string): this;
+ /**
+ * Sets the description for this option.
+ *
+ * @param description - The description to use
+ */
+ setDescription(description: string): this;
+ /**
+ * Sets whether this option is selected by default.
+ *
+ * @param isDefault - Whether this option is selected by default
+ */
+ setDefault(isDefault?: boolean): this;
+ /**
+ * Sets the emoji to display for this option.
+ *
+ * @param emoji - The emoji to use
+ */
+ setEmoji(emoji: APIMessageComponentEmoji): this;
+ /**
+ * {@inheritDoc BaseSelectMenuBuilder.toJSON}
+ */
+ toJSON(): APISelectMenuOption;
+}
+
+declare const customIdValidator: _sapphire_shapeshift.StringValidator;
+declare const emojiValidator: _sapphire_shapeshift.ObjectValidator<{
+ name?: string | undefined;
+ id?: string | undefined;
+ animated?: boolean | undefined;
+}, _sapphire_shapeshift.UndefinedToOptional<{
+ name?: string | undefined;
+ id?: string | undefined;
+ animated?: boolean | undefined;
+}>>;
+declare const disabledValidator: _sapphire_shapeshift.BooleanValidator;
+declare const buttonLabelValidator: _sapphire_shapeshift.StringValidator;
+declare const buttonStyleValidator: _sapphire_shapeshift.NativeEnumValidator;
+declare const placeholderValidator$1: _sapphire_shapeshift.StringValidator;
+declare const minMaxValidator: _sapphire_shapeshift.NumberValidator;
+declare const labelValueDescriptionValidator: _sapphire_shapeshift.StringValidator;
+declare const jsonOptionValidator: _sapphire_shapeshift.ObjectValidator<{
+ label: string;
+ value: string;
+ description: string | undefined;
+ emoji: _sapphire_shapeshift.UndefinedToOptional<{
+ name?: string | undefined;
+ id?: string | undefined;
+ animated?: boolean | undefined;
+ }> | undefined;
+ default: boolean | undefined;
+}, _sapphire_shapeshift.UndefinedToOptional<{
+ label: string;
+ value: string;
+ description: string | undefined;
+ emoji: _sapphire_shapeshift.UndefinedToOptional<{
+ name?: string | undefined;
+ id?: string | undefined;
+ animated?: boolean | undefined;
+ }> | undefined;
+ default: boolean | undefined;
+}>>;
+declare const optionValidator: _sapphire_shapeshift.InstanceValidator;
+declare const optionsValidator: _sapphire_shapeshift.ArrayValidator;
+declare const optionsLengthValidator: _sapphire_shapeshift.NumberValidator;
+declare function validateRequiredSelectMenuParameters(options: StringSelectMenuOptionBuilder[], customId?: string): void;
+declare const defaultValidator: _sapphire_shapeshift.BooleanValidator;
+declare function validateRequiredSelectMenuOptionParameters(label?: string, value?: string): void;
+declare const channelTypesValidator: _sapphire_shapeshift.ArrayValidator;
+declare const urlValidator: _sapphire_shapeshift.StringValidator;
+declare function validateRequiredButtonParameters(style?: ButtonStyle, label?: string, emoji?: APIMessageComponentEmoji, customId?: string, url?: string): void;
+
+declare const Assertions$4_buttonLabelValidator: typeof buttonLabelValidator;
+declare const Assertions$4_buttonStyleValidator: typeof buttonStyleValidator;
+declare const Assertions$4_channelTypesValidator: typeof channelTypesValidator;
+declare const Assertions$4_customIdValidator: typeof customIdValidator;
+declare const Assertions$4_defaultValidator: typeof defaultValidator;
+declare const Assertions$4_disabledValidator: typeof disabledValidator;
+declare const Assertions$4_emojiValidator: typeof emojiValidator;
+declare const Assertions$4_jsonOptionValidator: typeof jsonOptionValidator;
+declare const Assertions$4_labelValueDescriptionValidator: typeof labelValueDescriptionValidator;
+declare const Assertions$4_minMaxValidator: typeof minMaxValidator;
+declare const Assertions$4_optionValidator: typeof optionValidator;
+declare const Assertions$4_optionsLengthValidator: typeof optionsLengthValidator;
+declare const Assertions$4_optionsValidator: typeof optionsValidator;
+declare const Assertions$4_urlValidator: typeof urlValidator;
+declare const Assertions$4_validateRequiredButtonParameters: typeof validateRequiredButtonParameters;
+declare const Assertions$4_validateRequiredSelectMenuOptionParameters: typeof validateRequiredSelectMenuOptionParameters;
+declare const Assertions$4_validateRequiredSelectMenuParameters: typeof validateRequiredSelectMenuParameters;
+declare namespace Assertions$4 {
+ export { Assertions$4_buttonLabelValidator as buttonLabelValidator, Assertions$4_buttonStyleValidator as buttonStyleValidator, Assertions$4_channelTypesValidator as channelTypesValidator, Assertions$4_customIdValidator as customIdValidator, Assertions$4_defaultValidator as defaultValidator, Assertions$4_disabledValidator as disabledValidator, Assertions$4_emojiValidator as emojiValidator, Assertions$4_jsonOptionValidator as jsonOptionValidator, Assertions$4_labelValueDescriptionValidator as labelValueDescriptionValidator, Assertions$4_minMaxValidator as minMaxValidator, Assertions$4_optionValidator as optionValidator, Assertions$4_optionsLengthValidator as optionsLengthValidator, Assertions$4_optionsValidator as optionsValidator, placeholderValidator$1 as placeholderValidator, Assertions$4_urlValidator as urlValidator, Assertions$4_validateRequiredButtonParameters as validateRequiredButtonParameters, Assertions$4_validateRequiredSelectMenuOptionParameters as validateRequiredSelectMenuOptionParameters, Assertions$4_validateRequiredSelectMenuParameters as validateRequiredSelectMenuParameters };
+}
+
+/**
+ * Any action row component data represented as an object.
+ */
+type AnyAPIActionRowComponent = APIActionRowComponent | APIActionRowComponentTypes;
+/**
+ * The base component builder that contains common symbols for all sorts of components.
+ *
+ * @typeParam DataType - The type of internal API data that is stored within the component
+ */
+declare abstract class ComponentBuilder> = APIBaseComponent> implements JSONEncodable {
+ /**
+ * The API data associated with this component.
+ */
+ readonly data: Partial;
+ /**
+ * Serializes this builder to API-compatible JSON data.
+ *
+ * @remarks
+ * This method runs validations on the data before serializing it.
+ * As such, it may throw an error if the data is invalid.
+ */
+ abstract toJSON(): AnyAPIActionRowComponent;
+ /**
+ * Constructs a new kind of component.
+ *
+ * @param data - The data to construct a component out of
+ */
+ constructor(data: Partial);
+}
+
+/**
+ * A builder that creates API-compatible JSON data for buttons.
+ */
+declare class ButtonBuilder extends ComponentBuilder {
+ /**
+ * Creates a new button from API data.
+ *
+ * @param data - The API data to create this button with
+ * @example
+ * Creating a button from an API data object:
+ * ```ts
+ * const button = new ButtonBuilder({
+ * custom_id: 'a cool button',
+ * style: ButtonStyle.Primary,
+ * label: 'Click Me',
+ * emoji: {
+ * name: 'smile',
+ * id: '123456789012345678',
+ * },
+ * });
+ * ```
+ * @example
+ * Creating a button using setters and API data:
+ * ```ts
+ * const button = new ButtonBuilder({
+ * style: ButtonStyle.Secondary,
+ * label: 'Click Me',
+ * })
+ * .setEmoji({ name: '🙂' })
+ * .setCustomId('another cool button');
+ * ```
+ */
+ constructor(data?: Partial);
+ /**
+ * Sets the style of this button.
+ *
+ * @param style - The style to use
+ */
+ setStyle(style: ButtonStyle): this;
+ /**
+ * Sets the URL for this button.
+ *
+ * @remarks
+ * This method is only available to buttons using the `Link` button style.
+ * Only three types of URL schemes are currently supported: `https://`, `http://`, and `discord://`.
+ * @param url - The URL to use
+ */
+ setURL(url: string): this;
+ /**
+ * Sets the custom id for this button.
+ *
+ * @remarks
+ * This method is only applicable to buttons that are not using the `Link` button style.
+ * @param customId - The custom id to use
+ */
+ setCustomId(customId: string): this;
+ /**
+ * Sets the emoji to display on this button.
+ *
+ * @param emoji - The emoji to use
+ */
+ setEmoji(emoji: APIMessageComponentEmoji): this;
+ /**
+ * Sets whether this button is disabled.
+ *
+ * @param disabled - Whether to disable this button
+ */
+ setDisabled(disabled?: boolean): this;
+ /**
+ * Sets the label for this button.
+ *
+ * @param label - The label to use
+ */
+ setLabel(label: string): this;
+ /**
+ * {@inheritDoc ComponentBuilder.toJSON}
+ */
+ toJSON(): APIButtonComponent;
+}
+
+/**
+ * The base select menu builder that contains common symbols for select menu builders.
+ *
+ * @typeParam SelectMenuType - The type of select menu this would be instantiated for.
+ */
+declare abstract class BaseSelectMenuBuilder extends ComponentBuilder {
+ /**
+ * Sets the placeholder for this select menu.
+ *
+ * @param placeholder - The placeholder to use
+ */
+ setPlaceholder(placeholder: string): this;
+ /**
+ * Sets the minimum values that must be selected in the select menu.
+ *
+ * @param minValues - The minimum values that must be selected
+ */
+ setMinValues(minValues: number): this;
+ /**
+ * Sets the maximum values that must be selected in the select menu.
+ *
+ * @param maxValues - The maximum values that must be selected
+ */
+ setMaxValues(maxValues: number): this;
+ /**
+ * Sets the custom id for this select menu.
+ *
+ * @param customId - The custom id to use
+ */
+ setCustomId(customId: string): this;
+ /**
+ * Sets whether this select menu is disabled.
+ *
+ * @param disabled - Whether this select menu is disabled
+ */
+ setDisabled(disabled?: boolean): this;
+ /**
+ * {@inheritDoc ComponentBuilder.toJSON}
+ */
+ toJSON(): SelectMenuType;
+}
+
+/**
+ * A builder that creates API-compatible JSON data for channel select menus.
+ */
+declare class ChannelSelectMenuBuilder extends BaseSelectMenuBuilder {
+ /**
+ * Creates a new select menu from API data.
+ *
+ * @param data - The API data to create this select menu with
+ * @example
+ * Creating a select menu from an API data object:
+ * ```ts
+ * const selectMenu = new ChannelSelectMenuBuilder({
+ * custom_id: 'a cool select menu',
+ * placeholder: 'select an option',
+ * max_values: 2,
+ * });
+ * ```
+ * @example
+ * Creating a select menu using setters and API data:
+ * ```ts
+ * const selectMenu = new ChannelSelectMenuBuilder({
+ * custom_id: 'a cool select menu',
+ * })
+ * .addChannelTypes(ChannelType.GuildText, ChannelType.GuildAnnouncement)
+ * .setMinValues(2);
+ * ```
+ */
+ constructor(data?: Partial);
+ /**
+ * Adds channel types to this select menu.
+ *
+ * @param types - The channel types to use
+ */
+ addChannelTypes(...types: RestOrArray): this;
+ /**
+ * Sets channel types for this select menu.
+ *
+ * @param types - The channel types to use
+ */
+ setChannelTypes(...types: RestOrArray): this;
+ /**
+ * Adds default channels to this auto populated select menu.
+ *
+ * @param channels - The channels to add
+ */
+ addDefaultChannels(...channels: RestOrArray): this;
+ /**
+ * Sets default channels to this auto populated select menu.
+ *
+ * @param channels - The channels to set
+ */
+ setDefaultChannels(...channels: RestOrArray): this;
+ /**
+ * {@inheritDoc BaseSelectMenuBuilder.toJSON}
+ */
+ toJSON(): APIChannelSelectComponent;
+}
+
+/**
+ * A builder that creates API-compatible JSON data for mentionable select menus.
+ */
+declare class MentionableSelectMenuBuilder extends BaseSelectMenuBuilder {
+ /**
+ * Creates a new select menu from API data.
+ *
+ * @param data - The API data to create this select menu with
+ * @example
+ * Creating a select menu from an API data object:
+ * ```ts
+ * const selectMenu = new MentionableSelectMenuBuilder({
+ * custom_id: 'a cool select menu',
+ * placeholder: 'select an option',
+ * max_values: 2,
+ * });
+ * ```
+ * @example
+ * Creating a select menu using setters and API data:
+ * ```ts
+ * const selectMenu = new MentionableSelectMenuBuilder({
+ * custom_id: 'a cool select menu',
+ * })
+ * .setMinValues(1);
+ * ```
+ */
+ constructor(data?: Partial);
+ /**
+ * Adds default roles to this auto populated select menu.
+ *
+ * @param roles - The roles to add
+ */
+ addDefaultRoles(...roles: RestOrArray): this;
+ /**
+ * Adds default users to this auto populated select menu.
+ *
+ * @param users - The users to add
+ */
+ addDefaultUsers(...users: RestOrArray): this;
+ /**
+ * Adds default values to this auto populated select menu.
+ *
+ * @param values - The values to add
+ */
+ addDefaultValues(...values: RestOrArray | APISelectMenuDefaultValue>): this;
+ /**
+ * Sets default values to this auto populated select menu.
+ *
+ * @param values - The values to set
+ */
+ setDefaultValues(...values: RestOrArray | APISelectMenuDefaultValue>): this;
+}
+
+/**
+ * A builder that creates API-compatible JSON data for role select menus.
+ */
+declare class RoleSelectMenuBuilder extends BaseSelectMenuBuilder {
+ /**
+ * Creates a new select menu from API data.
+ *
+ * @param data - The API data to create this select menu with
+ * @example
+ * Creating a select menu from an API data object:
+ * ```ts
+ * const selectMenu = new RoleSelectMenuBuilder({
+ * custom_id: 'a cool select menu',
+ * placeholder: 'select an option',
+ * max_values: 2,
+ * });
+ * ```
+ * @example
+ * Creating a select menu using setters and API data:
+ * ```ts
+ * const selectMenu = new RoleSelectMenuBuilder({
+ * custom_id: 'a cool select menu',
+ * })
+ * .setMinValues(1);
+ * ```
+ */
+ constructor(data?: Partial);
+ /**
+ * Adds default roles to this auto populated select menu.
+ *
+ * @param roles - The roles to add
+ */
+ addDefaultRoles(...roles: RestOrArray): this;
+ /**
+ * Sets default roles to this auto populated select menu.
+ *
+ * @param roles - The roles to set
+ */
+ setDefaultRoles(...roles: RestOrArray): this;
+}
+
+/**
+ * A builder that creates API-compatible JSON data for string select menus.
+ */
+declare class StringSelectMenuBuilder extends BaseSelectMenuBuilder {
+ /**
+ * The options within this select menu.
+ */
+ readonly options: StringSelectMenuOptionBuilder[];
+ /**
+ * Creates a new select menu from API data.
+ *
+ * @param data - The API data to create this select menu with
+ * @example
+ * Creating a select menu from an API data object:
+ * ```ts
+ * const selectMenu = new StringSelectMenuBuilder({
+ * custom_id: 'a cool select menu',
+ * placeholder: 'select an option',
+ * max_values: 2,
+ * options: [
+ * { label: 'option 1', value: '1' },
+ * { label: 'option 2', value: '2' },
+ * { label: 'option 3', value: '3' },
+ * ],
+ * });
+ * ```
+ * @example
+ * Creating a select menu using setters and API data:
+ * ```ts
+ * const selectMenu = new StringSelectMenuBuilder({
+ * custom_id: 'a cool select menu',
+ * })
+ * .setMinValues(1)
+ * .addOptions({
+ * label: 'Catchy',
+ * value: 'catch',
+ * });
+ * ```
+ */
+ constructor(data?: Partial);
+ /**
+ * Adds options to this select menu.
+ *
+ * @param options - The options to add
+ */
+ addOptions(...options: RestOrArray): this;
+ /**
+ * Sets the options for this select menu.
+ *
+ * @param options - The options to set
+ */
+ setOptions(...options: RestOrArray): this;
+ /**
+ * Removes, replaces, or inserts options for this select menu.
+ *
+ * @remarks
+ * This method behaves similarly
+ * to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice | Array.prototype.splice()}.
+ * It's useful for modifying and adjusting the order of existing options.
+ * @example
+ * Remove the first option:
+ * ```ts
+ * selectMenu.spliceOptions(0, 1);
+ * ```
+ * @example
+ * Remove the first n option:
+ * ```ts
+ * const n = 4;
+ * selectMenu.spliceOptions(0, n);
+ * ```
+ * @example
+ * Remove the last option:
+ * ```ts
+ * selectMenu.spliceOptions(-1, 1);
+ * ```
+ * @param index - The index to start at
+ * @param deleteCount - The number of options to remove
+ * @param options - The replacing option objects or builders
+ */
+ spliceOptions(index: number, deleteCount: number, ...options: RestOrArray): this;
+ /**
+ * {@inheritDoc BaseSelectMenuBuilder.toJSON}
+ */
+ toJSON(): APIStringSelectComponent;
+}
+
+/**
+ * A builder that creates API-compatible JSON data for user select menus.
+ */
+declare class UserSelectMenuBuilder extends BaseSelectMenuBuilder {
+ /**
+ * Creates a new select menu from API data.
+ *
+ * @param data - The API data to create this select menu with
+ * @example
+ * Creating a select menu from an API data object:
+ * ```ts
+ * const selectMenu = new UserSelectMenuBuilder({
+ * custom_id: 'a cool select menu',
+ * placeholder: 'select an option',
+ * max_values: 2,
+ * });
+ * ```
+ * @example
+ * Creating a select menu using setters and API data:
+ * ```ts
+ * const selectMenu = new UserSelectMenuBuilder({
+ * custom_id: 'a cool select menu',
+ * })
+ * .setMinValues(1);
+ * ```
+ */
+ constructor(data?: Partial);
+ /**
+ * Adds default users to this auto populated select menu.
+ *
+ * @param users - The users to add
+ */
+ addDefaultUsers(...users: RestOrArray): this;
+ /**
+ * Sets default users to this auto populated select menu.
+ *
+ * @param users - The users to set
+ */
+ setDefaultUsers(...users: RestOrArray): this;
+}
+
+/**
+ * A builder that creates API-compatible JSON data for text inputs.
+ */
+declare class TextInputBuilder extends ComponentBuilder implements Equatable> {
+ /**
+ * Creates a new text input from API data.
+ *
+ * @param data - The API data to create this text input with
+ * @example
+ * Creating a select menu option from an API data object:
+ * ```ts
+ * const textInput = new TextInputBuilder({
+ * custom_id: 'a cool select menu',
+ * label: 'Type something',
+ * style: TextInputStyle.Short,
+ * });
+ * ```
+ * @example
+ * Creating a select menu option using setters and API data:
+ * ```ts
+ * const textInput = new TextInputBuilder({
+ * label: 'Type something else',
+ * })
+ * .setCustomId('woah')
+ * .setStyle(TextInputStyle.Paragraph);
+ * ```
+ */
+ constructor(data?: APITextInputComponent & {
+ type?: ComponentType.TextInput;
+ });
+ /**
+ * Sets the custom id for this text input.
+ *
+ * @param customId - The custom id to use
+ */
+ setCustomId(customId: string): this;
+ /**
+ * Sets the label for this text input.
+ *
+ * @param label - The label to use
+ */
+ setLabel(label: string): this;
+ /**
+ * Sets the style for this text input.
+ *
+ * @param style - The style to use
+ */
+ setStyle(style: TextInputStyle): this;
+ /**
+ * Sets the minimum length of text for this text input.
+ *
+ * @param minLength - The minimum length of text for this text input
+ */
+ setMinLength(minLength: number): this;
+ /**
+ * Sets the maximum length of text for this text input.
+ *
+ * @param maxLength - The maximum length of text for this text input
+ */
+ setMaxLength(maxLength: number): this;
+ /**
+ * Sets the placeholder for this text input.
+ *
+ * @param placeholder - The placeholder to use
+ */
+ setPlaceholder(placeholder: string): this;
+ /**
+ * Sets the value for this text input.
+ *
+ * @param value - The value to use
+ */
+ setValue(value: string): this;
+ /**
+ * Sets whether this text input is required.
+ *
+ * @param required - Whether this text input is required
+ */
+ setRequired(required?: boolean): this;
+ /**
+ * {@inheritDoc ComponentBuilder.toJSON}
+ */
+ toJSON(): APITextInputComponent;
+ /**
+ * Whether this is equal to another structure.
+ */
+ equals(other: APITextInputComponent | JSONEncodable): boolean;
+}
+
+/**
+ * The builders that may be used for messages.
+ */
+type MessageComponentBuilder = ActionRowBuilder | MessageActionRowComponentBuilder;
+/**
+ * The builders that may be used for modals.
+ */
+type ModalComponentBuilder = ActionRowBuilder | ModalActionRowComponentBuilder;
+/**
+ * The builders that may be used within an action row for messages.
+ */
+type MessageActionRowComponentBuilder = ButtonBuilder | ChannelSelectMenuBuilder | MentionableSelectMenuBuilder | RoleSelectMenuBuilder | StringSelectMenuBuilder | UserSelectMenuBuilder;
+/**
+ * The builders that may be used within an action row for modals.
+ */
+type ModalActionRowComponentBuilder = TextInputBuilder;
+/**
+ * Any builder.
+ */
+type AnyComponentBuilder = MessageActionRowComponentBuilder | ModalActionRowComponentBuilder;
+/**
+ * A builder that creates API-compatible JSON data for action rows.
+ *
+ * @typeParam ComponentType - The types of components this action row holds
+ */
+declare class ActionRowBuilder extends ComponentBuilder> {
+ /**
+ * The components within this action row.
+ */
+ readonly components: ComponentType[];
+ /**
+ * Creates a new action row from API data.
+ *
+ * @param data - The API data to create this action row with
+ * @example
+ * Creating an action row from an API data object:
+ * ```ts
+ * const actionRow = new ActionRowBuilder({
+ * components: [
+ * {
+ * custom_id: "custom id",
+ * label: "Type something",
+ * style: TextInputStyle.Short,
+ * type: ComponentType.TextInput,
+ * },
+ * ],
+ * });
+ * ```
+ * @example
+ * Creating an action row using setters and API data:
+ * ```ts
+ * const actionRow = new ActionRowBuilder({
+ * components: [
+ * {
+ * custom_id: "custom id",
+ * label: "Click me",
+ * style: ButtonStyle.Primary,
+ * type: ComponentType.Button,
+ * },
+ * ],
+ * })
+ * .addComponents(button2, button3);
+ * ```
+ */
+ constructor({ components, ...data }?: Partial>);
+ /**
+ * Adds components to this action row.
+ *
+ * @param components - The components to add
+ */
+ addComponents(...components: RestOrArray): this;
+ /**
+ * Sets components for this action row.
+ *
+ * @param components - The components to set
+ */
+ setComponents(...components: RestOrArray): this;
+ /**
+ * {@inheritDoc ComponentBuilder.toJSON}
+ */
+ toJSON(): APIActionRowComponent>;
+}
+
+/**
+ * Components here are mapped to their respective builder.
+ */
+interface MappedComponentTypes {
+ /**
+ * The action row component type is associated with an {@link ActionRowBuilder}.
+ */
+ [ComponentType.ActionRow]: ActionRowBuilder;
+ /**
+ * The button component type is associated with an {@link ButtonBuilder}.
+ */
+ [ComponentType.Button]: ButtonBuilder;
+ /**
+ * The string select component type is associated with an {@link StringSelectMenuBuilder}.
+ */
+ [ComponentType.StringSelect]: StringSelectMenuBuilder;
+ /**
+ * The text inpiut component type is associated with an {@link TextInputBuilder}.
+ */
+ [ComponentType.TextInput]: TextInputBuilder;
+ /**
+ * The user select component type is associated with an {@link UserSelectMenuBuilder}.
+ */
+ [ComponentType.UserSelect]: UserSelectMenuBuilder;
+ /**
+ * The role select component type is associated with an {@link RoleSelectMenuBuilder}.
+ */
+ [ComponentType.RoleSelect]: RoleSelectMenuBuilder;
+ /**
+ * The mentionable select component type is associated with an {@link MentionableSelectMenuBuilder}.
+ */
+ [ComponentType.MentionableSelect]: MentionableSelectMenuBuilder;
+ /**
+ * The channel select component type is associated with an {@link ChannelSelectMenuBuilder}.
+ */
+ [ComponentType.ChannelSelect]: ChannelSelectMenuBuilder;
+}
+/**
+ * Factory for creating components from API data.
+ *
+ * @typeParam ComponentType - The type of component to use
+ * @param data - The API data to transform to a component class
+ */
+declare function createComponentBuilder(data: (APIModalComponent | APIMessageComponent) & {
+ type: ComponentType;
+}): MappedComponentTypes[ComponentType];
+/**
+ * Factory for creating components from API data.
+ *
+ * @typeParam ComponentBuilder - The type of component to use
+ * @param data - The API data to transform to a component class
+ */
+declare function createComponentBuilder(data: ComponentBuilder): ComponentBuilder;
+
+declare const textInputStyleValidator: _sapphire_shapeshift.NativeEnumValidator;
+declare const minLengthValidator: _sapphire_shapeshift.NumberValidator;
+declare const maxLengthValidator: _sapphire_shapeshift.NumberValidator;
+declare const requiredValidator: _sapphire_shapeshift.BooleanValidator;
+declare const valueValidator: _sapphire_shapeshift.StringValidator;
+declare const placeholderValidator: _sapphire_shapeshift.StringValidator;
+declare const labelValidator: _sapphire_shapeshift.StringValidator;
+declare function validateRequiredParameters$3(customId?: string, style?: TextInputStyle, label?: string): void;
+
+declare const Assertions$3_labelValidator: typeof labelValidator;
+declare const Assertions$3_maxLengthValidator: typeof maxLengthValidator;
+declare const Assertions$3_minLengthValidator: typeof minLengthValidator;
+declare const Assertions$3_placeholderValidator: typeof placeholderValidator;
+declare const Assertions$3_requiredValidator: typeof requiredValidator;
+declare const Assertions$3_textInputStyleValidator: typeof textInputStyleValidator;
+declare const Assertions$3_valueValidator: typeof valueValidator;
+declare namespace Assertions$3 {
+ export { Assertions$3_labelValidator as labelValidator, Assertions$3_maxLengthValidator as maxLengthValidator, Assertions$3_minLengthValidator as minLengthValidator, Assertions$3_placeholderValidator as placeholderValidator, Assertions$3_requiredValidator as requiredValidator, Assertions$3_textInputStyleValidator as textInputStyleValidator, validateRequiredParameters$3 as validateRequiredParameters, Assertions$3_valueValidator as valueValidator };
+}
+
+/**
+ * A builder that creates API-compatible JSON data for modals.
+ */
+declare class ModalBuilder implements JSONEncodable {
+ /**
+ * The API data associated with this modal.
+ */
+ readonly data: Partial;
+ /**
+ * The components within this modal.
+ */
+ readonly components: ActionRowBuilder[];
+ /**
+ * Creates a new modal from API data.
+ *
+ * @param data - The API data to create this modal with
+ */
+ constructor({ components, ...data }?: Partial);
+ /**
+ * Sets the title of this modal.
+ *
+ * @param title - The title to use
+ */
+ setTitle(title: string): this;
+ /**
+ * Sets the custom id of this modal.
+ *
+ * @param customId - The custom id to use
+ */
+ setCustomId(customId: string): this;
+ /**
+ * Adds components to this modal.
+ *
+ * @param components - The components to add
+ */
+ addComponents(...components: RestOrArray | APIActionRowComponent>): this;
+ /**
+ * Sets components for this modal.
+ *
+ * @param components - The components to set
+ */
+ setComponents(...components: RestOrArray>): this;
+ /**
+ * {@inheritDoc ComponentBuilder.toJSON}
+ */
+ toJSON(): APIModalInteractionResponseCallbackData;
+}
+
+declare const titleValidator: _sapphire_shapeshift.StringValidator;
+declare const componentsValidator: _sapphire_shapeshift.ArrayValidator<[ActionRowBuilder, ...ActionRowBuilder[]], ActionRowBuilder>;
+declare function validateRequiredParameters$2(customId?: string, title?: string, components?: ActionRowBuilder[]): void;
+
+declare const Assertions$2_componentsValidator: typeof componentsValidator;
+declare const Assertions$2_titleValidator: typeof titleValidator;
+declare namespace Assertions$2 {
+ export { Assertions$2_componentsValidator as componentsValidator, Assertions$2_titleValidator as titleValidator, validateRequiredParameters$2 as validateRequiredParameters };
+}
+
+/**
+ * This mixin holds name and description symbols for slash commands.
+ */
+declare class SharedNameAndDescription {
+ /**
+ * The name of this command.
+ */
+ readonly name: string;
+ /**
+ * The name localizations of this command.
+ */
+ readonly name_localizations?: LocalizationMap;
+ /**
+ * The description of this command.
+ */
+ readonly description: string;
+ /**
+ * The description localizations of this command.
+ */
+ readonly description_localizations?: LocalizationMap;
+ /**
+ * Sets the name of this command.
+ *
+ * @param name - The name to use
+ */
+ setName(name: string): this;
+ /**
+ * Sets the description of this command.
+ *
+ * @param description - The description to use
+ */
+ setDescription(description: string): this;
+ /**
+ * Sets a name localization for this command.
+ *
+ * @param locale - The locale to set
+ * @param localizedName - The localized name for the given `locale`
+ */
+ setNameLocalization(locale: LocaleString, localizedName: string | null): this;
+ /**
+ * Sets the name localizations for this command.
+ *
+ * @param localizedNames - The object of localized names to set
+ */
+ setNameLocalizations(localizedNames: LocalizationMap | null): this;
+ /**
+ * Sets a description localization for this command.
+ *
+ * @param locale - The locale to set
+ * @param localizedDescription - The localized description for the given locale
+ */
+ setDescriptionLocalization(locale: LocaleString, localizedDescription: string | null): this;
+ /**
+ * Sets the description localizations for this command.
+ *
+ * @param localizedDescriptions - The object of localized descriptions to set
+ */
+ setDescriptionLocalizations(localizedDescriptions: LocalizationMap | null): this;
+}
+
+/**
+ * This mixin holds symbols that can be shared in slashcommands independent of options or subcommands.
+ */
+declare class SharedSlashCommand {
+ readonly name: string;
+ readonly name_localizations?: LocalizationMap;
+ readonly description: string;
+ readonly description_localizations?: LocalizationMap;
+ readonly options: ToAPIApplicationCommandOptions[];
+ /**
+ * Sets whether the command is enabled by default when the application is added to a guild.
+ *
+ * @remarks
+ * If set to `false`, you will have to later `PUT` the permissions for this command.
+ * @param value - Whether or not to enable this command by default
+ * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}
+ * @deprecated Use {@link SharedSlashCommand.setDefaultMemberPermissions} or {@link SharedSlashCommand.setDMPermission} instead.
+ */
+ setDefaultPermission(value: boolean): this;
+ /**
+ * Sets the default permissions a member should have in order to run the command.
+ *
+ * @remarks
+ * You can set this to `'0'` to disable the command by default.
+ * @param permissions - The permissions bit field to set
+ * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}
+ */
+ setDefaultMemberPermissions(permissions: Permissions | bigint | number | null | undefined): this;
+ /**
+ * Sets if the command is available in direct messages with the application.
+ *
+ * @remarks
+ * By default, commands are visible. This method is only for global commands.
+ * @param enabled - Whether the command should be enabled in direct messages
+ * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}
+ */
+ setDMPermission(enabled: boolean | null | undefined): this;
+ /**
+ * Sets whether this command is NSFW.
+ *
+ * @param nsfw - Whether this command is NSFW
+ */
+ setNSFW(nsfw?: boolean): this;
+ /**
+ * Serializes this builder to API-compatible JSON data.
+ *
+ * @remarks
+ * This method runs validations on the data before serializing it.
+ * As such, it may throw an error if the data is invalid.
+ */
+ toJSON(): RESTPostAPIChatInputApplicationCommandsJSONBody;
+}
+
+/**
+ * The base application command option builder that contains common symbols for application command builders.
+ */
+declare abstract class ApplicationCommandOptionBase extends SharedNameAndDescription {
+ /**
+ * The type of this option.
+ */
+ abstract readonly type: ApplicationCommandOptionType;
+ /**
+ * Whether this option is required.
+ *
+ * @defaultValue `false`
+ */
+ readonly required: boolean;
+ /**
+ * Sets whether this option is required.
+ *
+ * @param required - Whether this option should be required
+ */
+ setRequired(required: boolean): this;
+ /**
+ * Serializes this builder to API-compatible JSON data.
+ *
+ * @remarks
+ * This method runs validations on the data before serializing it.
+ * As such, it may throw an error if the data is invalid.
+ */
+ abstract toJSON(): APIApplicationCommandBasicOption;
+ /**
+ * This method runs required validators on this builder.
+ */
+ protected runRequiredValidations(): void;
+}
+
+/**
+ * A slash command attachment option.
+ */
+declare class SlashCommandAttachmentOption extends ApplicationCommandOptionBase {
+ /**
+ * The type of this option.
+ */
+ readonly type: ApplicationCommandOptionType.Attachment;
+ /**
+ * {@inheritDoc ApplicationCommandOptionBase.toJSON}
+ */
+ toJSON(): APIApplicationCommandAttachmentOption;
+}
+
+/**
+ * A slash command boolean option.
+ */
+declare class SlashCommandBooleanOption extends ApplicationCommandOptionBase {
+ /**
+ * The type of this option.
+ */
+ readonly type: ApplicationCommandOptionType.Boolean;
+ /**
+ * {@inheritDoc ApplicationCommandOptionBase.toJSON}
+ */
+ toJSON(): APIApplicationCommandBooleanOption;
+}
+
+/**
+ * The allowed channel types used for a channel option in a slash command builder.
+ *
+ * @privateRemarks This can't be dynamic because const enums are erased at runtime.
+ * @internal
+ */
+declare const allowedChannelTypes: readonly [ChannelType.GuildText, ChannelType.GuildVoice, ChannelType.GuildCategory, ChannelType.GuildAnnouncement, ChannelType.AnnouncementThread, ChannelType.PublicThread, ChannelType.PrivateThread, ChannelType.GuildStageVoice, ChannelType.GuildForum, ChannelType.GuildMedia];
+/**
+ * The type of allowed channel types used for a channel option.
+ */
+type ApplicationCommandOptionAllowedChannelTypes = (typeof allowedChannelTypes)[number];
+/**
+ * This mixin holds channel type symbols used for options.
+ */
+declare class ApplicationCommandOptionChannelTypesMixin {
+ /**
+ * The channel types of this option.
+ */
+ readonly channel_types?: ApplicationCommandOptionAllowedChannelTypes[];
+ /**
+ * Adds channel types to this option.
+ *
+ * @param channelTypes - The channel types
+ */
+ addChannelTypes(...channelTypes: RestOrArray): this;
+}
+
+/**
+ * A slash command channel option.
+ */
+declare class SlashCommandChannelOption extends ApplicationCommandOptionBase {
+ /**
+ * The type of this option.
+ */
+ readonly type: ApplicationCommandOptionType.Channel;
+ /**
+ * {@inheritDoc ApplicationCommandOptionBase.toJSON}
+ */
+ toJSON(): APIApplicationCommandChannelOption;
+}
+interface SlashCommandChannelOption extends ApplicationCommandOptionChannelTypesMixin {
+}
+
+/**
+ * This mixin holds minimum and maximum symbols used for options.
+ */
+declare abstract class ApplicationCommandNumericOptionMinMaxValueMixin {
+ /**
+ * The maximum value of this option.
+ */
+ readonly max_value?: number;
+ /**
+ * The minimum value of this option.
+ */
+ readonly min_value?: number;
+ /**
+ * Sets the maximum number value of this option.
+ *
+ * @param max - The maximum value this option can be
+ */
+ abstract setMaxValue(max: number): this;
+ /**
+ * Sets the minimum number value of this option.
+ *
+ * @param min - The minimum value this option can be
+ */
+ abstract setMinValue(min: number): this;
+}
+
+/**
+ * This mixin holds choices and autocomplete symbols used for options.
+ */
+declare class ApplicationCommandOptionWithAutocompleteMixin {
+ /**
+ * Whether this option utilizes autocomplete.
+ */
+ readonly autocomplete?: boolean;
+ /**
+ * The type of this option.
+ *
+ * @privateRemarks Since this is present and this is a mixin, this is needed.
+ */
+ readonly type: ApplicationCommandOptionType;
+ /**
+ * Whether this option uses autocomplete.
+ *
+ * @param autocomplete - Whether this option should use autocomplete
+ */
+ setAutocomplete(autocomplete: boolean): this;
+}
+
+/**
+ * This mixin holds choices and autocomplete symbols used for options.
+ */
+declare class ApplicationCommandOptionWithChoicesMixin {
+ /**
+ * The choices of this option.
+ */
+ readonly choices?: APIApplicationCommandOptionChoice[];
+ /**
+ * The type of this option.
+ *
+ * @privateRemarks Since this is present and this is a mixin, this is needed.
+ */
+ readonly type: ApplicationCommandOptionType;
+ /**
+ * Adds multiple choices to this option.
+ *
+ * @param choices - The choices to add
+ */
+ addChoices(...choices: RestOrArray>): this;
+ /**
+ * Sets multiple choices for this option.
+ *
+ * @param choices - The choices to set
+ */
+ setChoices>(...choices: RestOrArray): this;
+}
+
+/**
+ * A slash command integer option.
+ */
+declare class SlashCommandIntegerOption extends ApplicationCommandOptionBase implements ApplicationCommandNumericOptionMinMaxValueMixin {
+ /**
+ * The type of this option.
+ */
+ readonly type: ApplicationCommandOptionType.Integer;
+ /**
+ * {@inheritDoc ApplicationCommandNumericOptionMinMaxValueMixin.setMaxValue}
+ */
+ setMaxValue(max: number): this;
+ /**
+ * {@inheritDoc ApplicationCommandNumericOptionMinMaxValueMixin.setMinValue}
+ */
+ setMinValue(min: number): this;
+ /**
+ * {@inheritDoc ApplicationCommandOptionBase.toJSON}
+ */
+ toJSON(): APIApplicationCommandIntegerOption;
+}
+interface SlashCommandIntegerOption extends ApplicationCommandNumericOptionMinMaxValueMixin, ApplicationCommandOptionWithChoicesMixin, ApplicationCommandOptionWithAutocompleteMixin {
+}
+
+/**
+ * A slash command mentionable option.
+ */
+declare class SlashCommandMentionableOption extends ApplicationCommandOptionBase {
+ /**
+ * The type of this option.
+ */
+ readonly type: ApplicationCommandOptionType.Mentionable;
+ /**
+ * {@inheritDoc ApplicationCommandOptionBase.toJSON}
+ */
+ toJSON(): APIApplicationCommandMentionableOption;
+}
+
+/**
+ * A slash command number option.
+ */
+declare class SlashCommandNumberOption extends ApplicationCommandOptionBase implements ApplicationCommandNumericOptionMinMaxValueMixin {
+ /**
+ * The type of this option.
+ */
+ readonly type: ApplicationCommandOptionType.Number;
+ /**
+ * {@inheritDoc ApplicationCommandNumericOptionMinMaxValueMixin.setMaxValue}
+ */
+ setMaxValue(max: number): this;
+ /**
+ * {@inheritDoc ApplicationCommandNumericOptionMinMaxValueMixin.setMinValue}
+ */
+ setMinValue(min: number): this;
+ /**
+ * {@inheritDoc ApplicationCommandOptionBase.toJSON}
+ */
+ toJSON(): APIApplicationCommandNumberOption;
+}
+interface SlashCommandNumberOption extends ApplicationCommandNumericOptionMinMaxValueMixin, ApplicationCommandOptionWithChoicesMixin, ApplicationCommandOptionWithAutocompleteMixin {
+}
+
+/**
+ * A slash command role option.
+ */
+declare class SlashCommandRoleOption extends ApplicationCommandOptionBase {
+ /**
+ * The type of this option.
+ */
+ readonly type: ApplicationCommandOptionType.Role;
+ /**
+ * {@inheritDoc ApplicationCommandOptionBase.toJSON}
+ */
+ toJSON(): APIApplicationCommandRoleOption;
+}
+
+/**
+ * A slash command string option.
+ */
+declare class SlashCommandStringOption extends ApplicationCommandOptionBase {
+ /**
+ * The type of this option.
+ */
+ readonly type: ApplicationCommandOptionType.String;
+ /**
+ * The maximum length of this option.
+ */
+ readonly max_length?: number;
+ /**
+ * The minimum length of this option.
+ */
+ readonly min_length?: number;
+ /**
+ * Sets the maximum length of this string option.
+ *
+ * @param max - The maximum length this option can be
+ */
+ setMaxLength(max: number): this;
+ /**
+ * Sets the minimum length of this string option.
+ *
+ * @param min - The minimum length this option can be
+ */
+ setMinLength(min: number): this;
+ /**
+ * {@inheritDoc ApplicationCommandOptionBase.toJSON}
+ */
+ toJSON(): APIApplicationCommandStringOption;
+}
+interface SlashCommandStringOption extends ApplicationCommandOptionWithChoicesMixin, ApplicationCommandOptionWithAutocompleteMixin {
+}
+
+/**
+ * A slash command user option.
+ */
+declare class SlashCommandUserOption extends ApplicationCommandOptionBase {
+ /**
+ * The type of this option.
+ */
+ readonly type: ApplicationCommandOptionType.User;
+ /**
+ * {@inheritDoc ApplicationCommandOptionBase.toJSON}
+ */
+ toJSON(): APIApplicationCommandUserOption;
+}
+
+/**
+ * This mixin holds symbols that can be shared in slash command options.
+ *
+ * @typeParam TypeAfterAddingOptions - The type this class should return after adding an option.
+ */
+declare class SharedSlashCommandOptions> {
+ readonly options: ToAPIApplicationCommandOptions[];
+ /**
+ * Adds a boolean option.
+ *
+ * @param input - A function that returns an option builder or an already built builder
+ */
+ addBooleanOption(input: SlashCommandBooleanOption | ((builder: SlashCommandBooleanOption) => SlashCommandBooleanOption)): TypeAfterAddingOptions;
+ /**
+ * Adds a user option.
+ *
+ * @param input - A function that returns an option builder or an already built builder
+ */
+ addUserOption(input: SlashCommandUserOption | ((builder: SlashCommandUserOption) => SlashCommandUserOption)): TypeAfterAddingOptions;
+ /**
+ * Adds a channel option.
+ *
+ * @param input - A function that returns an option builder or an already built builder
+ */
+ addChannelOption(input: SlashCommandChannelOption | ((builder: SlashCommandChannelOption) => SlashCommandChannelOption)): TypeAfterAddingOptions;
+ /**
+ * Adds a role option.
+ *
+ * @param input - A function that returns an option builder or an already built builder
+ */
+ addRoleOption(input: SlashCommandRoleOption | ((builder: SlashCommandRoleOption) => SlashCommandRoleOption)): TypeAfterAddingOptions;
+ /**
+ * Adds an attachment option.
+ *
+ * @param input - A function that returns an option builder or an already built builder
+ */
+ addAttachmentOption(input: SlashCommandAttachmentOption | ((builder: SlashCommandAttachmentOption) => SlashCommandAttachmentOption)): TypeAfterAddingOptions;
+ /**
+ * Adds a mentionable option.
+ *
+ * @param input - A function that returns an option builder or an already built builder
+ */
+ addMentionableOption(input: SlashCommandMentionableOption | ((builder: SlashCommandMentionableOption) => SlashCommandMentionableOption)): TypeAfterAddingOptions;
+ /**
+ * Adds a string option.
+ *
+ * @param input - A function that returns an option builder or an already built builder
+ */
+ addStringOption(input: SlashCommandStringOption | ((builder: SlashCommandStringOption) => SlashCommandStringOption)): TypeAfterAddingOptions;
+ /**
+ * Adds an integer option.
+ *
+ * @param input - A function that returns an option builder or an already built builder
+ */
+ addIntegerOption(input: SlashCommandIntegerOption | ((builder: SlashCommandIntegerOption) => SlashCommandIntegerOption)): TypeAfterAddingOptions;
+ /**
+ * Adds a number option.
+ *
+ * @param input - A function that returns an option builder or an already built builder
+ */
+ addNumberOption(input: SlashCommandNumberOption | ((builder: SlashCommandNumberOption) => SlashCommandNumberOption)): TypeAfterAddingOptions;
+ /**
+ * Where the actual adding magic happens. ✨
+ *
+ * @param input - The input. What else?
+ * @param Instance - The instance of whatever is being added
+ * @internal
+ */
+ private _sharedAddOptionMethod;
+}
+
+/**
+ * Represents a folder for subcommands.
+ *
+ * @see {@link https://discord.com/developers/docs/interactions/application-commands#subcommands-and-subcommand-groups}
+ */
+declare class SlashCommandSubcommandGroupBuilder implements ToAPIApplicationCommandOptions {
+ /**
+ * The name of this subcommand group.
+ */
+ readonly name: string;
+ /**
+ * The description of this subcommand group.
+ */
+ readonly description: string;
+ /**
+ * The subcommands within this subcommand group.
+ */
+ readonly options: SlashCommandSubcommandBuilder[];
+ /**
+ * Adds a new subcommand to this group.
+ *
+ * @param input - A function that returns a subcommand builder or an already built builder
+ */
+ addSubcommand(input: SlashCommandSubcommandBuilder | ((subcommandGroup: SlashCommandSubcommandBuilder) => SlashCommandSubcommandBuilder)): this;
+ /**
+ * Serializes this builder to API-compatible JSON data.
+ *
+ * @remarks
+ * This method runs validations on the data before serializing it.
+ * As such, it may throw an error if the data is invalid.
+ */
+ toJSON(): APIApplicationCommandSubcommandGroupOption;
+}
+interface SlashCommandSubcommandGroupBuilder extends SharedNameAndDescription {
+}
+/**
+ * A builder that creates API-compatible JSON data for slash command subcommands.
+ *
+ * @see {@link https://discord.com/developers/docs/interactions/application-commands#subcommands-and-subcommand-groups}
+ */
+declare class SlashCommandSubcommandBuilder implements ToAPIApplicationCommandOptions {
+ /**
+ * The name of this subcommand.
+ */
+ readonly name: string;
+ /**
+ * The description of this subcommand.
+ */
+ readonly description: string;
+ /**
+ * The options within this subcommand.
+ */
+ readonly options: ApplicationCommandOptionBase[];
+ /**
+ * Serializes this builder to API-compatible JSON data.
+ *
+ * @remarks
+ * This method runs validations on the data before serializing it.
+ * As such, it may throw an error if the data is invalid.
+ */
+ toJSON(): APIApplicationCommandSubcommandOption;
+}
+interface SlashCommandSubcommandBuilder extends SharedNameAndDescription, SharedSlashCommandOptions {
+}
+
+/**
+ * This mixin holds symbols that can be shared in slash subcommands.
+ *
+ * @typeParam TypeAfterAddingSubcommands - The type this class should return after adding a subcommand or subcommand group.
+ */
+declare class SharedSlashCommandSubcommands> {
+ readonly options: ToAPIApplicationCommandOptions[];
+ /**
+ * Adds a new subcommand group to this command.
+ *
+ * @param input - A function that returns a subcommand group builder or an already built builder
+ */
+ addSubcommandGroup(input: SlashCommandSubcommandGroupBuilder | ((subcommandGroup: SlashCommandSubcommandGroupBuilder) => SlashCommandSubcommandGroupBuilder)): TypeAfterAddingSubcommands;
+ /**
+ * Adds a new subcommand to this command.
+ *
+ * @param input - A function that returns a subcommand builder or an already built builder
+ */
+ addSubcommand(input: SlashCommandSubcommandBuilder | ((subcommandGroup: SlashCommandSubcommandBuilder) => SlashCommandSubcommandBuilder)): TypeAfterAddingSubcommands;
+}
+
+/**
+ * A builder that creates API-compatible JSON data for slash commands.
+ */
+declare class SlashCommandBuilder {
+ /**
+ * The name of this command.
+ */
+ readonly name: string;
+ /**
+ * The name localizations of this command.
+ */
+ readonly name_localizations?: LocalizationMap;
+ /**
+ * The description of this command.
+ */
+ readonly description: string;
+ /**
+ * The description localizations of this command.
+ */
+ readonly description_localizations?: LocalizationMap;
+ /**
+ * The options of this command.
+ */
+ readonly options: ToAPIApplicationCommandOptions[];
+ /**
+ * Whether this command is enabled by default when the application is added to a guild.
+ *
+ * @deprecated Use {@link SharedSlashCommand.setDefaultMemberPermissions} or {@link SharedSlashCommand.setDMPermission} instead.
+ */
+ readonly default_permission: boolean | undefined;
+ /**
+ * The set of permissions represented as a bit set for the command.
+ */
+ readonly default_member_permissions: Permissions | null | undefined;
+ /**
+ * Indicates whether the command is available in direct messages with the application.
+ *
+ * @remarks
+ * By default, commands are visible. This property is only for global commands.
+ */
+ readonly dm_permission: boolean | undefined;
+ /**
+ * Whether this command is NSFW.
+ */
+ readonly nsfw: boolean | undefined;
+}
+interface SlashCommandBuilder extends SharedNameAndDescription, SharedSlashCommandOptions, SharedSlashCommandSubcommands, SharedSlashCommand {
+}
+/**
+ * An interface specifically for slash command subcommands.
+ */
+interface SlashCommandSubcommandsOnlyBuilder extends SharedNameAndDescription, SharedSlashCommandSubcommands, SharedSlashCommand {
+}
+/**
+ * An interface specifically for slash command options.
+ */
+interface SlashCommandOptionsOnlyBuilder extends SharedNameAndDescription, SharedSlashCommandOptions, SharedSlashCommand {
+}
+/**
+ * An interface that ensures the `toJSON()` call will return something
+ * that can be serialized into API-compatible data.
+ */
+interface ToAPIApplicationCommandOptions {
+ toJSON(): APIApplicationCommandOption;
+}
+
+declare function validateName$1(name: unknown): asserts name is string;
+declare function validateDescription(description: unknown): asserts description is string;
+declare function validateLocale(locale: unknown): Locale;
+declare function validateMaxOptionsLength(options: unknown): asserts options is ToAPIApplicationCommandOptions[];
+declare function validateRequiredParameters$1(name: string, description: string, options: ToAPIApplicationCommandOptions[]): void;
+declare function validateDefaultPermission$1(value: unknown): asserts value is boolean;
+declare function validateRequired(required: unknown): asserts required is boolean;
+declare function validateChoicesLength(amountAdding: number, choices?: APIApplicationCommandOptionChoice[]): void;
+declare function assertReturnOfBuilder(input: unknown, ExpectedInstanceOf: new () => ReturnType): asserts input is ReturnType;
+declare const localizationMapPredicate: _sapphire_shapeshift.UnionValidator<_sapphire_shapeshift.UndefinedToOptional>> | null | undefined>;
+declare function validateLocalizationMap(value: unknown): asserts value is LocalizationMap;
+declare function validateDMPermission$1(value: unknown): asserts value is boolean | null | undefined;
+declare function validateDefaultMemberPermissions$1(permissions: unknown): string | null | undefined;
+declare function validateNSFW(value: unknown): asserts value is boolean;
+
+declare const Assertions$1_assertReturnOfBuilder: typeof assertReturnOfBuilder;
+declare const Assertions$1_localizationMapPredicate: typeof localizationMapPredicate;
+declare const Assertions$1_validateChoicesLength: typeof validateChoicesLength;
+declare const Assertions$1_validateDescription: typeof validateDescription;
+declare const Assertions$1_validateLocale: typeof validateLocale;
+declare const Assertions$1_validateLocalizationMap: typeof validateLocalizationMap;
+declare const Assertions$1_validateMaxOptionsLength: typeof validateMaxOptionsLength;
+declare const Assertions$1_validateNSFW: typeof validateNSFW;
+declare const Assertions$1_validateRequired: typeof validateRequired;
+declare namespace Assertions$1 {
+ export { Assertions$1_assertReturnOfBuilder as assertReturnOfBuilder, Assertions$1_localizationMapPredicate as localizationMapPredicate, Assertions$1_validateChoicesLength as validateChoicesLength, validateDMPermission$1 as validateDMPermission, validateDefaultMemberPermissions$1 as validateDefaultMemberPermissions, validateDefaultPermission$1 as validateDefaultPermission, Assertions$1_validateDescription as validateDescription, Assertions$1_validateLocale as validateLocale, Assertions$1_validateLocalizationMap as validateLocalizationMap, Assertions$1_validateMaxOptionsLength as validateMaxOptionsLength, Assertions$1_validateNSFW as validateNSFW, validateName$1 as validateName, Assertions$1_validateRequired as validateRequired, validateRequiredParameters$1 as validateRequiredParameters };
+}
+
+/**
+ * The type a context menu command can be.
+ */
+type ContextMenuCommandType = ApplicationCommandType.Message | ApplicationCommandType.User;
+/**
+ * A builder that creates API-compatible JSON data for context menu commands.
+ */
+declare class ContextMenuCommandBuilder {
+ /**
+ * The name of this command.
+ */
+ readonly name: string;
+ /**
+ * The name localizations of this command.
+ */
+ readonly name_localizations?: LocalizationMap;
+ /**
+ * The type of this command.
+ */
+ readonly type: ContextMenuCommandType;
+ /**
+ * Whether this command is enabled by default when the application is added to a guild.
+ *
+ * @deprecated Use {@link ContextMenuCommandBuilder.setDefaultMemberPermissions} or {@link ContextMenuCommandBuilder.setDMPermission} instead.
+ */
+ readonly default_permission: boolean | undefined;
+ /**
+ * The set of permissions represented as a bit set for the command.
+ */
+ readonly default_member_permissions: Permissions | null | undefined;
+ /**
+ * Indicates whether the command is available in direct messages with the application.
+ *
+ * @remarks
+ * By default, commands are visible. This property is only for global commands.
+ */
+ readonly dm_permission: boolean | undefined;
+ /**
+ * Sets the name of this command.
+ *
+ * @param name - The name to use
+ */
+ setName(name: string): this;
+ /**
+ * Sets the type of this command.
+ *
+ * @param type - The type to use
+ */
+ setType(type: ContextMenuCommandType): this;
+ /**
+ * Sets whether the command is enabled by default when the application is added to a guild.
+ *
+ * @remarks
+ * If set to `false`, you will have to later `PUT` the permissions for this command.
+ * @param value - Whether to enable this command by default
+ * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}
+ * @deprecated Use {@link ContextMenuCommandBuilder.setDefaultMemberPermissions} or {@link ContextMenuCommandBuilder.setDMPermission} instead.
+ */
+ setDefaultPermission(value: boolean): this;
+ /**
+ * Sets the default permissions a member should have in order to run this command.
+ *
+ * @remarks
+ * You can set this to `'0'` to disable the command by default.
+ * @param permissions - The permissions bit field to set
+ * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}
+ */
+ setDefaultMemberPermissions(permissions: Permissions | bigint | number | null | undefined): this;
+ /**
+ * Sets if the command is available in direct messages with the application.
+ *
+ * @remarks
+ * By default, commands are visible. This method is only for global commands.
+ * @param enabled - Whether the command should be enabled in direct messages
+ * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}
+ */
+ setDMPermission(enabled: boolean | null | undefined): this;
+ /**
+ * Sets a name localization for this command.
+ *
+ * @param locale - The locale to set
+ * @param localizedName - The localized name for the given `locale`
+ */
+ setNameLocalization(locale: LocaleString, localizedName: string | null): this;
+ /**
+ * Sets the name localizations for this command.
+ *
+ * @param localizedNames - The object of localized names to set
+ */
+ setNameLocalizations(localizedNames: LocalizationMap | null): this;
+ /**
+ * Serializes this builder to API-compatible JSON data.
+ *
+ * @remarks
+ * This method runs validations on the data before serializing it.
+ * As such, it may throw an error if the data is invalid.
+ */
+ toJSON(): RESTPostAPIContextMenuApplicationCommandsJSONBody;
+}
+
+declare function validateDefaultPermission(value: unknown): asserts value is boolean;
+declare function validateName(name: unknown): asserts name is string;
+declare function validateType(type: unknown): asserts type is ContextMenuCommandType;
+declare function validateRequiredParameters(name: string, type: number): void;
+declare function validateDMPermission(value: unknown): asserts value is boolean | null | undefined;
+declare function validateDefaultMemberPermissions(permissions: unknown): string | null | undefined;
+
+declare const Assertions_validateDMPermission: typeof validateDMPermission;
+declare const Assertions_validateDefaultMemberPermissions: typeof validateDefaultMemberPermissions;
+declare const Assertions_validateDefaultPermission: typeof validateDefaultPermission;
+declare const Assertions_validateName: typeof validateName;
+declare const Assertions_validateRequiredParameters: typeof validateRequiredParameters;
+declare const Assertions_validateType: typeof validateType;
+declare namespace Assertions {
+ export { Assertions_validateDMPermission as validateDMPermission, Assertions_validateDefaultMemberPermissions as validateDefaultMemberPermissions, Assertions_validateDefaultPermission as validateDefaultPermission, Assertions_validateName as validateName, Assertions_validateRequiredParameters as validateRequiredParameters, Assertions_validateType as validateType };
+}
+
+/**
+ * Calculates the length of the embed.
+ *
+ * @param data - The embed data to check
+ */
+declare function embedLength(data: APIEmbed): number;
+
+/**
+ * Enables validators.
+ *
+ * @returns Whether validation is occurring.
+ */
+declare function enableValidators(): boolean;
+/**
+ * Disables validators.
+ *
+ * @returns Whether validation is occurring.
+ */
+declare function disableValidators(): boolean;
+/**
+ * Checks whether validation is occurring.
+ */
+declare function isValidationEnabled(): boolean;
+
+/**
+ * The {@link https://github.com/discordjs/discord.js/blob/main/packages/builders#readme | @discordjs/builders} version
+ * that you are currently using.
+ *
+ * @privateRemarks This needs to explicitly be `string` so it is not typed as a "const string" that gets injected by esbuild.
+ */
+declare const version: string;
+
+export { ActionRowBuilder, type AnyAPIActionRowComponent, type AnyComponentBuilder, ApplicationCommandNumericOptionMinMaxValueMixin, type ApplicationCommandOptionAllowedChannelTypes, ApplicationCommandOptionBase, ApplicationCommandOptionChannelTypesMixin, ApplicationCommandOptionWithAutocompleteMixin, ApplicationCommandOptionWithChoicesMixin, BaseSelectMenuBuilder, ButtonBuilder, ChannelSelectMenuBuilder, Assertions$4 as ComponentAssertions, ComponentBuilder, Assertions as ContextMenuCommandAssertions, ContextMenuCommandBuilder, type ContextMenuCommandType, Assertions$5 as EmbedAssertions, type EmbedAuthorData, type EmbedAuthorOptions, EmbedBuilder, type EmbedFooterData, type EmbedFooterOptions, type EmbedImageData, type IconData, type MappedComponentTypes, MentionableSelectMenuBuilder, type MessageActionRowComponentBuilder, type MessageComponentBuilder, type ModalActionRowComponentBuilder, Assertions$2 as ModalAssertions, ModalBuilder, type ModalComponentBuilder, type RGBTuple, type RestOrArray, RoleSelectMenuBuilder, StringSelectMenuBuilder as SelectMenuBuilder, StringSelectMenuOptionBuilder as SelectMenuOptionBuilder, SharedNameAndDescription, SharedSlashCommand, SharedSlashCommandOptions, SharedSlashCommandSubcommands, Assertions$1 as SlashCommandAssertions, SlashCommandAttachmentOption, SlashCommandBooleanOption, SlashCommandBuilder, SlashCommandChannelOption, SlashCommandIntegerOption, SlashCommandMentionableOption, SlashCommandNumberOption, type SlashCommandOptionsOnlyBuilder, SlashCommandRoleOption, SlashCommandStringOption, SlashCommandSubcommandBuilder, SlashCommandSubcommandGroupBuilder, type SlashCommandSubcommandsOnlyBuilder, SlashCommandUserOption, StringSelectMenuBuilder, StringSelectMenuOptionBuilder, Assertions$3 as TextInputAssertions, TextInputBuilder, type ToAPIApplicationCommandOptions, UserSelectMenuBuilder, createComponentBuilder, disableValidators, embedLength, enableValidators, isValidationEnabled, normalizeArray, version };
diff --git a/node_modules/@discordjs/builders/dist/index.js b/node_modules/@discordjs/builders/dist/index.js
new file mode 100644
index 0000000..cbb7eb6
--- /dev/null
+++ b/node_modules/@discordjs/builders/dist/index.js
@@ -0,0 +1,2811 @@
+"use strict";
+var __create = Object.create;
+var __defProp = Object.defineProperty;
+var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
+var __getOwnPropNames = Object.getOwnPropertyNames;
+var __getProtoOf = Object.getPrototypeOf;
+var __hasOwnProp = Object.prototype.hasOwnProperty;
+var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
+var __export = (target, all) => {
+ for (var name in all)
+ __defProp(target, name, { get: all[name], enumerable: true });
+};
+var __copyProps = (to, from, except, desc) => {
+ if (from && typeof from === "object" || typeof from === "function") {
+ for (let key of __getOwnPropNames(from))
+ if (!__hasOwnProp.call(to, key) && key !== except)
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+ }
+ return to;
+};
+var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
+var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
+ // If the importer is in node compatibility mode or this is not an ESM
+ // file that has been converted to a CommonJS file using a Babel-
+ // compatible transform (i.e. "__esModule" has not been set), then set
+ // "default" to the CommonJS "module.exports" for node compatibility.
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
+ mod
+));
+var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
+var __decorateClass = (decorators, target, key, kind) => {
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
+ if (decorator = decorators[i])
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
+ if (kind && result)
+ __defProp(target, key, result);
+ return result;
+};
+
+// src/index.ts
+var src_exports = {};
+__export(src_exports, {
+ ActionRowBuilder: () => ActionRowBuilder,
+ ApplicationCommandNumericOptionMinMaxValueMixin: () => ApplicationCommandNumericOptionMinMaxValueMixin,
+ ApplicationCommandOptionBase: () => ApplicationCommandOptionBase,
+ ApplicationCommandOptionChannelTypesMixin: () => ApplicationCommandOptionChannelTypesMixin,
+ ApplicationCommandOptionWithAutocompleteMixin: () => ApplicationCommandOptionWithAutocompleteMixin,
+ ApplicationCommandOptionWithChoicesMixin: () => ApplicationCommandOptionWithChoicesMixin,
+ BaseSelectMenuBuilder: () => BaseSelectMenuBuilder,
+ ButtonBuilder: () => ButtonBuilder,
+ ChannelSelectMenuBuilder: () => ChannelSelectMenuBuilder,
+ ComponentAssertions: () => Assertions_exports2,
+ ComponentBuilder: () => ComponentBuilder,
+ ContextMenuCommandAssertions: () => Assertions_exports6,
+ ContextMenuCommandBuilder: () => ContextMenuCommandBuilder,
+ EmbedAssertions: () => Assertions_exports,
+ EmbedBuilder: () => EmbedBuilder,
+ MentionableSelectMenuBuilder: () => MentionableSelectMenuBuilder,
+ ModalAssertions: () => Assertions_exports4,
+ ModalBuilder: () => ModalBuilder,
+ RoleSelectMenuBuilder: () => RoleSelectMenuBuilder,
+ SelectMenuBuilder: () => StringSelectMenuBuilder,
+ SelectMenuOptionBuilder: () => StringSelectMenuOptionBuilder,
+ SharedNameAndDescription: () => SharedNameAndDescription,
+ SharedSlashCommand: () => SharedSlashCommand,
+ SharedSlashCommandOptions: () => SharedSlashCommandOptions,
+ SharedSlashCommandSubcommands: () => SharedSlashCommandSubcommands,
+ SlashCommandAssertions: () => Assertions_exports5,
+ SlashCommandAttachmentOption: () => SlashCommandAttachmentOption,
+ SlashCommandBooleanOption: () => SlashCommandBooleanOption,
+ SlashCommandBuilder: () => SlashCommandBuilder,
+ SlashCommandChannelOption: () => SlashCommandChannelOption,
+ SlashCommandIntegerOption: () => SlashCommandIntegerOption,
+ SlashCommandMentionableOption: () => SlashCommandMentionableOption,
+ SlashCommandNumberOption: () => SlashCommandNumberOption,
+ SlashCommandRoleOption: () => SlashCommandRoleOption,
+ SlashCommandStringOption: () => SlashCommandStringOption,
+ SlashCommandSubcommandBuilder: () => SlashCommandSubcommandBuilder,
+ SlashCommandSubcommandGroupBuilder: () => SlashCommandSubcommandGroupBuilder,
+ SlashCommandUserOption: () => SlashCommandUserOption,
+ StringSelectMenuBuilder: () => StringSelectMenuBuilder,
+ StringSelectMenuOptionBuilder: () => StringSelectMenuOptionBuilder,
+ TextInputAssertions: () => Assertions_exports3,
+ TextInputBuilder: () => TextInputBuilder,
+ UserSelectMenuBuilder: () => UserSelectMenuBuilder,
+ createComponentBuilder: () => createComponentBuilder,
+ disableValidators: () => disableValidators,
+ embedLength: () => embedLength,
+ enableValidators: () => enableValidators,
+ isValidationEnabled: () => isValidationEnabled,
+ normalizeArray: () => normalizeArray,
+ version: () => version
+});
+module.exports = __toCommonJS(src_exports);
+
+// src/messages/embed/Assertions.ts
+var Assertions_exports = {};
+__export(Assertions_exports, {
+ RGBPredicate: () => RGBPredicate,
+ authorNamePredicate: () => authorNamePredicate,
+ colorPredicate: () => colorPredicate,
+ descriptionPredicate: () => descriptionPredicate,
+ embedAuthorPredicate: () => embedAuthorPredicate,
+ embedFieldPredicate: () => embedFieldPredicate,
+ embedFieldsArrayPredicate: () => embedFieldsArrayPredicate,
+ embedFooterPredicate: () => embedFooterPredicate,
+ fieldInlinePredicate: () => fieldInlinePredicate,
+ fieldLengthPredicate: () => fieldLengthPredicate,
+ fieldNamePredicate: () => fieldNamePredicate,
+ fieldValuePredicate: () => fieldValuePredicate,
+ footerTextPredicate: () => footerTextPredicate,
+ imageURLPredicate: () => imageURLPredicate,
+ timestampPredicate: () => timestampPredicate,
+ titlePredicate: () => titlePredicate,
+ urlPredicate: () => urlPredicate,
+ validateFieldLength: () => validateFieldLength
+});
+var import_shapeshift = require("@sapphire/shapeshift");
+
+// src/util/validation.ts
+var validate = true;
+function enableValidators() {
+ return validate = true;
+}
+__name(enableValidators, "enableValidators");
+function disableValidators() {
+ return validate = false;
+}
+__name(disableValidators, "disableValidators");
+function isValidationEnabled() {
+ return validate;
+}
+__name(isValidationEnabled, "isValidationEnabled");
+
+// src/messages/embed/Assertions.ts
+var fieldNamePredicate = import_shapeshift.s.string.lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(256).setValidationEnabled(isValidationEnabled);
+var fieldValuePredicate = import_shapeshift.s.string.lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(1024).setValidationEnabled(isValidationEnabled);
+var fieldInlinePredicate = import_shapeshift.s.boolean.optional;
+var embedFieldPredicate = import_shapeshift.s.object({
+ name: fieldNamePredicate,
+ value: fieldValuePredicate,
+ inline: fieldInlinePredicate
+}).setValidationEnabled(isValidationEnabled);
+var embedFieldsArrayPredicate = embedFieldPredicate.array.setValidationEnabled(isValidationEnabled);
+var fieldLengthPredicate = import_shapeshift.s.number.lessThanOrEqual(25).setValidationEnabled(isValidationEnabled);
+function validateFieldLength(amountAdding, fields) {
+ fieldLengthPredicate.parse((fields?.length ?? 0) + amountAdding);
+}
+__name(validateFieldLength, "validateFieldLength");
+var authorNamePredicate = fieldNamePredicate.nullable.setValidationEnabled(isValidationEnabled);
+var imageURLPredicate = import_shapeshift.s.string.url({
+ allowedProtocols: ["http:", "https:", "attachment:"]
+}).nullish.setValidationEnabled(isValidationEnabled);
+var urlPredicate = import_shapeshift.s.string.url({
+ allowedProtocols: ["http:", "https:"]
+}).nullish.setValidationEnabled(isValidationEnabled);
+var embedAuthorPredicate = import_shapeshift.s.object({
+ name: authorNamePredicate,
+ iconURL: imageURLPredicate,
+ url: urlPredicate
+}).setValidationEnabled(isValidationEnabled);
+var RGBPredicate = import_shapeshift.s.number.int.greaterThanOrEqual(0).lessThanOrEqual(255).setValidationEnabled(isValidationEnabled);
+var colorPredicate = import_shapeshift.s.number.int.greaterThanOrEqual(0).lessThanOrEqual(16777215).or(import_shapeshift.s.tuple([RGBPredicate, RGBPredicate, RGBPredicate])).nullable.setValidationEnabled(isValidationEnabled);
+var descriptionPredicate = import_shapeshift.s.string.lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(4096).nullable.setValidationEnabled(isValidationEnabled);
+var footerTextPredicate = import_shapeshift.s.string.lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(2048).nullable.setValidationEnabled(isValidationEnabled);
+var embedFooterPredicate = import_shapeshift.s.object({
+ text: footerTextPredicate,
+ iconURL: imageURLPredicate
+}).setValidationEnabled(isValidationEnabled);
+var timestampPredicate = import_shapeshift.s.union(import_shapeshift.s.number, import_shapeshift.s.date).nullable.setValidationEnabled(isValidationEnabled);
+var titlePredicate = fieldNamePredicate.nullable.setValidationEnabled(isValidationEnabled);
+
+// src/util/normalizeArray.ts
+function normalizeArray(arr) {
+ if (Array.isArray(arr[0]))
+ return [...arr[0]];
+ return arr;
+}
+__name(normalizeArray, "normalizeArray");
+
+// src/messages/embed/Embed.ts
+var EmbedBuilder = class {
+ static {
+ __name(this, "EmbedBuilder");
+ }
+ /**
+ * The API data associated with this embed.
+ */
+ data;
+ /**
+ * Creates a new embed from API data.
+ *
+ * @param data - The API data to create this embed with
+ */
+ constructor(data = {}) {
+ this.data = { ...data };
+ if (data.timestamp)
+ this.data.timestamp = new Date(data.timestamp).toISOString();
+ }
+ /**
+ * Appends fields to the embed.
+ *
+ * @remarks
+ * This method accepts either an array of fields or a variable number of field parameters.
+ * The maximum amount of fields that can be added is 25.
+ * @example
+ * Using an array:
+ * ```ts
+ * const fields: APIEmbedField[] = ...;
+ * const embed = new EmbedBuilder()
+ * .addFields(fields);
+ * ```
+ * @example
+ * Using rest parameters (variadic):
+ * ```ts
+ * const embed = new EmbedBuilder()
+ * .addFields(
+ * { name: 'Field 1', value: 'Value 1' },
+ * { name: 'Field 2', value: 'Value 2' },
+ * );
+ * ```
+ * @param fields - The fields to add
+ */
+ addFields(...fields) {
+ const normalizedFields = normalizeArray(fields);
+ validateFieldLength(normalizedFields.length, this.data.fields);
+ embedFieldsArrayPredicate.parse(normalizedFields);
+ if (this.data.fields)
+ this.data.fields.push(...normalizedFields);
+ else
+ this.data.fields = normalizedFields;
+ return this;
+ }
+ /**
+ * Removes, replaces, or inserts fields for this embed.
+ *
+ * @remarks
+ * This method behaves similarly
+ * to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/splice | Array.prototype.splice()}.
+ * The maximum amount of fields that can be added is 25.
+ *
+ * It's useful for modifying and adjusting order of the already-existing fields of an embed.
+ * @example
+ * Remove the first field:
+ * ```ts
+ * embed.spliceFields(0, 1);
+ * ```
+ * @example
+ * Remove the first n fields:
+ * ```ts
+ * const n = 4;
+ * embed.spliceFields(0, n);
+ * ```
+ * @example
+ * Remove the last field:
+ * ```ts
+ * embed.spliceFields(-1, 1);
+ * ```
+ * @param index - The index to start at
+ * @param deleteCount - The number of fields to remove
+ * @param fields - The replacing field objects
+ */
+ spliceFields(index, deleteCount, ...fields) {
+ validateFieldLength(fields.length - deleteCount, this.data.fields);
+ embedFieldsArrayPredicate.parse(fields);
+ if (this.data.fields)
+ this.data.fields.splice(index, deleteCount, ...fields);
+ else
+ this.data.fields = fields;
+ return this;
+ }
+ /**
+ * Sets the fields for this embed.
+ *
+ * @remarks
+ * This method is an alias for {@link EmbedBuilder.spliceFields}. More specifically,
+ * it splices the entire array of fields, replacing them with the provided fields.
+ *
+ * You can set a maximum of 25 fields.
+ * @param fields - The fields to set
+ */
+ setFields(...fields) {
+ this.spliceFields(0, this.data.fields?.length ?? 0, ...normalizeArray(fields));
+ return this;
+ }
+ /**
+ * Sets the author of this embed.
+ *
+ * @param options - The options to use
+ */
+ setAuthor(options) {
+ if (options === null) {
+ this.data.author = void 0;
+ return this;
+ }
+ embedAuthorPredicate.parse(options);
+ this.data.author = { name: options.name, url: options.url, icon_url: options.iconURL };
+ return this;
+ }
+ /**
+ * Sets the color of this embed.
+ *
+ * @param color - The color to use
+ */
+ setColor(color) {
+ colorPredicate.parse(color);
+ if (Array.isArray(color)) {
+ const [red, green, blue] = color;
+ this.data.color = (red << 16) + (green << 8) + blue;
+ return this;
+ }
+ this.data.color = color ?? void 0;
+ return this;
+ }
+ /**
+ * Sets the description of this embed.
+ *
+ * @param description - The description to use
+ */
+ setDescription(description) {
+ descriptionPredicate.parse(description);
+ this.data.description = description ?? void 0;
+ return this;
+ }
+ /**
+ * Sets the footer of this embed.
+ *
+ * @param options - The footer to use
+ */
+ setFooter(options) {
+ if (options === null) {
+ this.data.footer = void 0;
+ return this;
+ }
+ embedFooterPredicate.parse(options);
+ this.data.footer = { text: options.text, icon_url: options.iconURL };
+ return this;
+ }
+ /**
+ * Sets the image of this embed.
+ *
+ * @param url - The image URL to use
+ */
+ setImage(url) {
+ imageURLPredicate.parse(url);
+ this.data.image = url ? { url } : void 0;
+ return this;
+ }
+ /**
+ * Sets the thumbnail of this embed.
+ *
+ * @param url - The thumbnail URL to use
+ */
+ setThumbnail(url) {
+ imageURLPredicate.parse(url);
+ this.data.thumbnail = url ? { url } : void 0;
+ return this;
+ }
+ /**
+ * Sets the timestamp of this embed.
+ *
+ * @param timestamp - The timestamp or date to use
+ */
+ setTimestamp(timestamp = Date.now()) {
+ timestampPredicate.parse(timestamp);
+ this.data.timestamp = timestamp ? new Date(timestamp).toISOString() : void 0;
+ return this;
+ }
+ /**
+ * Sets the title for this embed.
+ *
+ * @param title - The title to use
+ */
+ setTitle(title) {
+ titlePredicate.parse(title);
+ this.data.title = title ?? void 0;
+ return this;
+ }
+ /**
+ * Sets the URL of this embed.
+ *
+ * @param url - The URL to use
+ */
+ setURL(url) {
+ urlPredicate.parse(url);
+ this.data.url = url ?? void 0;
+ return this;
+ }
+ /**
+ * Serializes this builder to API-compatible JSON data.
+ *
+ * @remarks
+ * This method runs validations on the data before serializing it.
+ * As such, it may throw an error if the data is invalid.
+ */
+ toJSON() {
+ return { ...this.data };
+ }
+};
+
+// src/index.ts
+__reExport(src_exports, require("@discordjs/formatters"), module.exports);
+
+// src/components/Assertions.ts
+var Assertions_exports2 = {};
+__export(Assertions_exports2, {
+ buttonLabelValidator: () => buttonLabelValidator,
+ buttonStyleValidator: () => buttonStyleValidator,
+ channelTypesValidator: () => channelTypesValidator,
+ customIdValidator: () => customIdValidator,
+ defaultValidator: () => defaultValidator,
+ disabledValidator: () => disabledValidator,
+ emojiValidator: () => emojiValidator,
+ jsonOptionValidator: () => jsonOptionValidator,
+ labelValueDescriptionValidator: () => labelValueDescriptionValidator,
+ minMaxValidator: () => minMaxValidator,
+ optionValidator: () => optionValidator,
+ optionsLengthValidator: () => optionsLengthValidator,
+ optionsValidator: () => optionsValidator,
+ placeholderValidator: () => placeholderValidator,
+ urlValidator: () => urlValidator,
+ validateRequiredButtonParameters: () => validateRequiredButtonParameters,
+ validateRequiredSelectMenuOptionParameters: () => validateRequiredSelectMenuOptionParameters,
+ validateRequiredSelectMenuParameters: () => validateRequiredSelectMenuParameters
+});
+var import_shapeshift2 = require("@sapphire/shapeshift");
+var import_v10 = require("discord-api-types/v10");
+
+// src/components/selectMenu/StringSelectMenuOption.ts
+var StringSelectMenuOptionBuilder = class {
+ /**
+ * Creates a new string select menu option from API data.
+ *
+ * @param data - The API data to create this string select menu option with
+ * @example
+ * Creating a string select menu option from an API data object:
+ * ```ts
+ * const selectMenuOption = new SelectMenuOptionBuilder({
+ * label: 'catchy label',
+ * value: '1',
+ * });
+ * ```
+ * @example
+ * Creating a string select menu option using setters and API data:
+ * ```ts
+ * const selectMenuOption = new SelectMenuOptionBuilder({
+ * default: true,
+ * value: '1',
+ * })
+ * .setLabel('woah');
+ * ```
+ */
+ constructor(data = {}) {
+ this.data = data;
+ }
+ static {
+ __name(this, "StringSelectMenuOptionBuilder");
+ }
+ /**
+ * Sets the label for this option.
+ *
+ * @param label - The label to use
+ */
+ setLabel(label) {
+ this.data.label = labelValueDescriptionValidator.parse(label);
+ return this;
+ }
+ /**
+ * Sets the value for this option.
+ *
+ * @param value - The value to use
+ */
+ setValue(value) {
+ this.data.value = labelValueDescriptionValidator.parse(value);
+ return this;
+ }
+ /**
+ * Sets the description for this option.
+ *
+ * @param description - The description to use
+ */
+ setDescription(description) {
+ this.data.description = labelValueDescriptionValidator.parse(description);
+ return this;
+ }
+ /**
+ * Sets whether this option is selected by default.
+ *
+ * @param isDefault - Whether this option is selected by default
+ */
+ setDefault(isDefault = true) {
+ this.data.default = defaultValidator.parse(isDefault);
+ return this;
+ }
+ /**
+ * Sets the emoji to display for this option.
+ *
+ * @param emoji - The emoji to use
+ */
+ setEmoji(emoji) {
+ this.data.emoji = emojiValidator.parse(emoji);
+ return this;
+ }
+ /**
+ * {@inheritDoc BaseSelectMenuBuilder.toJSON}
+ */
+ toJSON() {
+ validateRequiredSelectMenuOptionParameters(this.data.label, this.data.value);
+ return {
+ ...this.data
+ };
+ }
+};
+
+// src/components/Assertions.ts
+var customIdValidator = import_shapeshift2.s.string.lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(100).setValidationEnabled(isValidationEnabled);
+var emojiValidator = import_shapeshift2.s.object({
+ id: import_shapeshift2.s.string,
+ name: import_shapeshift2.s.string,
+ animated: import_shapeshift2.s.boolean
+}).partial.strict.setValidationEnabled(isValidationEnabled);
+var disabledValidator = import_shapeshift2.s.boolean;
+var buttonLabelValidator = import_shapeshift2.s.string.lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(80).setValidationEnabled(isValidationEnabled);
+var buttonStyleValidator = import_shapeshift2.s.nativeEnum(import_v10.ButtonStyle);
+var placeholderValidator = import_shapeshift2.s.string.lengthLessThanOrEqual(150).setValidationEnabled(isValidationEnabled);
+var minMaxValidator = import_shapeshift2.s.number.int.greaterThanOrEqual(0).lessThanOrEqual(25).setValidationEnabled(isValidationEnabled);
+var labelValueDescriptionValidator = import_shapeshift2.s.string.lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(100).setValidationEnabled(isValidationEnabled);
+var jsonOptionValidator = import_shapeshift2.s.object({
+ label: labelValueDescriptionValidator,
+ value: labelValueDescriptionValidator,
+ description: labelValueDescriptionValidator.optional,
+ emoji: emojiValidator.optional,
+ default: import_shapeshift2.s.boolean.optional
+}).setValidationEnabled(isValidationEnabled);
+var optionValidator = import_shapeshift2.s.instance(StringSelectMenuOptionBuilder).setValidationEnabled(isValidationEnabled);
+var optionsValidator = optionValidator.array.lengthGreaterThanOrEqual(0).setValidationEnabled(isValidationEnabled);
+var optionsLengthValidator = import_shapeshift2.s.number.int.greaterThanOrEqual(0).lessThanOrEqual(25).setValidationEnabled(isValidationEnabled);
+function validateRequiredSelectMenuParameters(options, customId) {
+ customIdValidator.parse(customId);
+ optionsValidator.parse(options);
+}
+__name(validateRequiredSelectMenuParameters, "validateRequiredSelectMenuParameters");
+var defaultValidator = import_shapeshift2.s.boolean;
+function validateRequiredSelectMenuOptionParameters(label, value) {
+ labelValueDescriptionValidator.parse(label);
+ labelValueDescriptionValidator.parse(value);
+}
+__name(validateRequiredSelectMenuOptionParameters, "validateRequiredSelectMenuOptionParameters");
+var channelTypesValidator = import_shapeshift2.s.nativeEnum(import_v10.ChannelType).array.setValidationEnabled(isValidationEnabled);
+var urlValidator = import_shapeshift2.s.string.url({
+ allowedProtocols: ["http:", "https:", "discord:"]
+}).setValidationEnabled(isValidationEnabled);
+function validateRequiredButtonParameters(style, label, emoji, customId, url) {
+ if (url && customId) {
+ throw new RangeError("URL and custom id are mutually exclusive");
+ }
+ if (!label && !emoji) {
+ throw new RangeError("Buttons must have a label and/or an emoji");
+ }
+ if (style === import_v10.ButtonStyle.Link) {
+ if (!url) {
+ throw new RangeError("Link buttons must have a url");
+ }
+ } else if (url) {
+ throw new RangeError("Non-link buttons cannot have a url");
+ }
+}
+__name(validateRequiredButtonParameters, "validateRequiredButtonParameters");
+
+// src/components/ActionRow.ts
+var import_v1011 = require("discord-api-types/v10");
+
+// src/components/Component.ts
+var ComponentBuilder = class {
+ static {
+ __name(this, "ComponentBuilder");
+ }
+ /**
+ * The API data associated with this component.
+ */
+ data;
+ /**
+ * Constructs a new kind of component.
+ *
+ * @param data - The data to construct a component out of
+ */
+ constructor(data) {
+ this.data = data;
+ }
+};
+
+// src/components/Components.ts
+var import_v1010 = require("discord-api-types/v10");
+
+// src/components/button/Button.ts
+var import_v102 = require("discord-api-types/v10");
+var ButtonBuilder = class extends ComponentBuilder {
+ static {
+ __name(this, "ButtonBuilder");
+ }
+ /**
+ * Creates a new button from API data.
+ *
+ * @param data - The API data to create this button with
+ * @example
+ * Creating a button from an API data object:
+ * ```ts
+ * const button = new ButtonBuilder({
+ * custom_id: 'a cool button',
+ * style: ButtonStyle.Primary,
+ * label: 'Click Me',
+ * emoji: {
+ * name: 'smile',
+ * id: '123456789012345678',
+ * },
+ * });
+ * ```
+ * @example
+ * Creating a button using setters and API data:
+ * ```ts
+ * const button = new ButtonBuilder({
+ * style: ButtonStyle.Secondary,
+ * label: 'Click Me',
+ * })
+ * .setEmoji({ name: '🙂' })
+ * .setCustomId('another cool button');
+ * ```
+ */
+ constructor(data) {
+ super({ type: import_v102.ComponentType.Button, ...data });
+ }
+ /**
+ * Sets the style of this button.
+ *
+ * @param style - The style to use
+ */
+ setStyle(style) {
+ this.data.style = buttonStyleValidator.parse(style);
+ return this;
+ }
+ /**
+ * Sets the URL for this button.
+ *
+ * @remarks
+ * This method is only available to buttons using the `Link` button style.
+ * Only three types of URL schemes are currently supported: `https://`, `http://`, and `discord://`.
+ * @param url - The URL to use
+ */
+ setURL(url) {
+ this.data.url = urlValidator.parse(url);
+ return this;
+ }
+ /**
+ * Sets the custom id for this button.
+ *
+ * @remarks
+ * This method is only applicable to buttons that are not using the `Link` button style.
+ * @param customId - The custom id to use
+ */
+ setCustomId(customId) {
+ this.data.custom_id = customIdValidator.parse(customId);
+ return this;
+ }
+ /**
+ * Sets the emoji to display on this button.
+ *
+ * @param emoji - The emoji to use
+ */
+ setEmoji(emoji) {
+ this.data.emoji = emojiValidator.parse(emoji);
+ return this;
+ }
+ /**
+ * Sets whether this button is disabled.
+ *
+ * @param disabled - Whether to disable this button
+ */
+ setDisabled(disabled = true) {
+ this.data.disabled = disabledValidator.parse(disabled);
+ return this;
+ }
+ /**
+ * Sets the label for this button.
+ *
+ * @param label - The label to use
+ */
+ setLabel(label) {
+ this.data.label = buttonLabelValidator.parse(label);
+ return this;
+ }
+ /**
+ * {@inheritDoc ComponentBuilder.toJSON}
+ */
+ toJSON() {
+ validateRequiredButtonParameters(
+ this.data.style,
+ this.data.label,
+ this.data.emoji,
+ this.data.custom_id,
+ this.data.url
+ );
+ return {
+ ...this.data
+ };
+ }
+};
+
+// src/components/selectMenu/ChannelSelectMenu.ts
+var import_v103 = require("discord-api-types/v10");
+
+// src/components/selectMenu/BaseSelectMenu.ts
+var BaseSelectMenuBuilder = class extends ComponentBuilder {
+ static {
+ __name(this, "BaseSelectMenuBuilder");
+ }
+ /**
+ * Sets the placeholder for this select menu.
+ *
+ * @param placeholder - The placeholder to use
+ */
+ setPlaceholder(placeholder) {
+ this.data.placeholder = placeholderValidator.parse(placeholder);
+ return this;
+ }
+ /**
+ * Sets the minimum values that must be selected in the select menu.
+ *
+ * @param minValues - The minimum values that must be selected
+ */
+ setMinValues(minValues) {
+ this.data.min_values = minMaxValidator.parse(minValues);
+ return this;
+ }
+ /**
+ * Sets the maximum values that must be selected in the select menu.
+ *
+ * @param maxValues - The maximum values that must be selected
+ */
+ setMaxValues(maxValues) {
+ this.data.max_values = minMaxValidator.parse(maxValues);
+ return this;
+ }
+ /**
+ * Sets the custom id for this select menu.
+ *
+ * @param customId - The custom id to use
+ */
+ setCustomId(customId) {
+ this.data.custom_id = customIdValidator.parse(customId);
+ return this;
+ }
+ /**
+ * Sets whether this select menu is disabled.
+ *
+ * @param disabled - Whether this select menu is disabled
+ */
+ setDisabled(disabled = true) {
+ this.data.disabled = disabledValidator.parse(disabled);
+ return this;
+ }
+ /**
+ * {@inheritDoc ComponentBuilder.toJSON}
+ */
+ toJSON() {
+ customIdValidator.parse(this.data.custom_id);
+ return {
+ ...this.data
+ };
+ }
+};
+
+// src/components/selectMenu/ChannelSelectMenu.ts
+var ChannelSelectMenuBuilder = class extends BaseSelectMenuBuilder {
+ static {
+ __name(this, "ChannelSelectMenuBuilder");
+ }
+ /**
+ * Creates a new select menu from API data.
+ *
+ * @param data - The API data to create this select menu with
+ * @example
+ * Creating a select menu from an API data object:
+ * ```ts
+ * const selectMenu = new ChannelSelectMenuBuilder({
+ * custom_id: 'a cool select menu',
+ * placeholder: 'select an option',
+ * max_values: 2,
+ * });
+ * ```
+ * @example
+ * Creating a select menu using setters and API data:
+ * ```ts
+ * const selectMenu = new ChannelSelectMenuBuilder({
+ * custom_id: 'a cool select menu',
+ * })
+ * .addChannelTypes(ChannelType.GuildText, ChannelType.GuildAnnouncement)
+ * .setMinValues(2);
+ * ```
+ */
+ constructor(data) {
+ super({ ...data, type: import_v103.ComponentType.ChannelSelect });
+ }
+ /**
+ * Adds channel types to this select menu.
+ *
+ * @param types - The channel types to use
+ */
+ addChannelTypes(...types) {
+ const normalizedTypes = normalizeArray(types);
+ this.data.channel_types ??= [];
+ this.data.channel_types.push(...channelTypesValidator.parse(normalizedTypes));
+ return this;
+ }
+ /**
+ * Sets channel types for this select menu.
+ *
+ * @param types - The channel types to use
+ */
+ setChannelTypes(...types) {
+ const normalizedTypes = normalizeArray(types);
+ this.data.channel_types ??= [];
+ this.data.channel_types.splice(0, this.data.channel_types.length, ...channelTypesValidator.parse(normalizedTypes));
+ return this;
+ }
+ /**
+ * Adds default channels to this auto populated select menu.
+ *
+ * @param channels - The channels to add
+ */
+ addDefaultChannels(...channels) {
+ const normalizedValues = normalizeArray(channels);
+ optionsLengthValidator.parse((this.data.default_values?.length ?? 0) + normalizedValues.length);
+ this.data.default_values ??= [];
+ this.data.default_values.push(
+ ...normalizedValues.map((id) => ({
+ id,
+ type: import_v103.SelectMenuDefaultValueType.Channel
+ }))
+ );
+ return this;
+ }
+ /**
+ * Sets default channels to this auto populated select menu.
+ *
+ * @param channels - The channels to set
+ */
+ setDefaultChannels(...channels) {
+ const normalizedValues = normalizeArray(channels);
+ optionsLengthValidator.parse(normalizedValues.length);
+ this.data.default_values = normalizedValues.map((id) => ({
+ id,
+ type: import_v103.SelectMenuDefaultValueType.Channel
+ }));
+ return this;
+ }
+ /**
+ * {@inheritDoc BaseSelectMenuBuilder.toJSON}
+ */
+ toJSON() {
+ customIdValidator.parse(this.data.custom_id);
+ return {
+ ...this.data
+ };
+ }
+};
+
+// src/components/selectMenu/MentionableSelectMenu.ts
+var import_v104 = require("discord-api-types/v10");
+var MentionableSelectMenuBuilder = class extends BaseSelectMenuBuilder {
+ static {
+ __name(this, "MentionableSelectMenuBuilder");
+ }
+ /**
+ * Creates a new select menu from API data.
+ *
+ * @param data - The API data to create this select menu with
+ * @example
+ * Creating a select menu from an API data object:
+ * ```ts
+ * const selectMenu = new MentionableSelectMenuBuilder({
+ * custom_id: 'a cool select menu',
+ * placeholder: 'select an option',
+ * max_values: 2,
+ * });
+ * ```
+ * @example
+ * Creating a select menu using setters and API data:
+ * ```ts
+ * const selectMenu = new MentionableSelectMenuBuilder({
+ * custom_id: 'a cool select menu',
+ * })
+ * .setMinValues(1);
+ * ```
+ */
+ constructor(data) {
+ super({ ...data, type: import_v104.ComponentType.MentionableSelect });
+ }
+ /**
+ * Adds default roles to this auto populated select menu.
+ *
+ * @param roles - The roles to add
+ */
+ addDefaultRoles(...roles) {
+ const normalizedValues = normalizeArray(roles);
+ optionsLengthValidator.parse((this.data.default_values?.length ?? 0) + normalizedValues.length);
+ this.data.default_values ??= [];
+ this.data.default_values.push(
+ ...normalizedValues.map((id) => ({
+ id,
+ type: import_v104.SelectMenuDefaultValueType.Role
+ }))
+ );
+ return this;
+ }
+ /**
+ * Adds default users to this auto populated select menu.
+ *
+ * @param users - The users to add
+ */
+ addDefaultUsers(...users) {
+ const normalizedValues = normalizeArray(users);
+ optionsLengthValidator.parse((this.data.default_values?.length ?? 0) + normalizedValues.length);
+ this.data.default_values ??= [];
+ this.data.default_values.push(
+ ...normalizedValues.map((id) => ({
+ id,
+ type: import_v104.SelectMenuDefaultValueType.User
+ }))
+ );
+ return this;
+ }
+ /**
+ * Adds default values to this auto populated select menu.
+ *
+ * @param values - The values to add
+ */
+ addDefaultValues(...values) {
+ const normalizedValues = normalizeArray(values);
+ optionsLengthValidator.parse((this.data.default_values?.length ?? 0) + normalizedValues.length);
+ this.data.default_values ??= [];
+ this.data.default_values.push(...normalizedValues);
+ return this;
+ }
+ /**
+ * Sets default values to this auto populated select menu.
+ *
+ * @param values - The values to set
+ */
+ setDefaultValues(...values) {
+ const normalizedValues = normalizeArray(values);
+ optionsLengthValidator.parse(normalizedValues.length);
+ this.data.default_values = normalizedValues;
+ return this;
+ }
+};
+
+// src/components/selectMenu/RoleSelectMenu.ts
+var import_v105 = require("discord-api-types/v10");
+var RoleSelectMenuBuilder = class extends BaseSelectMenuBuilder {
+ static {
+ __name(this, "RoleSelectMenuBuilder");
+ }
+ /**
+ * Creates a new select menu from API data.
+ *
+ * @param data - The API data to create this select menu with
+ * @example
+ * Creating a select menu from an API data object:
+ * ```ts
+ * const selectMenu = new RoleSelectMenuBuilder({
+ * custom_id: 'a cool select menu',
+ * placeholder: 'select an option',
+ * max_values: 2,
+ * });
+ * ```
+ * @example
+ * Creating a select menu using setters and API data:
+ * ```ts
+ * const selectMenu = new RoleSelectMenuBuilder({
+ * custom_id: 'a cool select menu',
+ * })
+ * .setMinValues(1);
+ * ```
+ */
+ constructor(data) {
+ super({ ...data, type: import_v105.ComponentType.RoleSelect });
+ }
+ /**
+ * Adds default roles to this auto populated select menu.
+ *
+ * @param roles - The roles to add
+ */
+ addDefaultRoles(...roles) {
+ const normalizedValues = normalizeArray(roles);
+ optionsLengthValidator.parse((this.data.default_values?.length ?? 0) + normalizedValues.length);
+ this.data.default_values ??= [];
+ this.data.default_values.push(
+ ...normalizedValues.map((id) => ({
+ id,
+ type: import_v105.SelectMenuDefaultValueType.Role
+ }))
+ );
+ return this;
+ }
+ /**
+ * Sets default roles to this auto populated select menu.
+ *
+ * @param roles - The roles to set
+ */
+ setDefaultRoles(...roles) {
+ const normalizedValues = normalizeArray(roles);
+ optionsLengthValidator.parse(normalizedValues.length);
+ this.data.default_values = normalizedValues.map((id) => ({
+ id,
+ type: import_v105.SelectMenuDefaultValueType.Role
+ }));
+ return this;
+ }
+};
+
+// src/components/selectMenu/StringSelectMenu.ts
+var import_v106 = require("discord-api-types/v10");
+var StringSelectMenuBuilder = class extends BaseSelectMenuBuilder {
+ static {
+ __name(this, "StringSelectMenuBuilder");
+ }
+ /**
+ * The options within this select menu.
+ */
+ options;
+ /**
+ * Creates a new select menu from API data.
+ *
+ * @param data - The API data to create this select menu with
+ * @example
+ * Creating a select menu from an API data object:
+ * ```ts
+ * const selectMenu = new StringSelectMenuBuilder({
+ * custom_id: 'a cool select menu',
+ * placeholder: 'select an option',
+ * max_values: 2,
+ * options: [
+ * { label: 'option 1', value: '1' },
+ * { label: 'option 2', value: '2' },
+ * { label: 'option 3', value: '3' },
+ * ],
+ * });
+ * ```
+ * @example
+ * Creating a select menu using setters and API data:
+ * ```ts
+ * const selectMenu = new StringSelectMenuBuilder({
+ * custom_id: 'a cool select menu',
+ * })
+ * .setMinValues(1)
+ * .addOptions({
+ * label: 'Catchy',
+ * value: 'catch',
+ * });
+ * ```
+ */
+ constructor(data) {
+ const { options, ...initData } = data ?? {};
+ super({ ...initData, type: import_v106.ComponentType.StringSelect });
+ this.options = options?.map((option) => new StringSelectMenuOptionBuilder(option)) ?? [];
+ }
+ /**
+ * Adds options to this select menu.
+ *
+ * @param options - The options to add
+ */
+ addOptions(...options) {
+ const normalizedOptions = normalizeArray(options);
+ optionsLengthValidator.parse(this.options.length + normalizedOptions.length);
+ this.options.push(
+ ...normalizedOptions.map(
+ (normalizedOption) => normalizedOption instanceof StringSelectMenuOptionBuilder ? normalizedOption : new StringSelectMenuOptionBuilder(jsonOptionValidator.parse(normalizedOption))
+ )
+ );
+ return this;
+ }
+ /**
+ * Sets the options for this select menu.
+ *
+ * @param options - The options to set
+ */
+ setOptions(...options) {
+ return this.spliceOptions(0, this.options.length, ...options);
+ }
+ /**
+ * Removes, replaces, or inserts options for this select menu.
+ *
+ * @remarks
+ * This method behaves similarly
+ * to {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice | Array.prototype.splice()}.
+ * It's useful for modifying and adjusting the order of existing options.
+ * @example
+ * Remove the first option:
+ * ```ts
+ * selectMenu.spliceOptions(0, 1);
+ * ```
+ * @example
+ * Remove the first n option:
+ * ```ts
+ * const n = 4;
+ * selectMenu.spliceOptions(0, n);
+ * ```
+ * @example
+ * Remove the last option:
+ * ```ts
+ * selectMenu.spliceOptions(-1, 1);
+ * ```
+ * @param index - The index to start at
+ * @param deleteCount - The number of options to remove
+ * @param options - The replacing option objects or builders
+ */
+ spliceOptions(index, deleteCount, ...options) {
+ const normalizedOptions = normalizeArray(options);
+ const clone = [...this.options];
+ clone.splice(
+ index,
+ deleteCount,
+ ...normalizedOptions.map(
+ (normalizedOption) => normalizedOption instanceof StringSelectMenuOptionBuilder ? normalizedOption : new StringSelectMenuOptionBuilder(jsonOptionValidator.parse(normalizedOption))
+ )
+ );
+ optionsLengthValidator.parse(clone.length);
+ this.options.splice(0, this.options.length, ...clone);
+ return this;
+ }
+ /**
+ * {@inheritDoc BaseSelectMenuBuilder.toJSON}
+ */
+ toJSON() {
+ validateRequiredSelectMenuParameters(this.options, this.data.custom_id);
+ return {
+ ...this.data,
+ options: this.options.map((option) => option.toJSON())
+ };
+ }
+};
+
+// src/components/selectMenu/UserSelectMenu.ts
+var import_v107 = require("discord-api-types/v10");
+var UserSelectMenuBuilder = class extends BaseSelectMenuBuilder {
+ static {
+ __name(this, "UserSelectMenuBuilder");
+ }
+ /**
+ * Creates a new select menu from API data.
+ *
+ * @param data - The API data to create this select menu with
+ * @example
+ * Creating a select menu from an API data object:
+ * ```ts
+ * const selectMenu = new UserSelectMenuBuilder({
+ * custom_id: 'a cool select menu',
+ * placeholder: 'select an option',
+ * max_values: 2,
+ * });
+ * ```
+ * @example
+ * Creating a select menu using setters and API data:
+ * ```ts
+ * const selectMenu = new UserSelectMenuBuilder({
+ * custom_id: 'a cool select menu',
+ * })
+ * .setMinValues(1);
+ * ```
+ */
+ constructor(data) {
+ super({ ...data, type: import_v107.ComponentType.UserSelect });
+ }
+ /**
+ * Adds default users to this auto populated select menu.
+ *
+ * @param users - The users to add
+ */
+ addDefaultUsers(...users) {
+ const normalizedValues = normalizeArray(users);
+ optionsLengthValidator.parse((this.data.default_values?.length ?? 0) + normalizedValues.length);
+ this.data.default_values ??= [];
+ this.data.default_values.push(
+ ...normalizedValues.map((id) => ({
+ id,
+ type: import_v107.SelectMenuDefaultValueType.User
+ }))
+ );
+ return this;
+ }
+ /**
+ * Sets default users to this auto populated select menu.
+ *
+ * @param users - The users to set
+ */
+ setDefaultUsers(...users) {
+ const normalizedValues = normalizeArray(users);
+ optionsLengthValidator.parse(normalizedValues.length);
+ this.data.default_values = normalizedValues.map((id) => ({
+ id,
+ type: import_v107.SelectMenuDefaultValueType.User
+ }));
+ return this;
+ }
+};
+
+// src/components/textInput/TextInput.ts
+var import_util = require("@discordjs/util");
+var import_v109 = require("discord-api-types/v10");
+var import_fast_deep_equal = __toESM(require("fast-deep-equal"));
+
+// src/components/textInput/Assertions.ts
+var Assertions_exports3 = {};
+__export(Assertions_exports3, {
+ labelValidator: () => labelValidator,
+ maxLengthValidator: () => maxLengthValidator,
+ minLengthValidator: () => minLengthValidator,
+ placeholderValidator: () => placeholderValidator2,
+ requiredValidator: () => requiredValidator,
+ textInputStyleValidator: () => textInputStyleValidator,
+ validateRequiredParameters: () => validateRequiredParameters,
+ valueValidator: () => valueValidator
+});
+var import_shapeshift3 = require("@sapphire/shapeshift");
+var import_v108 = require("discord-api-types/v10");
+var textInputStyleValidator = import_shapeshift3.s.nativeEnum(import_v108.TextInputStyle);
+var minLengthValidator = import_shapeshift3.s.number.int.greaterThanOrEqual(0).lessThanOrEqual(4e3).setValidationEnabled(isValidationEnabled);
+var maxLengthValidator = import_shapeshift3.s.number.int.greaterThanOrEqual(1).lessThanOrEqual(4e3).setValidationEnabled(isValidationEnabled);
+var requiredValidator = import_shapeshift3.s.boolean;
+var valueValidator = import_shapeshift3.s.string.lengthLessThanOrEqual(4e3).setValidationEnabled(isValidationEnabled);
+var placeholderValidator2 = import_shapeshift3.s.string.lengthLessThanOrEqual(100).setValidationEnabled(isValidationEnabled);
+var labelValidator = import_shapeshift3.s.string.lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(45).setValidationEnabled(isValidationEnabled);
+function validateRequiredParameters(customId, style, label) {
+ customIdValidator.parse(customId);
+ textInputStyleValidator.parse(style);
+ labelValidator.parse(label);
+}
+__name(validateRequiredParameters, "validateRequiredParameters");
+
+// src/components/textInput/TextInput.ts
+var TextInputBuilder = class extends ComponentBuilder {
+ static {
+ __name(this, "TextInputBuilder");
+ }
+ /**
+ * Creates a new text input from API data.
+ *
+ * @param data - The API data to create this text input with
+ * @example
+ * Creating a select menu option from an API data object:
+ * ```ts
+ * const textInput = new TextInputBuilder({
+ * custom_id: 'a cool select menu',
+ * label: 'Type something',
+ * style: TextInputStyle.Short,
+ * });
+ * ```
+ * @example
+ * Creating a select menu option using setters and API data:
+ * ```ts
+ * const textInput = new TextInputBuilder({
+ * label: 'Type something else',
+ * })
+ * .setCustomId('woah')
+ * .setStyle(TextInputStyle.Paragraph);
+ * ```
+ */
+ constructor(data) {
+ super({ type: import_v109.ComponentType.TextInput, ...data });
+ }
+ /**
+ * Sets the custom id for this text input.
+ *
+ * @param customId - The custom id to use
+ */
+ setCustomId(customId) {
+ this.data.custom_id = customIdValidator.parse(customId);
+ return this;
+ }
+ /**
+ * Sets the label for this text input.
+ *
+ * @param label - The label to use
+ */
+ setLabel(label) {
+ this.data.label = labelValidator.parse(label);
+ return this;
+ }
+ /**
+ * Sets the style for this text input.
+ *
+ * @param style - The style to use
+ */
+ setStyle(style) {
+ this.data.style = textInputStyleValidator.parse(style);
+ return this;
+ }
+ /**
+ * Sets the minimum length of text for this text input.
+ *
+ * @param minLength - The minimum length of text for this text input
+ */
+ setMinLength(minLength) {
+ this.data.min_length = minLengthValidator.parse(minLength);
+ return this;
+ }
+ /**
+ * Sets the maximum length of text for this text input.
+ *
+ * @param maxLength - The maximum length of text for this text input
+ */
+ setMaxLength(maxLength) {
+ this.data.max_length = maxLengthValidator.parse(maxLength);
+ return this;
+ }
+ /**
+ * Sets the placeholder for this text input.
+ *
+ * @param placeholder - The placeholder to use
+ */
+ setPlaceholder(placeholder) {
+ this.data.placeholder = placeholderValidator2.parse(placeholder);
+ return this;
+ }
+ /**
+ * Sets the value for this text input.
+ *
+ * @param value - The value to use
+ */
+ setValue(value) {
+ this.data.value = valueValidator.parse(value);
+ return this;
+ }
+ /**
+ * Sets whether this text input is required.
+ *
+ * @param required - Whether this text input is required
+ */
+ setRequired(required = true) {
+ this.data.required = requiredValidator.parse(required);
+ return this;
+ }
+ /**
+ * {@inheritDoc ComponentBuilder.toJSON}
+ */
+ toJSON() {
+ validateRequiredParameters(this.data.custom_id, this.data.style, this.data.label);
+ return {
+ ...this.data
+ };
+ }
+ /**
+ * Whether this is equal to another structure.
+ */
+ equals(other) {
+ if ((0, import_util.isJSONEncodable)(other)) {
+ return (0, import_fast_deep_equal.default)(other.toJSON(), this.data);
+ }
+ return (0, import_fast_deep_equal.default)(other, this.data);
+ }
+};
+
+// src/components/Components.ts
+function createComponentBuilder(data) {
+ if (data instanceof ComponentBuilder) {
+ return data;
+ }
+ switch (data.type) {
+ case import_v1010.ComponentType.ActionRow:
+ return new ActionRowBuilder(data);
+ case import_v1010.ComponentType.Button:
+ return new ButtonBuilder(data);
+ case import_v1010.ComponentType.StringSelect:
+ return new StringSelectMenuBuilder(data);
+ case import_v1010.ComponentType.TextInput:
+ return new TextInputBuilder(data);
+ case import_v1010.ComponentType.UserSelect:
+ return new UserSelectMenuBuilder(data);
+ case import_v1010.ComponentType.RoleSelect:
+ return new RoleSelectMenuBuilder(data);
+ case import_v1010.ComponentType.MentionableSelect:
+ return new MentionableSelectMenuBuilder(data);
+ case import_v1010.ComponentType.ChannelSelect:
+ return new ChannelSelectMenuBuilder(data);
+ default:
+ throw new Error(`Cannot properly serialize component type: ${data.type}`);
+ }
+}
+__name(createComponentBuilder, "createComponentBuilder");
+
+// src/components/ActionRow.ts
+var ActionRowBuilder = class extends ComponentBuilder {
+ static {
+ __name(this, "ActionRowBuilder");
+ }
+ /**
+ * The components within this action row.
+ */
+ components;
+ /**
+ * Creates a new action row from API data.
+ *
+ * @param data - The API data to create this action row with
+ * @example
+ * Creating an action row from an API data object:
+ * ```ts
+ * const actionRow = new ActionRowBuilder({
+ * components: [
+ * {
+ * custom_id: "custom id",
+ * label: "Type something",
+ * style: TextInputStyle.Short,
+ * type: ComponentType.TextInput,
+ * },
+ * ],
+ * });
+ * ```
+ * @example
+ * Creating an action row using setters and API data:
+ * ```ts
+ * const actionRow = new ActionRowBuilder({
+ * components: [
+ * {
+ * custom_id: "custom id",
+ * label: "Click me",
+ * style: ButtonStyle.Primary,
+ * type: ComponentType.Button,
+ * },
+ * ],
+ * })
+ * .addComponents(button2, button3);
+ * ```
+ */
+ constructor({ components, ...data } = {}) {
+ super({ type: import_v1011.ComponentType.ActionRow, ...data });
+ this.components = components?.map((component) => createComponentBuilder(component)) ?? [];
+ }
+ /**
+ * Adds components to this action row.
+ *
+ * @param components - The components to add
+ */
+ addComponents(...components) {
+ this.components.push(...normalizeArray(components));
+ return this;
+ }
+ /**
+ * Sets components for this action row.
+ *
+ * @param components - The components to set
+ */
+ setComponents(...components) {
+ this.components.splice(0, this.components.length, ...normalizeArray(components));
+ return this;
+ }
+ /**
+ * {@inheritDoc ComponentBuilder.toJSON}
+ */
+ toJSON() {
+ return {
+ ...this.data,
+ components: this.components.map((component) => component.toJSON())
+ };
+ }
+};
+
+// src/interactions/modals/Assertions.ts
+var Assertions_exports4 = {};
+__export(Assertions_exports4, {
+ componentsValidator: () => componentsValidator,
+ titleValidator: () => titleValidator,
+ validateRequiredParameters: () => validateRequiredParameters2
+});
+var import_shapeshift4 = require("@sapphire/shapeshift");
+var titleValidator = import_shapeshift4.s.string.lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(45).setValidationEnabled(isValidationEnabled);
+var componentsValidator = import_shapeshift4.s.instance(ActionRowBuilder).array.lengthGreaterThanOrEqual(1).setValidationEnabled(isValidationEnabled);
+function validateRequiredParameters2(customId, title, components) {
+ customIdValidator.parse(customId);
+ titleValidator.parse(title);
+ componentsValidator.parse(components);
+}
+__name(validateRequiredParameters2, "validateRequiredParameters");
+
+// src/interactions/modals/Modal.ts
+var ModalBuilder = class {
+ static {
+ __name(this, "ModalBuilder");
+ }
+ /**
+ * The API data associated with this modal.
+ */
+ data;
+ /**
+ * The components within this modal.
+ */
+ components = [];
+ /**
+ * Creates a new modal from API data.
+ *
+ * @param data - The API data to create this modal with
+ */
+ constructor({ components, ...data } = {}) {
+ this.data = { ...data };
+ this.components = components?.map((component) => createComponentBuilder(component)) ?? [];
+ }
+ /**
+ * Sets the title of this modal.
+ *
+ * @param title - The title to use
+ */
+ setTitle(title) {
+ this.data.title = titleValidator.parse(title);
+ return this;
+ }
+ /**
+ * Sets the custom id of this modal.
+ *
+ * @param customId - The custom id to use
+ */
+ setCustomId(customId) {
+ this.data.custom_id = customIdValidator.parse(customId);
+ return this;
+ }
+ /**
+ * Adds components to this modal.
+ *
+ * @param components - The components to add
+ */
+ addComponents(...components) {
+ this.components.push(
+ ...normalizeArray(components).map(
+ (component) => component instanceof ActionRowBuilder ? component : new ActionRowBuilder(component)
+ )
+ );
+ return this;
+ }
+ /**
+ * Sets components for this modal.
+ *
+ * @param components - The components to set
+ */
+ setComponents(...components) {
+ this.components.splice(0, this.components.length, ...normalizeArray(components));
+ return this;
+ }
+ /**
+ * {@inheritDoc ComponentBuilder.toJSON}
+ */
+ toJSON() {
+ validateRequiredParameters2(this.data.custom_id, this.data.title, this.components);
+ return {
+ ...this.data,
+ components: this.components.map((component) => component.toJSON())
+ };
+ }
+};
+
+// src/interactions/slashCommands/Assertions.ts
+var Assertions_exports5 = {};
+__export(Assertions_exports5, {
+ assertReturnOfBuilder: () => assertReturnOfBuilder,
+ localizationMapPredicate: () => localizationMapPredicate,
+ validateChoicesLength: () => validateChoicesLength,
+ validateDMPermission: () => validateDMPermission,
+ validateDefaultMemberPermissions: () => validateDefaultMemberPermissions,
+ validateDefaultPermission: () => validateDefaultPermission,
+ validateDescription: () => validateDescription,
+ validateLocale: () => validateLocale,
+ validateLocalizationMap: () => validateLocalizationMap,
+ validateMaxOptionsLength: () => validateMaxOptionsLength,
+ validateNSFW: () => validateNSFW,
+ validateName: () => validateName,
+ validateRequired: () => validateRequired,
+ validateRequiredParameters: () => validateRequiredParameters3
+});
+var import_shapeshift5 = require("@sapphire/shapeshift");
+var import_v1012 = require("discord-api-types/v10");
+var namePredicate = import_shapeshift5.s.string.lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(32).regex(/^[\p{Ll}\p{Lm}\p{Lo}\p{N}\p{sc=Devanagari}\p{sc=Thai}_-]+$/u).setValidationEnabled(isValidationEnabled);
+function validateName(name) {
+ namePredicate.parse(name);
+}
+__name(validateName, "validateName");
+var descriptionPredicate2 = import_shapeshift5.s.string.lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(100).setValidationEnabled(isValidationEnabled);
+var localePredicate = import_shapeshift5.s.nativeEnum(import_v1012.Locale);
+function validateDescription(description) {
+ descriptionPredicate2.parse(description);
+}
+__name(validateDescription, "validateDescription");
+var maxArrayLengthPredicate = import_shapeshift5.s.unknown.array.lengthLessThanOrEqual(25).setValidationEnabled(isValidationEnabled);
+function validateLocale(locale) {
+ return localePredicate.parse(locale);
+}
+__name(validateLocale, "validateLocale");
+function validateMaxOptionsLength(options) {
+ maxArrayLengthPredicate.parse(options);
+}
+__name(validateMaxOptionsLength, "validateMaxOptionsLength");
+function validateRequiredParameters3(name, description, options) {
+ validateName(name);
+ validateDescription(description);
+ validateMaxOptionsLength(options);
+}
+__name(validateRequiredParameters3, "validateRequiredParameters");
+var booleanPredicate = import_shapeshift5.s.boolean;
+function validateDefaultPermission(value) {
+ booleanPredicate.parse(value);
+}
+__name(validateDefaultPermission, "validateDefaultPermission");
+function validateRequired(required) {
+ booleanPredicate.parse(required);
+}
+__name(validateRequired, "validateRequired");
+var choicesLengthPredicate = import_shapeshift5.s.number.lessThanOrEqual(25).setValidationEnabled(isValidationEnabled);
+function validateChoicesLength(amountAdding, choices) {
+ choicesLengthPredicate.parse((choices?.length ?? 0) + amountAdding);
+}
+__name(validateChoicesLength, "validateChoicesLength");
+function assertReturnOfBuilder(input, ExpectedInstanceOf) {
+ import_shapeshift5.s.instance(ExpectedInstanceOf).parse(input);
+}
+__name(assertReturnOfBuilder, "assertReturnOfBuilder");
+var localizationMapPredicate = import_shapeshift5.s.object(Object.fromEntries(Object.values(import_v1012.Locale).map((locale) => [locale, import_shapeshift5.s.string.nullish]))).strict.nullish.setValidationEnabled(isValidationEnabled);
+function validateLocalizationMap(value) {
+ localizationMapPredicate.parse(value);
+}
+__name(validateLocalizationMap, "validateLocalizationMap");
+var dmPermissionPredicate = import_shapeshift5.s.boolean.nullish;
+function validateDMPermission(value) {
+ dmPermissionPredicate.parse(value);
+}
+__name(validateDMPermission, "validateDMPermission");
+var memberPermissionPredicate = import_shapeshift5.s.union(
+ import_shapeshift5.s.bigint.transform((value) => value.toString()),
+ import_shapeshift5.s.number.safeInt.transform((value) => value.toString()),
+ import_shapeshift5.s.string.regex(/^\d+$/)
+).nullish;
+function validateDefaultMemberPermissions(permissions) {
+ return memberPermissionPredicate.parse(permissions);
+}
+__name(validateDefaultMemberPermissions, "validateDefaultMemberPermissions");
+function validateNSFW(value) {
+ booleanPredicate.parse(value);
+}
+__name(validateNSFW, "validateNSFW");
+
+// src/interactions/slashCommands/SlashCommandBuilder.ts
+var import_ts_mixer6 = require("ts-mixer");
+
+// src/interactions/slashCommands/mixins/NameAndDescription.ts
+var SharedNameAndDescription = class {
+ static {
+ __name(this, "SharedNameAndDescription");
+ }
+ /**
+ * The name of this command.
+ */
+ name;
+ /**
+ * The name localizations of this command.
+ */
+ name_localizations;
+ /**
+ * The description of this command.
+ */
+ description;
+ /**
+ * The description localizations of this command.
+ */
+ description_localizations;
+ /**
+ * Sets the name of this command.
+ *
+ * @param name - The name to use
+ */
+ setName(name) {
+ validateName(name);
+ Reflect.set(this, "name", name);
+ return this;
+ }
+ /**
+ * Sets the description of this command.
+ *
+ * @param description - The description to use
+ */
+ setDescription(description) {
+ validateDescription(description);
+ Reflect.set(this, "description", description);
+ return this;
+ }
+ /**
+ * Sets a name localization for this command.
+ *
+ * @param locale - The locale to set
+ * @param localizedName - The localized name for the given `locale`
+ */
+ setNameLocalization(locale, localizedName) {
+ if (!this.name_localizations) {
+ Reflect.set(this, "name_localizations", {});
+ }
+ const parsedLocale = validateLocale(locale);
+ if (localizedName === null) {
+ this.name_localizations[parsedLocale] = null;
+ return this;
+ }
+ validateName(localizedName);
+ this.name_localizations[parsedLocale] = localizedName;
+ return this;
+ }
+ /**
+ * Sets the name localizations for this command.
+ *
+ * @param localizedNames - The object of localized names to set
+ */
+ setNameLocalizations(localizedNames) {
+ if (localizedNames === null) {
+ Reflect.set(this, "name_localizations", null);
+ return this;
+ }
+ Reflect.set(this, "name_localizations", {});
+ for (const args of Object.entries(localizedNames)) {
+ this.setNameLocalization(...args);
+ }
+ return this;
+ }
+ /**
+ * Sets a description localization for this command.
+ *
+ * @param locale - The locale to set
+ * @param localizedDescription - The localized description for the given locale
+ */
+ setDescriptionLocalization(locale, localizedDescription) {
+ if (!this.description_localizations) {
+ Reflect.set(this, "description_localizations", {});
+ }
+ const parsedLocale = validateLocale(locale);
+ if (localizedDescription === null) {
+ this.description_localizations[parsedLocale] = null;
+ return this;
+ }
+ validateDescription(localizedDescription);
+ this.description_localizations[parsedLocale] = localizedDescription;
+ return this;
+ }
+ /**
+ * Sets the description localizations for this command.
+ *
+ * @param localizedDescriptions - The object of localized descriptions to set
+ */
+ setDescriptionLocalizations(localizedDescriptions) {
+ if (localizedDescriptions === null) {
+ Reflect.set(this, "description_localizations", null);
+ return this;
+ }
+ Reflect.set(this, "description_localizations", {});
+ for (const args of Object.entries(localizedDescriptions)) {
+ this.setDescriptionLocalization(...args);
+ }
+ return this;
+ }
+};
+
+// src/interactions/slashCommands/mixins/SharedSlashCommand.ts
+var SharedSlashCommand = class {
+ static {
+ __name(this, "SharedSlashCommand");
+ }
+ name = void 0;
+ name_localizations;
+ description = void 0;
+ description_localizations;
+ options = [];
+ /**
+ * Sets whether the command is enabled by default when the application is added to a guild.
+ *
+ * @remarks
+ * If set to `false`, you will have to later `PUT` the permissions for this command.
+ * @param value - Whether or not to enable this command by default
+ * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}
+ * @deprecated Use {@link SharedSlashCommand.setDefaultMemberPermissions} or {@link SharedSlashCommand.setDMPermission} instead.
+ */
+ setDefaultPermission(value) {
+ validateDefaultPermission(value);
+ Reflect.set(this, "default_permission", value);
+ return this;
+ }
+ /**
+ * Sets the default permissions a member should have in order to run the command.
+ *
+ * @remarks
+ * You can set this to `'0'` to disable the command by default.
+ * @param permissions - The permissions bit field to set
+ * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}
+ */
+ setDefaultMemberPermissions(permissions) {
+ const permissionValue = validateDefaultMemberPermissions(permissions);
+ Reflect.set(this, "default_member_permissions", permissionValue);
+ return this;
+ }
+ /**
+ * Sets if the command is available in direct messages with the application.
+ *
+ * @remarks
+ * By default, commands are visible. This method is only for global commands.
+ * @param enabled - Whether the command should be enabled in direct messages
+ * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}
+ */
+ setDMPermission(enabled) {
+ validateDMPermission(enabled);
+ Reflect.set(this, "dm_permission", enabled);
+ return this;
+ }
+ /**
+ * Sets whether this command is NSFW.
+ *
+ * @param nsfw - Whether this command is NSFW
+ */
+ setNSFW(nsfw = true) {
+ validateNSFW(nsfw);
+ Reflect.set(this, "nsfw", nsfw);
+ return this;
+ }
+ /**
+ * Serializes this builder to API-compatible JSON data.
+ *
+ * @remarks
+ * This method runs validations on the data before serializing it.
+ * As such, it may throw an error if the data is invalid.
+ */
+ toJSON() {
+ validateRequiredParameters3(this.name, this.description, this.options);
+ validateLocalizationMap(this.name_localizations);
+ validateLocalizationMap(this.description_localizations);
+ return {
+ ...this,
+ options: this.options.map((option) => option.toJSON())
+ };
+ }
+};
+
+// src/interactions/slashCommands/options/attachment.ts
+var import_v1013 = require("discord-api-types/v10");
+
+// src/interactions/slashCommands/mixins/ApplicationCommandOptionBase.ts
+var ApplicationCommandOptionBase = class extends SharedNameAndDescription {
+ static {
+ __name(this, "ApplicationCommandOptionBase");
+ }
+ /**
+ * Whether this option is required.
+ *
+ * @defaultValue `false`
+ */
+ required = false;
+ /**
+ * Sets whether this option is required.
+ *
+ * @param required - Whether this option should be required
+ */
+ setRequired(required) {
+ validateRequired(required);
+ Reflect.set(this, "required", required);
+ return this;
+ }
+ /**
+ * This method runs required validators on this builder.
+ */
+ runRequiredValidations() {
+ validateRequiredParameters3(this.name, this.description, []);
+ validateLocalizationMap(this.name_localizations);
+ validateLocalizationMap(this.description_localizations);
+ validateRequired(this.required);
+ }
+};
+
+// src/interactions/slashCommands/options/attachment.ts
+var SlashCommandAttachmentOption = class extends ApplicationCommandOptionBase {
+ static {
+ __name(this, "SlashCommandAttachmentOption");
+ }
+ /**
+ * The type of this option.
+ */
+ type = import_v1013.ApplicationCommandOptionType.Attachment;
+ /**
+ * {@inheritDoc ApplicationCommandOptionBase.toJSON}
+ */
+ toJSON() {
+ this.runRequiredValidations();
+ return { ...this };
+ }
+};
+
+// src/interactions/slashCommands/options/boolean.ts
+var import_v1014 = require("discord-api-types/v10");
+var SlashCommandBooleanOption = class extends ApplicationCommandOptionBase {
+ static {
+ __name(this, "SlashCommandBooleanOption");
+ }
+ /**
+ * The type of this option.
+ */
+ type = import_v1014.ApplicationCommandOptionType.Boolean;
+ /**
+ * {@inheritDoc ApplicationCommandOptionBase.toJSON}
+ */
+ toJSON() {
+ this.runRequiredValidations();
+ return { ...this };
+ }
+};
+
+// src/interactions/slashCommands/options/channel.ts
+var import_v1016 = require("discord-api-types/v10");
+var import_ts_mixer = require("ts-mixer");
+
+// src/interactions/slashCommands/mixins/ApplicationCommandOptionChannelTypesMixin.ts
+var import_shapeshift6 = require("@sapphire/shapeshift");
+var import_v1015 = require("discord-api-types/v10");
+var allowedChannelTypes = [
+ import_v1015.ChannelType.GuildText,
+ import_v1015.ChannelType.GuildVoice,
+ import_v1015.ChannelType.GuildCategory,
+ import_v1015.ChannelType.GuildAnnouncement,
+ import_v1015.ChannelType.AnnouncementThread,
+ import_v1015.ChannelType.PublicThread,
+ import_v1015.ChannelType.PrivateThread,
+ import_v1015.ChannelType.GuildStageVoice,
+ import_v1015.ChannelType.GuildForum,
+ import_v1015.ChannelType.GuildMedia
+];
+var channelTypesPredicate = import_shapeshift6.s.array(import_shapeshift6.s.union(...allowedChannelTypes.map((type) => import_shapeshift6.s.literal(type))));
+var ApplicationCommandOptionChannelTypesMixin = class {
+ static {
+ __name(this, "ApplicationCommandOptionChannelTypesMixin");
+ }
+ /**
+ * The channel types of this option.
+ */
+ channel_types;
+ /**
+ * Adds channel types to this option.
+ *
+ * @param channelTypes - The channel types
+ */
+ addChannelTypes(...channelTypes) {
+ if (this.channel_types === void 0) {
+ Reflect.set(this, "channel_types", []);
+ }
+ this.channel_types.push(...channelTypesPredicate.parse(normalizeArray(channelTypes)));
+ return this;
+ }
+};
+
+// src/interactions/slashCommands/options/channel.ts
+var SlashCommandChannelOption = class extends ApplicationCommandOptionBase {
+ /**
+ * The type of this option.
+ */
+ type = import_v1016.ApplicationCommandOptionType.Channel;
+ /**
+ * {@inheritDoc ApplicationCommandOptionBase.toJSON}
+ */
+ toJSON() {
+ this.runRequiredValidations();
+ return { ...this };
+ }
+};
+__name(SlashCommandChannelOption, "SlashCommandChannelOption");
+SlashCommandChannelOption = __decorateClass([
+ (0, import_ts_mixer.mix)(ApplicationCommandOptionChannelTypesMixin)
+], SlashCommandChannelOption);
+
+// src/interactions/slashCommands/options/integer.ts
+var import_shapeshift9 = require("@sapphire/shapeshift");
+var import_v1018 = require("discord-api-types/v10");
+var import_ts_mixer2 = require("ts-mixer");
+
+// src/interactions/slashCommands/mixins/ApplicationCommandNumericOptionMinMaxValueMixin.ts
+var ApplicationCommandNumericOptionMinMaxValueMixin = class {
+ static {
+ __name(this, "ApplicationCommandNumericOptionMinMaxValueMixin");
+ }
+ /**
+ * The maximum value of this option.
+ */
+ max_value;
+ /**
+ * The minimum value of this option.
+ */
+ min_value;
+};
+
+// src/interactions/slashCommands/mixins/ApplicationCommandOptionWithAutocompleteMixin.ts
+var import_shapeshift7 = require("@sapphire/shapeshift");
+var booleanPredicate2 = import_shapeshift7.s.boolean;
+var ApplicationCommandOptionWithAutocompleteMixin = class {
+ static {
+ __name(this, "ApplicationCommandOptionWithAutocompleteMixin");
+ }
+ /**
+ * Whether this option utilizes autocomplete.
+ */
+ autocomplete;
+ /**
+ * The type of this option.
+ *
+ * @privateRemarks Since this is present and this is a mixin, this is needed.
+ */
+ type;
+ /**
+ * Whether this option uses autocomplete.
+ *
+ * @param autocomplete - Whether this option should use autocomplete
+ */
+ setAutocomplete(autocomplete) {
+ booleanPredicate2.parse(autocomplete);
+ if (autocomplete && "choices" in this && Array.isArray(this.choices) && this.choices.length > 0) {
+ throw new RangeError("Autocomplete and choices are mutually exclusive to each other.");
+ }
+ Reflect.set(this, "autocomplete", autocomplete);
+ return this;
+ }
+};
+
+// src/interactions/slashCommands/mixins/ApplicationCommandOptionWithChoicesMixin.ts
+var import_shapeshift8 = require("@sapphire/shapeshift");
+var import_v1017 = require("discord-api-types/v10");
+var stringPredicate = import_shapeshift8.s.string.lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(100);
+var numberPredicate = import_shapeshift8.s.number.greaterThan(Number.NEGATIVE_INFINITY).lessThan(Number.POSITIVE_INFINITY);
+var choicesPredicate = import_shapeshift8.s.object({
+ name: stringPredicate,
+ name_localizations: localizationMapPredicate,
+ value: import_shapeshift8.s.union(stringPredicate, numberPredicate)
+}).array;
+var ApplicationCommandOptionWithChoicesMixin = class {
+ static {
+ __name(this, "ApplicationCommandOptionWithChoicesMixin");
+ }
+ /**
+ * The choices of this option.
+ */
+ choices;
+ /**
+ * The type of this option.
+ *
+ * @privateRemarks Since this is present and this is a mixin, this is needed.
+ */
+ type;
+ /**
+ * Adds multiple choices to this option.
+ *
+ * @param choices - The choices to add
+ */
+ addChoices(...choices) {
+ const normalizedChoices = normalizeArray(choices);
+ if (normalizedChoices.length > 0 && "autocomplete" in this && this.autocomplete) {
+ throw new RangeError("Autocomplete and choices are mutually exclusive to each other.");
+ }
+ choicesPredicate.parse(normalizedChoices);
+ if (this.choices === void 0) {
+ Reflect.set(this, "choices", []);
+ }
+ validateChoicesLength(normalizedChoices.length, this.choices);
+ for (const { name, name_localizations, value } of normalizedChoices) {
+ if (this.type === import_v1017.ApplicationCommandOptionType.String) {
+ stringPredicate.parse(value);
+ } else {
+ numberPredicate.parse(value);
+ }
+ this.choices.push({ name, name_localizations, value });
+ }
+ return this;
+ }
+ /**
+ * Sets multiple choices for this option.
+ *
+ * @param choices - The choices to set
+ */
+ setChoices(...choices) {
+ const normalizedChoices = normalizeArray(choices);
+ if (normalizedChoices.length > 0 && "autocomplete" in this && this.autocomplete) {
+ throw new RangeError("Autocomplete and choices are mutually exclusive to each other.");
+ }
+ choicesPredicate.parse(normalizedChoices);
+ Reflect.set(this, "choices", []);
+ this.addChoices(normalizedChoices);
+ return this;
+ }
+};
+
+// src/interactions/slashCommands/options/integer.ts
+var numberValidator = import_shapeshift9.s.number.int;
+var SlashCommandIntegerOption = class extends ApplicationCommandOptionBase {
+ /**
+ * The type of this option.
+ */
+ type = import_v1018.ApplicationCommandOptionType.Integer;
+ /**
+ * {@inheritDoc ApplicationCommandNumericOptionMinMaxValueMixin.setMaxValue}
+ */
+ setMaxValue(max) {
+ numberValidator.parse(max);
+ Reflect.set(this, "max_value", max);
+ return this;
+ }
+ /**
+ * {@inheritDoc ApplicationCommandNumericOptionMinMaxValueMixin.setMinValue}
+ */
+ setMinValue(min) {
+ numberValidator.parse(min);
+ Reflect.set(this, "min_value", min);
+ return this;
+ }
+ /**
+ * {@inheritDoc ApplicationCommandOptionBase.toJSON}
+ */
+ toJSON() {
+ this.runRequiredValidations();
+ if (this.autocomplete && Array.isArray(this.choices) && this.choices.length > 0) {
+ throw new RangeError("Autocomplete and choices are mutually exclusive to each other.");
+ }
+ return { ...this };
+ }
+};
+__name(SlashCommandIntegerOption, "SlashCommandIntegerOption");
+SlashCommandIntegerOption = __decorateClass([
+ (0, import_ts_mixer2.mix)(
+ ApplicationCommandNumericOptionMinMaxValueMixin,
+ ApplicationCommandOptionWithAutocompleteMixin,
+ ApplicationCommandOptionWithChoicesMixin
+ )
+], SlashCommandIntegerOption);
+
+// src/interactions/slashCommands/options/mentionable.ts
+var import_v1019 = require("discord-api-types/v10");
+var SlashCommandMentionableOption = class extends ApplicationCommandOptionBase {
+ static {
+ __name(this, "SlashCommandMentionableOption");
+ }
+ /**
+ * The type of this option.
+ */
+ type = import_v1019.ApplicationCommandOptionType.Mentionable;
+ /**
+ * {@inheritDoc ApplicationCommandOptionBase.toJSON}
+ */
+ toJSON() {
+ this.runRequiredValidations();
+ return { ...this };
+ }
+};
+
+// src/interactions/slashCommands/options/number.ts
+var import_shapeshift10 = require("@sapphire/shapeshift");
+var import_v1020 = require("discord-api-types/v10");
+var import_ts_mixer3 = require("ts-mixer");
+var numberValidator2 = import_shapeshift10.s.number;
+var SlashCommandNumberOption = class extends ApplicationCommandOptionBase {
+ /**
+ * The type of this option.
+ */
+ type = import_v1020.ApplicationCommandOptionType.Number;
+ /**
+ * {@inheritDoc ApplicationCommandNumericOptionMinMaxValueMixin.setMaxValue}
+ */
+ setMaxValue(max) {
+ numberValidator2.parse(max);
+ Reflect.set(this, "max_value", max);
+ return this;
+ }
+ /**
+ * {@inheritDoc ApplicationCommandNumericOptionMinMaxValueMixin.setMinValue}
+ */
+ setMinValue(min) {
+ numberValidator2.parse(min);
+ Reflect.set(this, "min_value", min);
+ return this;
+ }
+ /**
+ * {@inheritDoc ApplicationCommandOptionBase.toJSON}
+ */
+ toJSON() {
+ this.runRequiredValidations();
+ if (this.autocomplete && Array.isArray(this.choices) && this.choices.length > 0) {
+ throw new RangeError("Autocomplete and choices are mutually exclusive to each other.");
+ }
+ return { ...this };
+ }
+};
+__name(SlashCommandNumberOption, "SlashCommandNumberOption");
+SlashCommandNumberOption = __decorateClass([
+ (0, import_ts_mixer3.mix)(
+ ApplicationCommandNumericOptionMinMaxValueMixin,
+ ApplicationCommandOptionWithAutocompleteMixin,
+ ApplicationCommandOptionWithChoicesMixin
+ )
+], SlashCommandNumberOption);
+
+// src/interactions/slashCommands/options/role.ts
+var import_v1021 = require("discord-api-types/v10");
+var SlashCommandRoleOption = class extends ApplicationCommandOptionBase {
+ static {
+ __name(this, "SlashCommandRoleOption");
+ }
+ /**
+ * The type of this option.
+ */
+ type = import_v1021.ApplicationCommandOptionType.Role;
+ /**
+ * {@inheritDoc ApplicationCommandOptionBase.toJSON}
+ */
+ toJSON() {
+ this.runRequiredValidations();
+ return { ...this };
+ }
+};
+
+// src/interactions/slashCommands/options/string.ts
+var import_shapeshift11 = require("@sapphire/shapeshift");
+var import_v1022 = require("discord-api-types/v10");
+var import_ts_mixer4 = require("ts-mixer");
+var minLengthValidator2 = import_shapeshift11.s.number.greaterThanOrEqual(0).lessThanOrEqual(6e3);
+var maxLengthValidator2 = import_shapeshift11.s.number.greaterThanOrEqual(1).lessThanOrEqual(6e3);
+var SlashCommandStringOption = class extends ApplicationCommandOptionBase {
+ /**
+ * The type of this option.
+ */
+ type = import_v1022.ApplicationCommandOptionType.String;
+ /**
+ * The maximum length of this option.
+ */
+ max_length;
+ /**
+ * The minimum length of this option.
+ */
+ min_length;
+ /**
+ * Sets the maximum length of this string option.
+ *
+ * @param max - The maximum length this option can be
+ */
+ setMaxLength(max) {
+ maxLengthValidator2.parse(max);
+ Reflect.set(this, "max_length", max);
+ return this;
+ }
+ /**
+ * Sets the minimum length of this string option.
+ *
+ * @param min - The minimum length this option can be
+ */
+ setMinLength(min) {
+ minLengthValidator2.parse(min);
+ Reflect.set(this, "min_length", min);
+ return this;
+ }
+ /**
+ * {@inheritDoc ApplicationCommandOptionBase.toJSON}
+ */
+ toJSON() {
+ this.runRequiredValidations();
+ if (this.autocomplete && Array.isArray(this.choices) && this.choices.length > 0) {
+ throw new RangeError("Autocomplete and choices are mutually exclusive to each other.");
+ }
+ return { ...this };
+ }
+};
+__name(SlashCommandStringOption, "SlashCommandStringOption");
+SlashCommandStringOption = __decorateClass([
+ (0, import_ts_mixer4.mix)(ApplicationCommandOptionWithAutocompleteMixin, ApplicationCommandOptionWithChoicesMixin)
+], SlashCommandStringOption);
+
+// src/interactions/slashCommands/options/user.ts
+var import_v1023 = require("discord-api-types/v10");
+var SlashCommandUserOption = class extends ApplicationCommandOptionBase {
+ static {
+ __name(this, "SlashCommandUserOption");
+ }
+ /**
+ * The type of this option.
+ */
+ type = import_v1023.ApplicationCommandOptionType.User;
+ /**
+ * {@inheritDoc ApplicationCommandOptionBase.toJSON}
+ */
+ toJSON() {
+ this.runRequiredValidations();
+ return { ...this };
+ }
+};
+
+// src/interactions/slashCommands/mixins/SharedSlashCommandOptions.ts
+var SharedSlashCommandOptions = class {
+ static {
+ __name(this, "SharedSlashCommandOptions");
+ }
+ options;
+ /**
+ * Adds a boolean option.
+ *
+ * @param input - A function that returns an option builder or an already built builder
+ */
+ addBooleanOption(input) {
+ return this._sharedAddOptionMethod(input, SlashCommandBooleanOption);
+ }
+ /**
+ * Adds a user option.
+ *
+ * @param input - A function that returns an option builder or an already built builder
+ */
+ addUserOption(input) {
+ return this._sharedAddOptionMethod(input, SlashCommandUserOption);
+ }
+ /**
+ * Adds a channel option.
+ *
+ * @param input - A function that returns an option builder or an already built builder
+ */
+ addChannelOption(input) {
+ return this._sharedAddOptionMethod(input, SlashCommandChannelOption);
+ }
+ /**
+ * Adds a role option.
+ *
+ * @param input - A function that returns an option builder or an already built builder
+ */
+ addRoleOption(input) {
+ return this._sharedAddOptionMethod(input, SlashCommandRoleOption);
+ }
+ /**
+ * Adds an attachment option.
+ *
+ * @param input - A function that returns an option builder or an already built builder
+ */
+ addAttachmentOption(input) {
+ return this._sharedAddOptionMethod(input, SlashCommandAttachmentOption);
+ }
+ /**
+ * Adds a mentionable option.
+ *
+ * @param input - A function that returns an option builder or an already built builder
+ */
+ addMentionableOption(input) {
+ return this._sharedAddOptionMethod(input, SlashCommandMentionableOption);
+ }
+ /**
+ * Adds a string option.
+ *
+ * @param input - A function that returns an option builder or an already built builder
+ */
+ addStringOption(input) {
+ return this._sharedAddOptionMethod(input, SlashCommandStringOption);
+ }
+ /**
+ * Adds an integer option.
+ *
+ * @param input - A function that returns an option builder or an already built builder
+ */
+ addIntegerOption(input) {
+ return this._sharedAddOptionMethod(input, SlashCommandIntegerOption);
+ }
+ /**
+ * Adds a number option.
+ *
+ * @param input - A function that returns an option builder or an already built builder
+ */
+ addNumberOption(input) {
+ return this._sharedAddOptionMethod(input, SlashCommandNumberOption);
+ }
+ /**
+ * Where the actual adding magic happens. ✨
+ *
+ * @param input - The input. What else?
+ * @param Instance - The instance of whatever is being added
+ * @internal
+ */
+ _sharedAddOptionMethod(input, Instance) {
+ const { options } = this;
+ validateMaxOptionsLength(options);
+ const result = typeof input === "function" ? input(new Instance()) : input;
+ assertReturnOfBuilder(result, Instance);
+ options.push(result);
+ return this;
+ }
+};
+
+// src/interactions/slashCommands/SlashCommandSubcommands.ts
+var import_v1024 = require("discord-api-types/v10");
+var import_ts_mixer5 = require("ts-mixer");
+var SlashCommandSubcommandGroupBuilder = class {
+ /**
+ * The name of this subcommand group.
+ */
+ name = void 0;
+ /**
+ * The description of this subcommand group.
+ */
+ description = void 0;
+ /**
+ * The subcommands within this subcommand group.
+ */
+ options = [];
+ /**
+ * Adds a new subcommand to this group.
+ *
+ * @param input - A function that returns a subcommand builder or an already built builder
+ */
+ addSubcommand(input) {
+ const { options } = this;
+ validateMaxOptionsLength(options);
+ const result = typeof input === "function" ? input(new SlashCommandSubcommandBuilder()) : input;
+ assertReturnOfBuilder(result, SlashCommandSubcommandBuilder);
+ options.push(result);
+ return this;
+ }
+ /**
+ * Serializes this builder to API-compatible JSON data.
+ *
+ * @remarks
+ * This method runs validations on the data before serializing it.
+ * As such, it may throw an error if the data is invalid.
+ */
+ toJSON() {
+ validateRequiredParameters3(this.name, this.description, this.options);
+ return {
+ type: import_v1024.ApplicationCommandOptionType.SubcommandGroup,
+ name: this.name,
+ name_localizations: this.name_localizations,
+ description: this.description,
+ description_localizations: this.description_localizations,
+ options: this.options.map((option) => option.toJSON())
+ };
+ }
+};
+__name(SlashCommandSubcommandGroupBuilder, "SlashCommandSubcommandGroupBuilder");
+SlashCommandSubcommandGroupBuilder = __decorateClass([
+ (0, import_ts_mixer5.mix)(SharedNameAndDescription)
+], SlashCommandSubcommandGroupBuilder);
+var SlashCommandSubcommandBuilder = class {
+ /**
+ * The name of this subcommand.
+ */
+ name = void 0;
+ /**
+ * The description of this subcommand.
+ */
+ description = void 0;
+ /**
+ * The options within this subcommand.
+ */
+ options = [];
+ /**
+ * Serializes this builder to API-compatible JSON data.
+ *
+ * @remarks
+ * This method runs validations on the data before serializing it.
+ * As such, it may throw an error if the data is invalid.
+ */
+ toJSON() {
+ validateRequiredParameters3(this.name, this.description, this.options);
+ return {
+ type: import_v1024.ApplicationCommandOptionType.Subcommand,
+ name: this.name,
+ name_localizations: this.name_localizations,
+ description: this.description,
+ description_localizations: this.description_localizations,
+ options: this.options.map((option) => option.toJSON())
+ };
+ }
+};
+__name(SlashCommandSubcommandBuilder, "SlashCommandSubcommandBuilder");
+SlashCommandSubcommandBuilder = __decorateClass([
+ (0, import_ts_mixer5.mix)(SharedNameAndDescription, SharedSlashCommandOptions)
+], SlashCommandSubcommandBuilder);
+
+// src/interactions/slashCommands/mixins/SharedSubcommands.ts
+var SharedSlashCommandSubcommands = class {
+ static {
+ __name(this, "SharedSlashCommandSubcommands");
+ }
+ options = [];
+ /**
+ * Adds a new subcommand group to this command.
+ *
+ * @param input - A function that returns a subcommand group builder or an already built builder
+ */
+ addSubcommandGroup(input) {
+ const { options } = this;
+ validateMaxOptionsLength(options);
+ const result = typeof input === "function" ? input(new SlashCommandSubcommandGroupBuilder()) : input;
+ assertReturnOfBuilder(result, SlashCommandSubcommandGroupBuilder);
+ options.push(result);
+ return this;
+ }
+ /**
+ * Adds a new subcommand to this command.
+ *
+ * @param input - A function that returns a subcommand builder or an already built builder
+ */
+ addSubcommand(input) {
+ const { options } = this;
+ validateMaxOptionsLength(options);
+ const result = typeof input === "function" ? input(new SlashCommandSubcommandBuilder()) : input;
+ assertReturnOfBuilder(result, SlashCommandSubcommandBuilder);
+ options.push(result);
+ return this;
+ }
+};
+
+// src/interactions/slashCommands/SlashCommandBuilder.ts
+var SlashCommandBuilder = class {
+ /**
+ * The name of this command.
+ */
+ name = void 0;
+ /**
+ * The name localizations of this command.
+ */
+ name_localizations;
+ /**
+ * The description of this command.
+ */
+ description = void 0;
+ /**
+ * The description localizations of this command.
+ */
+ description_localizations;
+ /**
+ * The options of this command.
+ */
+ options = [];
+ /**
+ * Whether this command is enabled by default when the application is added to a guild.
+ *
+ * @deprecated Use {@link SharedSlashCommand.setDefaultMemberPermissions} or {@link SharedSlashCommand.setDMPermission} instead.
+ */
+ default_permission = void 0;
+ /**
+ * The set of permissions represented as a bit set for the command.
+ */
+ default_member_permissions = void 0;
+ /**
+ * Indicates whether the command is available in direct messages with the application.
+ *
+ * @remarks
+ * By default, commands are visible. This property is only for global commands.
+ */
+ dm_permission = void 0;
+ /**
+ * Whether this command is NSFW.
+ */
+ nsfw = void 0;
+};
+__name(SlashCommandBuilder, "SlashCommandBuilder");
+SlashCommandBuilder = __decorateClass([
+ (0, import_ts_mixer6.mix)(SharedSlashCommandOptions, SharedNameAndDescription, SharedSlashCommandSubcommands, SharedSlashCommand)
+], SlashCommandBuilder);
+
+// src/interactions/contextMenuCommands/Assertions.ts
+var Assertions_exports6 = {};
+__export(Assertions_exports6, {
+ validateDMPermission: () => validateDMPermission2,
+ validateDefaultMemberPermissions: () => validateDefaultMemberPermissions2,
+ validateDefaultPermission: () => validateDefaultPermission2,
+ validateName: () => validateName2,
+ validateRequiredParameters: () => validateRequiredParameters4,
+ validateType: () => validateType
+});
+var import_shapeshift12 = require("@sapphire/shapeshift");
+var import_v1025 = require("discord-api-types/v10");
+var namePredicate2 = import_shapeshift12.s.string.lengthGreaterThanOrEqual(1).lengthLessThanOrEqual(32).regex(/^( *[\p{P}\p{L}\p{N}\p{sc=Devanagari}\p{sc=Thai}]+ *)+$/u).setValidationEnabled(isValidationEnabled);
+var typePredicate = import_shapeshift12.s.union(import_shapeshift12.s.literal(import_v1025.ApplicationCommandType.User), import_shapeshift12.s.literal(import_v1025.ApplicationCommandType.Message)).setValidationEnabled(isValidationEnabled);
+var booleanPredicate3 = import_shapeshift12.s.boolean;
+function validateDefaultPermission2(value) {
+ booleanPredicate3.parse(value);
+}
+__name(validateDefaultPermission2, "validateDefaultPermission");
+function validateName2(name) {
+ namePredicate2.parse(name);
+}
+__name(validateName2, "validateName");
+function validateType(type) {
+ typePredicate.parse(type);
+}
+__name(validateType, "validateType");
+function validateRequiredParameters4(name, type) {
+ validateName2(name);
+ validateType(type);
+}
+__name(validateRequiredParameters4, "validateRequiredParameters");
+var dmPermissionPredicate2 = import_shapeshift12.s.boolean.nullish;
+function validateDMPermission2(value) {
+ dmPermissionPredicate2.parse(value);
+}
+__name(validateDMPermission2, "validateDMPermission");
+var memberPermissionPredicate2 = import_shapeshift12.s.union(
+ import_shapeshift12.s.bigint.transform((value) => value.toString()),
+ import_shapeshift12.s.number.safeInt.transform((value) => value.toString()),
+ import_shapeshift12.s.string.regex(/^\d+$/)
+).nullish;
+function validateDefaultMemberPermissions2(permissions) {
+ return memberPermissionPredicate2.parse(permissions);
+}
+__name(validateDefaultMemberPermissions2, "validateDefaultMemberPermissions");
+
+// src/interactions/contextMenuCommands/ContextMenuCommandBuilder.ts
+var ContextMenuCommandBuilder = class {
+ static {
+ __name(this, "ContextMenuCommandBuilder");
+ }
+ /**
+ * The name of this command.
+ */
+ name = void 0;
+ /**
+ * The name localizations of this command.
+ */
+ name_localizations;
+ /**
+ * The type of this command.
+ */
+ type = void 0;
+ /**
+ * Whether this command is enabled by default when the application is added to a guild.
+ *
+ * @deprecated Use {@link ContextMenuCommandBuilder.setDefaultMemberPermissions} or {@link ContextMenuCommandBuilder.setDMPermission} instead.
+ */
+ default_permission = void 0;
+ /**
+ * The set of permissions represented as a bit set for the command.
+ */
+ default_member_permissions = void 0;
+ /**
+ * Indicates whether the command is available in direct messages with the application.
+ *
+ * @remarks
+ * By default, commands are visible. This property is only for global commands.
+ */
+ dm_permission = void 0;
+ /**
+ * Sets the name of this command.
+ *
+ * @param name - The name to use
+ */
+ setName(name) {
+ validateName2(name);
+ Reflect.set(this, "name", name);
+ return this;
+ }
+ /**
+ * Sets the type of this command.
+ *
+ * @param type - The type to use
+ */
+ setType(type) {
+ validateType(type);
+ Reflect.set(this, "type", type);
+ return this;
+ }
+ /**
+ * Sets whether the command is enabled by default when the application is added to a guild.
+ *
+ * @remarks
+ * If set to `false`, you will have to later `PUT` the permissions for this command.
+ * @param value - Whether to enable this command by default
+ * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}
+ * @deprecated Use {@link ContextMenuCommandBuilder.setDefaultMemberPermissions} or {@link ContextMenuCommandBuilder.setDMPermission} instead.
+ */
+ setDefaultPermission(value) {
+ validateDefaultPermission2(value);
+ Reflect.set(this, "default_permission", value);
+ return this;
+ }
+ /**
+ * Sets the default permissions a member should have in order to run this command.
+ *
+ * @remarks
+ * You can set this to `'0'` to disable the command by default.
+ * @param permissions - The permissions bit field to set
+ * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}
+ */
+ setDefaultMemberPermissions(permissions) {
+ const permissionValue = validateDefaultMemberPermissions2(permissions);
+ Reflect.set(this, "default_member_permissions", permissionValue);
+ return this;
+ }
+ /**
+ * Sets if the command is available in direct messages with the application.
+ *
+ * @remarks
+ * By default, commands are visible. This method is only for global commands.
+ * @param enabled - Whether the command should be enabled in direct messages
+ * @see {@link https://discord.com/developers/docs/interactions/application-commands#permissions}
+ */
+ setDMPermission(enabled) {
+ validateDMPermission2(enabled);
+ Reflect.set(this, "dm_permission", enabled);
+ return this;
+ }
+ /**
+ * Sets a name localization for this command.
+ *
+ * @param locale - The locale to set
+ * @param localizedName - The localized name for the given `locale`
+ */
+ setNameLocalization(locale, localizedName) {
+ if (!this.name_localizations) {
+ Reflect.set(this, "name_localizations", {});
+ }
+ const parsedLocale = validateLocale(locale);
+ if (localizedName === null) {
+ this.name_localizations[parsedLocale] = null;
+ return this;
+ }
+ validateName2(localizedName);
+ this.name_localizations[parsedLocale] = localizedName;
+ return this;
+ }
+ /**
+ * Sets the name localizations for this command.
+ *
+ * @param localizedNames - The object of localized names to set
+ */
+ setNameLocalizations(localizedNames) {
+ if (localizedNames === null) {
+ Reflect.set(this, "name_localizations", null);
+ return this;
+ }
+ Reflect.set(this, "name_localizations", {});
+ for (const args of Object.entries(localizedNames))
+ this.setNameLocalization(...args);
+ return this;
+ }
+ /**
+ * Serializes this builder to API-compatible JSON data.
+ *
+ * @remarks
+ * This method runs validations on the data before serializing it.
+ * As such, it may throw an error if the data is invalid.
+ */
+ toJSON() {
+ validateRequiredParameters4(this.name, this.type);
+ validateLocalizationMap(this.name_localizations);
+ return { ...this };
+ }
+};
+
+// src/util/componentUtil.ts
+function embedLength(data) {
+ return (data.title?.length ?? 0) + (data.description?.length ?? 0) + (data.fields?.reduce((prev, curr) => prev + curr.name.length + curr.value.length, 0) ?? 0) + (data.footer?.text.length ?? 0) + (data.author?.name.length ?? 0);
+}
+__name(embedLength, "embedLength");
+
+// src/index.ts
+var version = "1.8.1";
+// Annotate the CommonJS export names for ESM import in node:
+0 && (module.exports = {
+ ActionRowBuilder,
+ ApplicationCommandNumericOptionMinMaxValueMixin,
+ ApplicationCommandOptionBase,
+ ApplicationCommandOptionChannelTypesMixin,
+ ApplicationCommandOptionWithAutocompleteMixin,
+ ApplicationCommandOptionWithChoicesMixin,
+ BaseSelectMenuBuilder,
+ ButtonBuilder,
+ ChannelSelectMenuBuilder,
+ ComponentAssertions,
+ ComponentBuilder,
+ ContextMenuCommandAssertions,
+ ContextMenuCommandBuilder,
+ EmbedAssertions,
+ EmbedBuilder,
+ MentionableSelectMenuBuilder,
+ ModalAssertions,
+ ModalBuilder,
+ RoleSelectMenuBuilder,
+ SelectMenuBuilder,
+ SelectMenuOptionBuilder,
+ SharedNameAndDescription,
+ SharedSlashCommand,
+ SharedSlashCommandOptions,
+ SharedSlashCommandSubcommands,
+ SlashCommandAssertions,
+ SlashCommandAttachmentOption,
+ SlashCommandBooleanOption,
+ SlashCommandBuilder,
+ SlashCommandChannelOption,
+ SlashCommandIntegerOption,
+ SlashCommandMentionableOption,
+ SlashCommandNumberOption,
+ SlashCommandRoleOption,
+ SlashCommandStringOption,
+ SlashCommandSubcommandBuilder,
+ SlashCommandSubcommandGroupBuilder,
+ SlashCommandUserOption,
+ StringSelectMenuBuilder,
+ StringSelectMenuOptionBuilder,
+ TextInputAssertions,
+ TextInputBuilder,
+ UserSelectMenuBuilder,
+ createComponentBuilder,
+ disableValidators,
+ embedLength,
+ enableValidators,
+ isValidationEnabled,
+ normalizeArray,
+ version,
+ ...require("@discordjs/formatters")
+});
+//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/node_modules/@discordjs/builders/dist/index.js.map b/node_modules/@discordjs/builders/dist/index.js.map
new file mode 100644
index 0000000..cc20ff3
--- /dev/null
+++ b/node_modules/@discordjs/builders/dist/index.js.map
@@ -0,0 +1 @@
+{"version":3,"sources":["../src/index.ts","../src/messages/embed/Assertions.ts","../src/util/validation.ts","../src/util/normalizeArray.ts","../src/messages/embed/Embed.ts","../src/components/Assertions.ts","../src/components/selectMenu/StringSelectMenuOption.ts","../src/components/ActionRow.ts","../src/components/Component.ts","../src/components/Components.ts","../src/components/button/Button.ts","../src/components/selectMenu/ChannelSelectMenu.ts","../src/components/selectMenu/BaseSelectMenu.ts","../src/components/selectMenu/MentionableSelectMenu.ts","../src/components/selectMenu/RoleSelectMenu.ts","../src/components/selectMenu/StringSelectMenu.ts","../src/components/selectMenu/UserSelectMenu.ts","../src/components/textInput/TextInput.ts","../src/components/textInput/Assertions.ts","../src/interactions/modals/Assertions.ts","../src/interactions/modals/Modal.ts","../src/interactions/slashCommands/Assertions.ts","../src/interactions/slashCommands/SlashCommandBuilder.ts","../src/interactions/slashCommands/mixins/NameAndDescription.ts","../src/interactions/slashCommands/mixins/SharedSlashCommand.ts","../src/interactions/slashCommands/options/attachment.ts","../src/interactions/slashCommands/mixins/ApplicationCommandOptionBase.ts","../src/interactions/slashCommands/options/boolean.ts","../src/interactions/slashCommands/options/channel.ts","../src/interactions/slashCommands/mixins/ApplicationCommandOptionChannelTypesMixin.ts","../src/interactions/slashCommands/options/integer.ts","../src/interactions/slashCommands/mixins/ApplicationCommandNumericOptionMinMaxValueMixin.ts","../src/interactions/slashCommands/mixins/ApplicationCommandOptionWithAutocompleteMixin.ts","../src/interactions/slashCommands/mixins/ApplicationCommandOptionWithChoicesMixin.ts","../src/interactions/slashCommands/options/mentionable.ts","../src/interactions/slashCommands/options/number.ts","../src/interactions/slashCommands/options/role.ts","../src/interactions/slashCommands/options/string.ts","../src/interactions/slashCommands/options/user.ts","../src/interactions/slashCommands/mixins/SharedSlashCommandOptions.ts","../src/interactions/slashCommands/SlashCommandSubcommands.ts","../src/interactions/slashCommands/mixins/SharedSubcommands.ts","../src/interactions/contextMenuCommands/Assertions.ts","../src/interactions/contextMenuCommands/ContextMenuCommandBuilder.ts","../src/util/componentUtil.ts"],"sourcesContent":["export * as EmbedAssertions from './messages/embed/Assertions.js';\nexport * from './messages/embed/Embed.js';\n// TODO: Consider removing this dep in the next major version\nexport * from '@discordjs/formatters';\n\nexport * as ComponentAssertions from './components/Assertions.js';\nexport * from './components/ActionRow.js';\nexport * from './components/button/Button.js';\nexport * from './components/Component.js';\nexport * from './components/Components.js';\nexport * from './components/textInput/TextInput.js';\nexport * as TextInputAssertions from './components/textInput/Assertions.js';\nexport * from './interactions/modals/Modal.js';\nexport * as ModalAssertions from './interactions/modals/Assertions.js';\n\nexport * from './components/selectMenu/BaseSelectMenu.js';\nexport * from './components/selectMenu/ChannelSelectMenu.js';\nexport * from './components/selectMenu/MentionableSelectMenu.js';\nexport * from './components/selectMenu/RoleSelectMenu.js';\nexport * from './components/selectMenu/StringSelectMenu.js';\n// TODO: Remove those aliases in v2\nexport {\n\t/**\n\t * @deprecated Will be removed in the next major version, use {@link StringSelectMenuBuilder} instead.\n\t */\n\tStringSelectMenuBuilder as SelectMenuBuilder,\n} from './components/selectMenu/StringSelectMenu.js';\nexport {\n\t/**\n\t * @deprecated Will be removed in the next major version, use {@link StringSelectMenuOptionBuilder} instead.\n\t */\n\tStringSelectMenuOptionBuilder as SelectMenuOptionBuilder,\n} from './components/selectMenu/StringSelectMenuOption.js';\nexport * from './components/selectMenu/StringSelectMenuOption.js';\nexport * from './components/selectMenu/UserSelectMenu.js';\n\nexport * as SlashCommandAssertions from './interactions/slashCommands/Assertions.js';\nexport * from './interactions/slashCommands/SlashCommandBuilder.js';\nexport * from './interactions/slashCommands/SlashCommandSubcommands.js';\nexport * from './interactions/slashCommands/options/boolean.js';\nexport * from './interactions/slashCommands/options/channel.js';\nexport * from './interactions/slashCommands/options/integer.js';\nexport * from './interactions/slashCommands/options/mentionable.js';\nexport * from './interactions/slashCommands/options/number.js';\nexport * from './interactions/slashCommands/options/role.js';\nexport * from './interactions/slashCommands/options/attachment.js';\nexport * from './interactions/slashCommands/options/string.js';\nexport * from './interactions/slashCommands/options/user.js';\nexport * from './interactions/slashCommands/mixins/ApplicationCommandNumericOptionMinMaxValueMixin.js';\nexport * from './interactions/slashCommands/mixins/ApplicationCommandOptionBase.js';\nexport * from './interactions/slashCommands/mixins/ApplicationCommandOptionChannelTypesMixin.js';\nexport * from './interactions/slashCommands/mixins/ApplicationCommandOptionWithAutocompleteMixin.js';\nexport * from './interactions/slashCommands/mixins/ApplicationCommandOptionWithChoicesMixin.js';\nexport * from './interactions/slashCommands/mixins/NameAndDescription.js';\nexport * from './interactions/slashCommands/mixins/SharedSlashCommandOptions.js';\nexport * from './interactions/slashCommands/mixins/SharedSubcommands.js';\nexport * from './interactions/slashCommands/mixins/SharedSlashCommand.js';\n\nexport * as ContextMenuCommandAssertions from './interactions/contextMenuCommands/Assertions.js';\nexport * from './interactions/contextMenuCommands/ContextMenuCommandBuilder.js';\n\nexport * from './util/componentUtil.js';\nexport * from './util/normalizeArray.js';\nexport * from './util/validation.js';\n\n/**\n * The {@link https://github.com/discordjs/discord.js/blob/main/packages/builders#readme | @discordjs/builders} version\n * that you are currently using.\n *\n * @privateRemarks This needs to explicitly be `string` so it is not typed as a \"const string\" that gets injected by esbuild.\n */\nexport const version = '1.8.1' as string;\n","import { s } from '@sapphire/shapeshift';\nimport type { APIEmbedField } from 'discord-api-types/v10';\nimport { isValidationEnabled } from '../../util/validation.js';\n\nexport const fieldNamePredicate = s.string\n\t.lengthGreaterThanOrEqual(1)\n\t.lengthLessThanOrEqual(256)\n\t.setValidationEnabled(isValidationEnabled);\n\nexport const fieldValuePredicate = s.string\n\t.lengthGreaterThanOrEqual(1)\n\t.lengthLessThanOrEqual(1_024)\n\t.setValidationEnabled(isValidationEnabled);\n\nexport const fieldInlinePredicate = s.boolean.optional;\n\nexport const embedFieldPredicate = s\n\t.object({\n\t\tname: fieldNamePredicate,\n\t\tvalue: fieldValuePredicate,\n\t\tinline: fieldInlinePredicate,\n\t})\n\t.setValidationEnabled(isValidationEnabled);\n\nexport const embedFieldsArrayPredicate = embedFieldPredicate.array.setValidationEnabled(isValidationEnabled);\n\nexport const fieldLengthPredicate = s.number.lessThanOrEqual(25).setValidationEnabled(isValidationEnabled);\n\nexport function validateFieldLength(amountAdding: number, fields?: APIEmbedField[]): void {\n\tfieldLengthPredicate.parse((fields?.length ?? 0) + amountAdding);\n}\n\nexport const authorNamePredicate = fieldNamePredicate.nullable.setValidationEnabled(isValidationEnabled);\n\nexport const imageURLPredicate = s.string\n\t.url({\n\t\tallowedProtocols: ['http:', 'https:', 'attachment:'],\n\t})\n\t.nullish.setValidationEnabled(isValidationEnabled);\n\nexport const urlPredicate = s.string\n\t.url({\n\t\tallowedProtocols: ['http:', 'https:'],\n\t})\n\t.nullish.setValidationEnabled(isValidationEnabled);\n\nexport const embedAuthorPredicate = s\n\t.object({\n\t\tname: authorNamePredicate,\n\t\ticonURL: imageURLPredicate,\n\t\turl: urlPredicate,\n\t})\n\t.setValidationEnabled(isValidationEnabled);\n\nexport const RGBPredicate = s.number.int\n\t.greaterThanOrEqual(0)\n\t.lessThanOrEqual(255)\n\t.setValidationEnabled(isValidationEnabled);\nexport const colorPredicate = s.number.int\n\t.greaterThanOrEqual(0)\n\t.lessThanOrEqual(0xffffff)\n\t.or(s.tuple([RGBPredicate, RGBPredicate, RGBPredicate]))\n\t.nullable.setValidationEnabled(isValidationEnabled);\n\nexport const descriptionPredicate = s.string\n\t.lengthGreaterThanOrEqual(1)\n\t.lengthLessThanOrEqual(4_096)\n\t.nullable.setValidationEnabled(isValidationEnabled);\n\nexport const footerTextPredicate = s.string\n\t.lengthGreaterThanOrEqual(1)\n\t.lengthLessThanOrEqual(2_048)\n\t.nullable.setValidationEnabled(isValidationEnabled);\n\nexport const embedFooterPredicate = s\n\t.object({\n\t\ttext: footerTextPredicate,\n\t\ticonURL: imageURLPredicate,\n\t})\n\t.setValidationEnabled(isValidationEnabled);\n\nexport const timestampPredicate = s.union(s.number, s.date).nullable.setValidationEnabled(isValidationEnabled);\n\nexport const titlePredicate = fieldNamePredicate.nullable.setValidationEnabled(isValidationEnabled);\n","let validate = true;\n\n/**\n * Enables validators.\n *\n * @returns Whether validation is occurring.\n */\nexport function enableValidators() {\n\treturn (validate = true);\n}\n\n/**\n * Disables validators.\n *\n * @returns Whether validation is occurring.\n */\nexport function disableValidators() {\n\treturn (validate = false);\n}\n\n/**\n * Checks whether validation is occurring.\n */\nexport function isValidationEnabled() {\n\treturn validate;\n}\n","/**\n * Normalizes data that is a rest parameter or an array into an array with a depth of 1.\n *\n * @typeParam ItemType - The data that must satisfy {@link RestOrArray}.\n * @param arr - The (possibly variadic) data to normalize\n */\nexport function normalizeArray(arr: RestOrArray): ItemType[] {\n\tif (Array.isArray(arr[0])) return [...arr[0]];\n\treturn arr as ItemType[];\n}\n\n/**\n * Represents data that may be an array or came from a rest parameter.\n *\n * @remarks\n * This type is used throughout builders to ensure both an array and variadic arguments\n * may be used. It is normalized with {@link normalizeArray}.\n */\nexport type RestOrArray = Type[] | [Type[]];\n","import type { APIEmbed, APIEmbedAuthor, APIEmbedField, APIEmbedFooter, APIEmbedImage } from 'discord-api-types/v10';\nimport { normalizeArray, type RestOrArray } from '../../util/normalizeArray.js';\nimport {\n\tcolorPredicate,\n\tdescriptionPredicate,\n\tembedAuthorPredicate,\n\tembedFieldsArrayPredicate,\n\tembedFooterPredicate,\n\timageURLPredicate,\n\ttimestampPredicate,\n\ttitlePredicate,\n\turlPredicate,\n\tvalidateFieldLength,\n} from './Assertions.js';\n\n/**\n * A tuple satisfying the RGB color model.\n *\n * @see {@link https://developer.mozilla.org/docs/Glossary/RGB}\n */\nexport type RGBTuple = [red: number, green: number, blue: number];\n\n/**\n * The base icon data typically used in payloads.\n */\nexport interface IconData {\n\t/**\n\t * The URL of the icon.\n\t */\n\ticonURL?: string;\n\t/**\n\t * The proxy URL of the icon.\n\t */\n\tproxyIconURL?: string;\n}\n\n/**\n * Represents the author data of an embed.\n */\nexport interface EmbedAuthorData extends IconData, Omit {}\n\n/**\n * Represents the author options of an embed.\n */\nexport interface EmbedAuthorOptions extends Omit {}\n\n/**\n * Represents the footer data of an embed.\n */\nexport interface EmbedFooterData extends IconData, Omit