diff --git a/.gitignore b/.gitignore index 20efa43..ca4821a 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -.token +token.json diff --git a/devs.json b/devs.json new file mode 100644 index 0000000..d19652b --- /dev/null +++ b/devs.json @@ -0,0 +1,3 @@ +{ + "devlist": ["831598877320413244"] +} diff --git a/index.js b/index.js index d6e327f..2058a47 100644 --- a/index.js +++ b/index.js @@ -1,2 +1,108 @@ const dc = require("discord.js"); -const client = new dc.Client({Intents: ["GUILDS"]}); +const client = new dc.Client({intents: ["GUILDS"]}); +const fs = require("fs"); +client.login(JSON.parse(fs.readFileSync("token.json").toString())["token"]); + +function readJson(path){ + return JSON.parse(fs.readFileSync(path).toString()); +} + +function writeJson(path, content){ + fs.writeFileSync(path, JSON.stringify(content)); +} + +function getUserCount(){ + var yes = 0; + client.guilds.cache.forEach(guild => { + guild.members.cache.forEach(mem => { + yes++; + }); + }); + return yes; +} + +var int; +function startLoop(){ + try { + clearInterval(int); + int = setInterval(()=>{ + //console.log("Ayup"); + client.user.setActivity("over " + getUserCount() + " people", {type: "WATCHING"}); + },5000); + } catch(e){console.log(e)} +} + +function stopLoop(){ + try { + clearInterval(int); + } catch(e){} +} + +client.on("ready", () => { + startLoop(); + console.log("I'm alive"); + client.guilds.cache.get("879081086817288264").commands.set([ + { + name: "ping", + description: "Am alive???" + }, + { + name: "activity", + description: "Sets funny activity", + options: [ + { + name: "type", + description: "The type, for example playing or watching or listening or streaming or competing.", + type: 3, + required: true + }, + { + name: "activity", + description: "What you want it to say", + type: 3, + required: false + } + ] + }, + { + name: "eval", + description: "Evaluation of JS", + options: [ + { + name: "code", + description: "Code to exec", + type: 3 + } + ] + } + ]).then(cmds => { + console.log("Finished loading all commands"); + }); +}); + +client.on("interactionCreate", (int) => { + if(int.isCommand()){ + if(int.commandName == "ping"){ + int.reply(`Yup, I'm alive (${client.ws.ping} ms)`); + } else if(int.commandName == "activity"){ + var devs = readJson("devs.json"); + if(!devs.devlist.includes(int.user.id)) return int.reply("You shall not pass"); + if(int.options.getString("activity") !== null){ + stopLoop(); + client.user.setActivity(int.options.getString("activity"), {type: int.options.getString("type")}); + int.reply("Stopped activity loop, and switched to custom set status."); + } else { + startLoop(); + int.reply("Resat activity, and started activity loop."); + } + } else if(int.commandName == "eval"){ + var devs = readJson("devs.json"); + if(!devs.devlist.includes(int.user.id)) return int.reply("You shall not pass"); + try{ + int.reply(new String(eval(int.options.getString("code"))).valueOf()).catch(e => {}); + } catch(e){ + int.reply(e.stack).catch(e => {}); + }; + } + } +}); diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json index 3f4acdd..002d94f 100644 --- a/node_modules/.package-lock.json +++ b/node_modules/.package-lock.json @@ -5,25 +5,33 @@ "requires": true, "packages": { "node_modules/@discordjs/builders": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-0.8.2.tgz", - "integrity": "sha512-/YRd11SrcluqXkKppq/FAVzLIPRVlIVmc6X8ZklspzMIHDtJ+A4W37D43SHvLdH//+NnK+SHW/WeOF4Ts54PeQ==", + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-0.6.0.tgz", + "integrity": "sha512-mH3Gx61LKk2CD05laCI9K5wp+a3NyASHDUGx83DGJFkqJlRlSV5WMJNY6RS37A5SjqDtGMF4wVR9jzFaqShe6Q==", "dependencies": { - "@sindresorhus/is": "^4.2.0", - "discord-api-types": "^0.24.0", + "@sindresorhus/is": "^4.0.1", + "discord-api-types": "^0.22.0", "ow": "^0.27.0", "ts-mixer": "^6.0.0", "tslib": "^2.3.1" }, "engines": { - "node": ">=16.0.0", + "node": ">=14.0.0", "npm": ">=7.0.0" } }, + "node_modules/@discordjs/builders/node_modules/discord-api-types": { + "version": "0.22.0", + "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.22.0.tgz", + "integrity": "sha512-l8yD/2zRbZItUQpy7ZxBJwaLX/Bs2TGaCthRppk8Sw24LOIWg12t9JEreezPoYD0SQcC2htNNo27kYEpYW/Srg==", + "engines": { + "node": ">=12" + } + }, "node_modules/@discordjs/collection": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.3.2.tgz", - "integrity": "sha512-dMjLl60b2DMqObbH1MQZKePgWhsNe49XkKBZ0W5Acl5uVV43SN414i2QfZwRI7dXAqIn8pEWD2+XXQFn9KWxqg==", + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.2.4.tgz", + "integrity": "sha512-PVrEJH+V6Ob0OwfagYQ/57kwt/HNEJxt5jqY4P+S3st9y29t9iokdnGMQoJXG5VEMAQIPbzu9Snw1F6yE8PdLA==", "engines": { "node": ">=16.0.0", "npm": ">=7.0.0" @@ -67,15 +75,6 @@ "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.9.tgz", "integrity": "sha512-MKmdASMf3LtPzwLyRrFjtFFZ48cMf8jmX5VRYrDQiJa8Ybu5VAmkqBWqKU8fdCwD8ysw4mQ9nrEHvzg6gunR7A==" }, - "node_modules/@types/node-fetch": { - "version": "2.5.12", - "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.5.12.tgz", - "integrity": "sha512-MKgC4dlq4kKNa/mYrwpKfzQMB5X3ee5U6fSprkKpToBqBmX4nFZL9cW5jl6sWn+xpRJ7ypWh2yyqqr8UUCstSw==", - "dependencies": { - "@types/node": "*", - "form-data": "^3.0.0" - } - }, "node_modules/@types/ws": { "version": "8.2.0", "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.2.0.tgz", @@ -117,25 +116,24 @@ } }, "node_modules/discord-api-types": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.24.0.tgz", - "integrity": "sha512-X0uA2a92cRjowUEXpLZIHWl4jiX1NsUpDhcEOpa1/hpO1vkaokgZ8kkPtPih9hHth5UVQ3mHBu/PpB4qjyfJ4A==", + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.23.1.tgz", + "integrity": "sha512-igWmn+45mzXRWNEPU25I/pr8MwxHb767wAr51oy3VRLRcTlp5ADBbrBR0lq3SA1Rfw3MtM4TQu1xo3kxscfVdQ==", "engines": { "node": ">=12" } }, "node_modules/discord.js": { - "version": "13.3.1", - "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.3.1.tgz", - "integrity": "sha512-zn4G8tL5+tMV00+0aSsVYNYcIfMSdT2g0nudKny+Ikd+XKv7m6bqI7n3Vji0GIRqXDr5ArPaw+iYFM2I1Iw3vg==", + "version": "13.2.0", + "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.2.0.tgz", + "integrity": "sha512-nyxUvL8wuQG38zx13wUMkpcA8koFszyiXdkSLwwM9opKW2LC2H5gD0cTZxImeJ6GtEnKPWT8xBiE8lLBmbNIhw==", "dependencies": { - "@discordjs/builders": "^0.8.1", - "@discordjs/collection": "^0.3.2", + "@discordjs/builders": "^0.6.0", + "@discordjs/collection": "^0.2.1", "@discordjs/form-data": "^3.0.1", - "@sapphire/async-queue": "^1.1.8", - "@types/node-fetch": "^2.5.12", + "@sapphire/async-queue": "^1.1.5", "@types/ws": "^8.2.0", - "discord-api-types": "^0.24.0", + "discord-api-types": "^0.23.1", "node-fetch": "^2.6.1", "ws": "^8.2.3" }, @@ -158,19 +156,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/form-data": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", - "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/is-obj": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", diff --git a/node_modules/@discordjs/builders/LICENSE b/node_modules/@discordjs/builders/LICENSE index cbe9c65..9300648 100644 --- a/node_modules/@discordjs/builders/LICENSE +++ b/node_modules/@discordjs/builders/LICENSE @@ -175,7 +175,6 @@ END OF TERMS AND CONDITIONS - Copyright 2021 Noel Buechler Copyright 2021 Vlad Frangu Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/node_modules/@discordjs/builders/README.md b/node_modules/@discordjs/builders/README.md index 649e99b..7838460 100644 --- a/node_modules/@discordjs/builders/README.md +++ b/node_modules/@discordjs/builders/README.md @@ -6,48 +6,28 @@

Discord server - NPM version - NPM downloads - Build status + Test status + Lint status Code coverage

## Installation -**Node.js 16.6.0 or newer is required.** +Install with [npm](https://www.npmjs.com/) / [yarn](https://yarnpkg.com) / [pnpm](https://pnpm.js.org/): -```sh-session +```sh npm install @discordjs/builders yarn add @discordjs/builders pnpm add @discordjs/builders ``` +## Contribution + +See [Contributing Guide](https://github.com/discordjs/builders/blob/main/.github/CONTRIBUTING.md). + ## Examples Here are some examples for the builders and utilities you can find in this package: - [Slash Command Builders](./docs/examples/Slash%20Command%20Builders.md) - -## Links - -- [Website](https://discord.js.org/) ([source](https://github.com/discordjs/website)) -- [Documentation](https://discord.js.org/#/docs/builders) -- [Guide](https://discordjs.guide/) ([source](https://github.com/discordjs/guide)) - See also the [Update Guide](https://discordjs.guide/additional-info/changes-in-v13.html), including updated and removed items in the library. -- [discord.js Discord server](https://discord.gg/djs) -- [Discord API Discord server](https://discord.gg/discord-api) -- [GitHub](https://github.com/discordjs/builders) -- [NPM](https://www.npmjs.com/package/@discordjs/builders) -- [Related libraries](https://discord.com/developers/docs/topics/community-resources#libraries) - -## Contributing - -Before creating an issue, please ensure that it hasn't already been reported/suggested, and double-check the -[documentation](https://discord.js.org/#/docs/builders). -See [the contribution guide](https://github.com/discordjs/builders/blob/main/.github/CONTRIBUTING.md) 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](https://discord.gg/djs). diff --git a/node_modules/@discordjs/builders/dist/index.d.ts b/node_modules/@discordjs/builders/dist/index.d.ts index 4ed52c4..130ab91 100644 --- a/node_modules/@discordjs/builders/dist/index.d.ts +++ b/node_modules/@discordjs/builders/dist/index.d.ts @@ -1,818 +1,15 @@ -import * as ow from 'ow'; -import * as discord_api_types_v9 from 'discord-api-types/v9'; -import { APIEmbedField, APIEmbed, APIEmbedThumbnail, APIEmbedImage, APIEmbedVideo, APIEmbedAuthor, APIEmbedProvider, APIEmbedFooter, ApplicationCommandOptionType, ChannelType, APIApplicationCommandChannelOptions, APIApplicationCommandOptionChoice, APIApplicationCommandSubCommandOptions, RESTPostAPIApplicationCommandsJSONBody, APIApplicationCommandOption, ApplicationCommandType } from 'discord-api-types/v9'; -import { Snowflake } from 'discord-api-types/globals'; -import { URL } from 'url'; - -declare const fieldNamePredicate: ow.StringPredicate; -declare const fieldValuePredicate: ow.StringPredicate; -declare const fieldInlinePredicate: ow.BooleanPredicate & ow.BasePredicate; -declare const embedFieldPredicate: ow.ObjectPredicate<{ - name: string; - value: string; - inline: boolean | undefined; -}>; -declare const embedFieldsArrayPredicate: ow.ArrayPredicate<{ - name: string; - value: string; - inline: boolean | undefined; -}>; -declare function validateFieldLength(fields: APIEmbedField[], amountAdding: number): void; -declare const authorNamePredicate: ow.AnyPredicate; -declare const urlPredicate: ow.AnyPredicate; -declare const colorPredicate: ow.AnyPredicate; -declare const descriptionPredicate: ow.AnyPredicate; -declare const footerTextPredicate: ow.AnyPredicate; -declare const timestampPredicate: ow.AnyPredicate; -declare const titlePredicate: ow.AnyPredicate; - -declare const Assertions$2_fieldNamePredicate: typeof fieldNamePredicate; -declare const Assertions$2_fieldValuePredicate: typeof fieldValuePredicate; -declare const Assertions$2_fieldInlinePredicate: typeof fieldInlinePredicate; -declare const Assertions$2_embedFieldPredicate: typeof embedFieldPredicate; -declare const Assertions$2_embedFieldsArrayPredicate: typeof embedFieldsArrayPredicate; -declare const Assertions$2_validateFieldLength: typeof validateFieldLength; -declare const Assertions$2_authorNamePredicate: typeof authorNamePredicate; -declare const Assertions$2_urlPredicate: typeof urlPredicate; -declare const Assertions$2_colorPredicate: typeof colorPredicate; -declare const Assertions$2_descriptionPredicate: typeof descriptionPredicate; -declare const Assertions$2_footerTextPredicate: typeof footerTextPredicate; -declare const Assertions$2_timestampPredicate: typeof timestampPredicate; -declare const Assertions$2_titlePredicate: typeof titlePredicate; -declare namespace Assertions$2 { - export { - Assertions$2_fieldNamePredicate as fieldNamePredicate, - Assertions$2_fieldValuePredicate as fieldValuePredicate, - Assertions$2_fieldInlinePredicate as fieldInlinePredicate, - Assertions$2_embedFieldPredicate as embedFieldPredicate, - Assertions$2_embedFieldsArrayPredicate as embedFieldsArrayPredicate, - Assertions$2_validateFieldLength as validateFieldLength, - Assertions$2_authorNamePredicate as authorNamePredicate, - Assertions$2_urlPredicate as urlPredicate, - Assertions$2_colorPredicate as colorPredicate, - Assertions$2_descriptionPredicate as descriptionPredicate, - Assertions$2_footerTextPredicate as footerTextPredicate, - Assertions$2_timestampPredicate as timestampPredicate, - Assertions$2_titlePredicate as titlePredicate, - }; -} - -interface AuthorOptions { - name: string; - url?: string; - iconURL?: string; -} -interface FooterOptions { - text: string; - iconURL?: string; -} -/** - * Represents an embed in a message (image/video preview, rich embed, etc.) - */ -declare class Embed implements APIEmbed { - /** - * An array of fields of this embed - */ - fields: APIEmbedField[]; - /** - * The embed title - */ - title?: string; - /** - * The embed description - */ - description?: string; - /** - * The embed url - */ - url?: string; - /** - * The embed color - */ - color?: number; - /** - * The timestamp of the embed in the ISO format - */ - timestamp?: string; - /** - * The embed thumbnail data - */ - thumbnail?: APIEmbedThumbnail; - /** - * The embed image data - */ - image?: APIEmbedImage; - /** - * Received video data - */ - video?: APIEmbedVideo; - /** - * The embed author data - */ - author?: APIEmbedAuthor; - /** - * Received data about the embed provider - */ - provider?: APIEmbedProvider; - /** - * The embed footer data - */ - footer?: APIEmbedFooter; - constructor(data?: APIEmbed); - /** - * The accumulated length for the embed title, description, fields, footer text, and author name - */ - get length(): number; - /** - * Adds a field to the embed (max 25) - * - * @param field The field to add. - */ - addField(field: APIEmbedField): this; - /** - * Adds fields to the embed (max 25) - * - * @param fields The fields to add - */ - addFields(...fields: APIEmbedField[]): this; - /** - * Removes, replaces, or inserts fields in the embed (max 25) - * - * @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 author of this embed - * - * @param options The options for the author - */ - setAuthor(options: AuthorOptions | null): this; - /** - * Sets the color of this embed - * - * @param color The color of the embed - */ - setColor(color: number | null): this; - /** - * Sets the description of this embed - * - * @param description The description - */ - setDescription(description: string | null): this; - /** - * Sets the footer of this embed - * - * @param options The options for the footer - */ - setFooter(options: FooterOptions | null): this; - /** - * Sets the image of this embed - * - * @param url The URL of the image - */ - setImage(url: string | null): this; - /** - * Sets the thumbnail of this embed - * - * @param url The URL of the thumbnail - */ - setThumbnail(url: string | null): this; - /** - * Sets the timestamp of this embed - * - * @param timestamp The timestamp or date - */ - setTimestamp(timestamp?: number | Date | null): this; - /** - * Sets the title of this embed - * - * @param title The title - */ - setTitle(title: string | null): this; - /** - * Sets the URL of this embed - * - * @param url The URL - */ - setURL(url: string | null): this; - /** - * Transforms the embed to a plain object - */ - toJSON(): APIEmbed; - /** - * Normalizes field input and resolves strings - * - * @param fields Fields to normalize - */ - static normalizeFields(...fields: APIEmbedField[]): APIEmbedField[]; -} - -/** - * Wraps the content inside a codeblock with no language - * - * @param content The content to wrap - */ -declare function codeBlock(content: C): `\`\`\`\n${C}\`\`\``; -/** - * Wraps the content inside a codeblock with the specified language - * - * @param language The language for the codeblock - * @param content The content to wrap - */ -declare function codeBlock(language: L, content: C): `\`\`\`${L}\n${C}\`\`\``; -/** - * Wraps the content inside \`backticks\`, which formats it as inline code - * - * @param content The content to wrap - */ -declare function inlineCode(content: C): `\`${C}\``; -/** - * Formats the content into italic text - * - * @param content The content to wrap - */ -declare function italic(content: C): `_${C}_`; -/** - * Formats the content into bold text - * - * @param content The content to wrap - */ -declare function bold(content: C): `**${C}**`; -/** - * Formats the content into underscored text - * - * @param content The content to wrap - */ -declare function underscore(content: C): `__${C}__`; -/** - * Formats the content into strike-through text - * - * @param content The content to wrap - */ -declare function strikethrough(content: C): `~~${C}~~`; -/** - * Formats the content into a quote. This needs to be at the start of the line for Discord to format it - * - * @param content The content to wrap - */ -declare function quote(content: C): `> ${C}`; -/** - * Formats the content into a block quote. This needs to be at the start of the line for Discord to format it - * - * @param content The content to wrap - */ -declare function blockQuote(content: C): `>>> ${C}`; -/** - * Wraps the URL into `<>`, which stops it from embedding - * - * @param url The URL to wrap - */ -declare function hideLinkEmbed(url: C): `<${C}>`; -/** - * Wraps the URL into `<>`, which stops it from embedding - * - * @param url The URL to wrap - */ -declare function hideLinkEmbed(url: URL): `<${string}>`; -/** - * Formats the content and the URL into a masked URL - * - * @param content The content to display - * @param url The URL the content links to - */ -declare function hyperlink(content: C, url: URL): `[${C}](${string})`; -/** - * Formats the content and the URL into a masked URL - * - * @param content The content to display - * @param url The URL the content links to - */ -declare function hyperlink(content: C, url: U): `[${C}](${U})`; -/** - * Formats the content and the URL into a masked URL - * - * @param content The content to display - * @param url The URL the content links to - * @param title The title shown when hovering on the masked link - */ -declare function hyperlink(content: C, url: URL, title: T): `[${C}](${string} "${T}")`; -/** - * Formats the content and the URL into a masked URL - * - * @param content The content to display - * @param url The URL the content links to - * @param title The title shown when hovering on the masked link - */ -declare function hyperlink(content: C, url: U, title: T): `[${C}](${U} "${T}")`; -/** - * Wraps the content inside spoiler (hidden text) - * - * @param content The content to wrap - */ -declare function spoiler(content: C): `||${C}||`; -/** - * Formats a user ID into a user mention - * - * @param userId The user ID to format - */ -declare function userMention(userId: C): `<@${C}>`; -/** - * Formats a user ID into a member-nickname mention - * - * @param memberId The user ID to format - */ -declare function memberNicknameMention(memberId: C): `<@!${C}>`; -/** - * Formats a channel ID into a channel mention - * - * @param channelId The channel ID to format - */ -declare function channelMention(channelId: C): `<#${C}>`; -/** - * Formats a role ID into a role mention - * - * @param roleId The role ID to format - */ -declare function roleMention(roleId: C): `<@&${C}>`; -/** - * Formats an emoji ID into a fully qualified emoji identifier - * - * @param emojiId The emoji ID to format - */ -declare function formatEmoji(emojiId: C, animated?: false): `<:_:${C}>`; -/** - * Formats an emoji ID into a fully qualified emoji identifier - * - * @param emojiId The emoji ID to format - * @param animated Whether the emoji is animated or not. Defaults to `false` - */ -declare function formatEmoji(emojiId: C, animated?: true): ``; -/** - * Formats a date into a short date-time string - * - * @param date The date to format, defaults to the current time - */ -declare function time(date?: Date): ``; -/** - * Formats a date given a format style - * - * @param date The date to format - * @param style The style to use - */ -declare function time(date: Date, style: S): ``; -/** - * Formats the given timestamp into a short date-time string - * - * @param seconds The time to format, represents an UNIX timestamp in seconds - */ -declare function time(seconds: C): ``; -/** - * Formats the given timestamp into a short date-time string - * - * @param seconds The time to format, represents an UNIX timestamp in seconds - * @param style The style to use - */ -declare function time(seconds: C, style: S): ``; -/** - * The [message formatting timestamp styles](https://discord.com/developers/docs/reference#message-formatting-timestamp-styles) supported by Discord - */ -declare const TimestampStyles: { - /** - * Short time format, consisting of hours and minutes, e.g. 16:20 - */ - readonly ShortTime: "t"; - /** - * Long time format, consisting of hours, minutes, and seconds, e.g. 16:20:30 - */ - readonly LongTime: "T"; - /** - * Short date format, consisting of day, month, and year, e.g. 20/04/2021 - */ - readonly ShortDate: "d"; - /** - * Long date format, consisting of day, month, and year, e.g. 20 April 2021 - */ - readonly LongDate: "D"; - /** - * Short date-time format, consisting of short date and short time formats, e.g. 20 April 2021 16:20 - */ - readonly ShortDateTime: "f"; - /** - * Long date-time format, consisting of long date and short time formats, e.g. Tuesday, 20 April 2021 16:20 - */ - readonly LongDateTime: "F"; - /** - * Relative time format, consisting of a relative duration format, e.g. 2 months ago - */ - readonly RelativeTime: "R"; -}; -/** - * The possible values, see {@link TimestampStyles} for more information - */ -declare type TimestampStylesString = typeof TimestampStyles[keyof typeof TimestampStyles]; -/** - * An enum with all the available faces from Discord's native slash commands - */ -declare enum Faces { - /** - * ¯\\_(ツ)\\_/¯ - */ - Shrug = "\u00AF\\_(\u30C4)\\_/\u00AF", - /** - * (╯°□°)╯︵ ┻━┻ - */ - Tableflip = "(\u256F\u00B0\u25A1\u00B0\uFF09\u256F\uFE35 \u253B\u2501\u253B", - /** - * ┬─┬ ノ( ゜-゜ノ) - */ - Unflip = "\u252C\u2500\u252C \u30CE( \u309C-\u309C\u30CE)" -} - -declare class SlashCommandBooleanOption extends SlashCommandOptionBase { - readonly type: ApplicationCommandOptionType.Boolean; - constructor(); -} - -declare abstract class ApplicationCommandOptionWithChannelTypesBase extends SlashCommandOptionBase implements ToAPIApplicationCommandOptions { - channelTypes?: Exclude[]; - /** - * Adds a channel type to this option - * - * @param channelType The type of channel to allow - */ - addChannelType(channelType: Exclude): this; - /** - * Adds channel types to this option - * - * @param channelTypes The channel types to add - */ - addChannelTypes(channelTypes: Exclude[]): this; - toJSON(): APIApplicationCommandChannelOptions; -} - -declare class SlashCommandChannelOption extends ApplicationCommandOptionWithChannelTypesBase { - readonly type: ApplicationCommandOptionType.Channel; - constructor(); -} - -declare abstract class ApplicationCommandOptionWithChoicesBase extends SlashCommandOptionBase implements ToAPIApplicationCommandOptions { - choices?: APIApplicationCommandOptionChoice[]; - /** - * Adds a choice for this option - * - * @param name The name of the choice - * @param value The value of the choice - */ - addChoice(name: string, value: T): this; - /** - * Adds multiple choices for this option - * - * @param choices The choices to add - */ - addChoices(choices: [name: string, value: T][]): this; - toJSON(): { - choices: APIApplicationCommandOptionChoice[] | undefined; - type: ApplicationCommandOptionType.String | ApplicationCommandOptionType.Integer | ApplicationCommandOptionType.Number; - name: string; - description: string; - default?: boolean | undefined; - required?: boolean | undefined; - } | { - choices: APIApplicationCommandOptionChoice[] | undefined; - type: ApplicationCommandOptionType.Subcommand | ApplicationCommandOptionType.SubcommandGroup; - options?: discord_api_types_v9.APIApplicationCommandOption[] | undefined; - name: string; - description: string; - default?: boolean | undefined; - required?: boolean | undefined; - } | { - choices: APIApplicationCommandOptionChoice[] | undefined; - type: ApplicationCommandOptionType.Channel; - channel_types?: (discord_api_types_v9.ChannelType.GuildText | discord_api_types_v9.ChannelType.GuildVoice | discord_api_types_v9.ChannelType.GuildCategory | discord_api_types_v9.ChannelType.GuildNews | discord_api_types_v9.ChannelType.GuildStore | discord_api_types_v9.ChannelType.GuildNewsThread | discord_api_types_v9.ChannelType.GuildPublicThread | discord_api_types_v9.ChannelType.GuildPrivateThread | discord_api_types_v9.ChannelType.GuildStageVoice)[] | undefined; - name: string; - description: string; - default?: boolean | undefined; - required?: boolean | undefined; - } | { - choices: APIApplicationCommandOptionChoice[] | undefined; - type: ApplicationCommandOptionType.Boolean | ApplicationCommandOptionType.User | ApplicationCommandOptionType.Role | ApplicationCommandOptionType.Mentionable; - name: string; - description: string; - default?: boolean | undefined; - required?: boolean | undefined; - }; -} - -declare class SlashCommandIntegerOption extends ApplicationCommandOptionWithChoicesBase { - readonly type: ApplicationCommandOptionType.Integer; - constructor(); -} - -declare class SlashCommandMentionableOption extends SlashCommandOptionBase { - readonly type: ApplicationCommandOptionType.Mentionable; - constructor(); -} - -declare class SlashCommandNumberOption extends ApplicationCommandOptionWithChoicesBase { - readonly type: ApplicationCommandOptionType.Number; - constructor(); -} - -declare class SlashCommandRoleOption extends SlashCommandOptionBase { - readonly type: ApplicationCommandOptionType.Role; - constructor(); -} - -declare class SlashCommandStringOption extends ApplicationCommandOptionWithChoicesBase { - readonly type: ApplicationCommandOptionType.String; - constructor(); -} - -declare class SlashCommandUserOption extends SlashCommandOptionBase { - readonly type: ApplicationCommandOptionType.User; - constructor(); -} - -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)): ShouldOmitSubcommandFunctions extends true ? Omit : this; - /** - * Adds a user option - * - * @param input A function that returns an option builder, or an already built builder - */ - addUserOption(input: SlashCommandUserOption | ((builder: SlashCommandUserOption) => SlashCommandUserOption)): ShouldOmitSubcommandFunctions extends true ? Omit : this; - /** - * Adds a channel option - * - * @param input A function that returns an option builder, or an already built builder - */ - addChannelOption(input: SlashCommandChannelOption | ((builder: SlashCommandChannelOption) => SlashCommandChannelOption)): ShouldOmitSubcommandFunctions extends true ? Omit : this; - /** - * Adds a role option - * - * @param input A function that returns an option builder, or an already built builder - */ - addRoleOption(input: SlashCommandRoleOption | ((builder: SlashCommandRoleOption) => SlashCommandRoleOption)): ShouldOmitSubcommandFunctions extends true ? Omit : this; - /** - * Adds a mentionable option - * - * @param input A function that returns an option builder, or an already built builder - */ - addMentionableOption(input: SlashCommandMentionableOption | ((builder: SlashCommandMentionableOption) => SlashCommandMentionableOption)): ShouldOmitSubcommandFunctions extends true ? Omit : this; - /** - * Adds a string option - * - * @param input A function that returns an option builder, or an already built builder - */ - addStringOption(input: SlashCommandStringOption | ((builder: SlashCommandStringOption) => SlashCommandStringOption)): ShouldOmitSubcommandFunctions extends true ? Omit : this; - /** - * Adds an integer option - * - * @param input A function that returns an option builder, or an already built builder - */ - addIntegerOption(input: SlashCommandIntegerOption | ((builder: SlashCommandIntegerOption) => SlashCommandIntegerOption)): ShouldOmitSubcommandFunctions extends true ? Omit : this; - /** - * Adds a number option - * - * @param input A function that returns an option builder, or an already built builder - */ - addNumberOption(input: SlashCommandNumberOption | ((builder: SlashCommandNumberOption) => SlashCommandNumberOption)): ShouldOmitSubcommandFunctions extends true ? Omit : this; - private _sharedAddOptionMethod; -} - -declare class SharedNameAndDescription { - readonly name: string; - readonly description: string; - /** - * Sets the name - * - * @param name The name - */ - setName(name: string): this; - /** - * Sets the description - * - * @param description The description - */ - setDescription(description: string): this; -} - -/** - * Represents a folder for subcommands - * - * For more information, go to https://discord.com/developers/docs/interactions/slash-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 part of this subcommand group - */ - readonly options: ToAPIApplicationCommandOptions[]; - /** - * 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; - toJSON(): APIApplicationCommandSubCommandOptions; -} -interface SlashCommandSubcommandGroupBuilder extends SharedNameAndDescription { -} -/** - * Represents a subcommand - * - * For more information, go to https://discord.com/developers/docs/interactions/slash-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 of this subcommand - */ - readonly options: ToAPIApplicationCommandOptions[]; - toJSON(): APIApplicationCommandSubCommandOptions; -} -interface SlashCommandSubcommandBuilder extends SharedNameAndDescription, SharedSlashCommandOptions { -} - -declare class SlashCommandBuilder { - /** - * The name of this slash command - */ - readonly name: string; - /** - * The description of this slash command - */ - readonly description: string; - /** - * The options of this slash command - */ - readonly options: ToAPIApplicationCommandOptions[]; - /** - * Whether the command is enabled by default when the app is added to a guild - * - * @default true - */ - readonly defaultPermission: boolean | undefined; - /** - * Returns the final data that should be sent to Discord. - * - * **Note:** Calling this function will validate required properties based on their conditions. - */ - toJSON(): RESTPostAPIApplicationCommandsJSONBody; - /** - * Sets whether the command is enabled by default when the application is added to a guild. - * - * **Note**: 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 https://discord.com/developers/docs/interactions/application-commands#permissions - */ - setDefaultPermission(value: boolean): this; - /** - * 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)): SlashCommandSubcommandsOnlyBuilder; - /** - * 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)): SlashCommandSubcommandsOnlyBuilder; -} -interface SlashCommandBuilder extends SharedNameAndDescription, SharedSlashCommandOptions { -} -interface SlashCommandSubcommandsOnlyBuilder extends SharedNameAndDescription, Pick { -} -interface SlashCommandOptionsOnlyBuilder extends SharedNameAndDescription, SharedSlashCommandOptions, Pick { -} -interface ToAPIApplicationCommandOptions { - toJSON(): APIApplicationCommandOption; -} - -declare class SlashCommandOptionBase extends SharedNameAndDescription implements ToAPIApplicationCommandOptions { - required: boolean; - readonly type: ApplicationCommandOptionType; - constructor(type: ApplicationCommandOptionType); - /** - * Marks the option as required - * - * @param required If this option should be required - */ - setRequired(required: boolean): this; - toJSON(): APIApplicationCommandOption; -} - -declare function validateRequiredParameters$1(name: string, description: string, options: ToAPIApplicationCommandOptions[]): void; -declare function validateName$1(name: unknown): asserts name is string; -declare function validateDescription(description: unknown): asserts description is string; -declare function validateDefaultPermission$1(value: unknown): asserts value is boolean; -declare function validateMaxOptionsLength(options: unknown): asserts options is ToAPIApplicationCommandOptions[]; -declare function validateMaxChoicesLength(choices: APIApplicationCommandOptionChoice[]): void; -declare function assertReturnOfBuilder(input: unknown, ExpectedInstanceOf: new () => T): asserts input is T; - -declare const Assertions$1_validateDescription: typeof validateDescription; -declare const Assertions$1_validateMaxOptionsLength: typeof validateMaxOptionsLength; -declare const Assertions$1_validateMaxChoicesLength: typeof validateMaxChoicesLength; -declare const Assertions$1_assertReturnOfBuilder: typeof assertReturnOfBuilder; -declare namespace Assertions$1 { - export { - validateRequiredParameters$1 as validateRequiredParameters, - validateName$1 as validateName, - Assertions$1_validateDescription as validateDescription, - validateDefaultPermission$1 as validateDefaultPermission, - Assertions$1_validateMaxOptionsLength as validateMaxOptionsLength, - Assertions$1_validateMaxChoicesLength as validateMaxChoicesLength, - Assertions$1_assertReturnOfBuilder as assertReturnOfBuilder, - }; -} - -declare class ContextMenuCommandBuilder { - /** - * The name of this context menu command - */ - readonly name: string; - /** - * The type of this context menu command - */ - readonly type: ContextMenuCommandType; - /** - * Whether the command is enabled by default when the app is added to a guild - * - * @default true - */ - readonly defaultPermission: boolean | undefined; - /** - * Sets the name - * - * @param name The name - */ - setName(name: string): this; - /** - * Sets the type - * - * @param type The type - */ - setType(type: ContextMenuCommandType): this; - /** - * Sets whether the command is enabled by default when the application is added to a guild. - * - * **Note**: 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 https://discord.com/developers/docs/interactions/application-commands#permissions - */ - setDefaultPermission(value: boolean): this; - /** - * Returns the final data that should be sent to Discord. - * - * **Note:** Calling this function will validate required properties based on their conditions. - */ - toJSON(): RESTPostAPIApplicationCommandsJSONBody; -} -declare type ContextMenuCommandType = ApplicationCommandType.User | ApplicationCommandType.Message; - -declare function validateRequiredParameters(name: string, type: number): void; -declare function validateName(name: unknown): asserts name is string; -declare function validateType(type: unknown): asserts type is ContextMenuCommandType; -declare function validateDefaultPermission(value: unknown): asserts value is boolean; - -declare const Assertions_validateRequiredParameters: typeof validateRequiredParameters; -declare const Assertions_validateName: typeof validateName; -declare const Assertions_validateType: typeof validateType; -declare const Assertions_validateDefaultPermission: typeof validateDefaultPermission; -declare namespace Assertions { - export { - Assertions_validateRequiredParameters as validateRequiredParameters, - Assertions_validateName as validateName, - Assertions_validateType as validateType, - Assertions_validateDefaultPermission as validateDefaultPermission, - }; -} - -export { AuthorOptions, Assertions as ContextMenuCommandAssertions, ContextMenuCommandBuilder, ContextMenuCommandType, Embed, Assertions$2 as EmbedAssertions, Faces, FooterOptions, Assertions$1 as SlashCommandAssertions, SlashCommandBooleanOption, SlashCommandBuilder, SlashCommandChannelOption, SlashCommandIntegerOption, SlashCommandMentionableOption, SlashCommandNumberOption, SlashCommandOptionsOnlyBuilder, SlashCommandRoleOption, SlashCommandStringOption, SlashCommandSubcommandBuilder, SlashCommandSubcommandGroupBuilder, SlashCommandSubcommandsOnlyBuilder, SlashCommandUserOption, TimestampStyles, TimestampStylesString, ToAPIApplicationCommandOptions, blockQuote, bold, channelMention, codeBlock, formatEmoji, hideLinkEmbed, hyperlink, inlineCode, italic, memberNicknameMention, quote, roleMention, spoiler, strikethrough, time, underscore, userMention }; +export * as EmbedAssertions from './messages/embed/Assertions'; +export * from './messages/embed/Embed'; +export * from './messages/formatters'; +export * as SlashCommandAssertions from './interactions/slashCommands/Assertions'; +export * from './interactions/slashCommands/SlashCommandBuilder'; +export * from './interactions/slashCommands/SlashCommandSubcommands'; +export * from './interactions/slashCommands/options/boolean'; +export * from './interactions/slashCommands/options/channel'; +export * from './interactions/slashCommands/options/integer'; +export * from './interactions/slashCommands/options/mentionable'; +export * from './interactions/slashCommands/options/number'; +export * from './interactions/slashCommands/options/role'; +export * from './interactions/slashCommands/options/string'; +export * from './interactions/slashCommands/options/user'; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/index.d.ts.map b/node_modules/@discordjs/builders/dist/index.d.ts.map new file mode 100644 index 0000000..2618e71 --- /dev/null +++ b/node_modules/@discordjs/builders/dist/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"/","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,eAAe,MAAM,6BAA6B,CAAC;AAC/D,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AAEtC,OAAO,KAAK,sBAAsB,MAAM,yCAAyC,CAAC;AAClF,cAAc,kDAAkD,CAAC;AACjE,cAAc,sDAAsD,CAAC;AACrE,cAAc,8CAA8C,CAAC;AAC7D,cAAc,8CAA8C,CAAC;AAC7D,cAAc,8CAA8C,CAAC;AAC7D,cAAc,kDAAkD,CAAC;AACjE,cAAc,6CAA6C,CAAC;AAC5D,cAAc,2CAA2C,CAAC;AAC1D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,2CAA2C,CAAC"} \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/index.js b/node_modules/@discordjs/builders/dist/index.js index b5a2850..dacfc1f 100644 --- a/node_modules/@discordjs/builders/dist/index.js +++ b/node_modules/@discordjs/builders/dist/index.js @@ -1,4 +1,19 @@ -var Ee=Object.create;var T=Object.defineProperty;var ve=Object.getOwnPropertyDescriptor;var Re=Object.getOwnPropertyNames;var Me=Object.getPrototypeOf,De=Object.prototype.hasOwnProperty;var _e=(t,e,n)=>e in t?T(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var $e=t=>T(t,"__esModule",{value:!0});var L=(t,e)=>{$e(t);for(var n in e)T(t,n,{get:e[n],enumerable:!0})},ke=(t,e,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of Re(e))!De.call(t,o)&&o!=="default"&&T(t,o,{get:()=>e[o],enumerable:!(n=ve(e,o))||n.enumerable});return t},s=t=>ke($e(T(t!=null?Ee(Me(t)):{},"default",t&&t.__esModule&&"default"in t?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t),I=(t,e,n,o)=>{for(var p=o>1?void 0:o?ve(e,n):e,P=t.length-1,$;P>=0;P--)($=t[P])&&(p=(o?$(e,n,p):$(p))||p);return o&&p&&T(e,n,p),p};var i=(t,e,n)=>(_e(t,typeof e!="symbol"?e+"":e,n),n);L(exports,{ContextMenuCommandAssertions:()=>Te,ContextMenuCommandBuilder:()=>Le,Embed:()=>B,EmbedAssertions:()=>ie,Faces:()=>oe,SlashCommandAssertions:()=>ae,SlashCommandBooleanOption:()=>G,SlashCommandBuilder:()=>K,SlashCommandChannelOption:()=>F,SlashCommandIntegerOption:()=>J,SlashCommandMentionableOption:()=>q,SlashCommandNumberOption:()=>V,SlashCommandRoleOption:()=>W,SlashCommandStringOption:()=>j,SlashCommandSubcommandBuilder:()=>f,SlashCommandSubcommandGroupBuilder:()=>O,SlashCommandUserOption:()=>z,TimestampStyles:()=>nt,blockQuote:()=>je,bold:()=>Je,channelMention:()=>Ye,codeBlock:()=>Ue,formatEmoji:()=>et,hideLinkEmbed:()=>ze,hyperlink:()=>Ke,inlineCode:()=>Ge,italic:()=>Fe,memberNicknameMention:()=>Xe,quote:()=>We,roleMention:()=>Ze,spoiler:()=>Qe,strikethrough:()=>Ve,time:()=>tt,underscore:()=>qe,userMention:()=>He});var ie={};L(ie,{authorNamePredicate:()=>X,colorPredicate:()=>Y,descriptionPredicate:()=>Z,embedFieldPredicate:()=>Ie,embedFieldsArrayPredicate:()=>M,fieldInlinePredicate:()=>R,fieldNamePredicate:()=>v,fieldValuePredicate:()=>E,footerTextPredicate:()=>ee,timestampPredicate:()=>te,titlePredicate:()=>ne,urlPredicate:()=>b,validateFieldLength:()=>D});var r=s(require("ow")),v=r.default.string.minLength(1).maxLength(256),E=r.default.string.minLength(1).maxLength(1024),R=r.default.optional.boolean,Ie=r.default.object.exactShape({name:v,value:E,inline:R}),M=r.default.array.ofType(Ie);function D(t,e){(0,r.default)(t.length+e,"field amount",r.default.number.lessThanOrEqual(25))}var X=r.default.any(v,r.default.null),b=r.default.any(r.default.string.url,r.default.nullOrUndefined),Y=r.default.any(r.default.number.greaterThanOrEqual(0).lessThanOrEqual(16777215),r.default.null),Z=r.default.any(r.default.string.minLength(1).maxLength(4096),r.default.null),ee=r.default.any(r.default.string.minLength(1).maxLength(2048),r.default.null),te=r.default.any(r.default.number,r.default.date,r.default.null),ne=r.default.any(v,r.default.null);var m=s(require("ow"));var B=class{constructor(e={}){i(this,"fields");i(this,"title");i(this,"description");i(this,"url");i(this,"color");i(this,"timestamp");i(this,"thumbnail");i(this,"image");i(this,"video");i(this,"author");i(this,"provider");i(this,"footer");this.title=e.title,this.description=e.description,this.url=e.url,this.color=e.color,this.thumbnail=e.thumbnail,this.image=e.image,this.video=e.video,this.author=e.author,this.provider=e.provider,this.footer=e.footer,this.fields=e.fields??[],e.timestamp&&(this.timestamp=new Date(e.timestamp).toISOString())}get length(){return(this.title?.length??0)+(this.description?.length??0)+this.fields.reduce((e,n)=>e+n.name.length+n.value.length,0)+(this.footer?.text.length??0)+(this.author?.name.length??0)}addField(e){return this.addFields(e)}addFields(...e){return(0,m.default)(e,"fields",M),D(this.fields,e.length),this.fields.push(...B.normalizeFields(...e)),this}spliceFields(e,n,...o){return(0,m.default)(o,"fields",M),D(this.fields,o.length-n),this.fields.splice(e,n,...B.normalizeFields(...o)),this}setAuthor(e){if(e===null)return this.author=void 0,this;let{name:n,iconURL:o,url:p}=e;return(0,m.default)(n,"name",X),(0,m.default)(o,"iconURL",b),(0,m.default)(p,"url",b),this.author={name:n,url:p,icon_url:o},this}setColor(e){return(0,m.default)(e,"color",Y),this.color=e??void 0,this}setDescription(e){return(0,m.default)(e,"description",Z),this.description=e??void 0,this}setFooter(e){if(e===null)return this.footer=void 0,this;let{text:n,iconURL:o}=e;return(0,m.default)(n,"text",ee),(0,m.default)(o,"iconURL",b),this.footer={text:n,icon_url:o},this}setImage(e){return(0,m.default)(e,"url",b),this.image=e?{url:e}:void 0,this}setThumbnail(e){return(0,m.default)(e,"url",b),this.thumbnail=e?{url:e}:void 0,this}setTimestamp(e=Date.now()){return(0,m.default)(e,"timestamp",te),this.timestamp=e?new Date(e).toISOString():void 0,this}setTitle(e){return(0,m.default)(e,"title",ne),this.title=e??void 0,this}setURL(e){return(0,m.default)(e,"url",b),this.url=e??void 0,this}toJSON(){return{...this}}static normalizeFields(...e){return e.flat(1/0).map(n=>((0,m.default)(n.name,"field name",v),(0,m.default)(n.value,"field value",E),(0,m.default)(n.inline,"field inline",R),{name:n.name,value:n.value,inline:n.inline??void 0}))}};function Ue(t,e){return typeof e=="undefined"?`\`\`\` -${t}\`\`\``:`\`\`\`${t} -${e}\`\`\``}function Ge(t){return`\`${t}\``}function Fe(t){return`_${t}_`}function Je(t){return`**${t}**`}function qe(t){return`__${t}__`}function Ve(t){return`~~${t}~~`}function We(t){return`> ${t}`}function je(t){return`>>> ${t}`}function ze(t){return`<${t}>`}function Ke(t,e,n){return n?`[${t}](${e} "${n}")`:`[${t}](${e})`}function Qe(t){return`||${t}||`}function He(t){return`<@${t}>`}function Xe(t){return`<@!${t}>`}function Ye(t){return`<#${t}>`}function Ze(t){return`<@&${t}>`}function et(t,e=!1){return`<${e?"a":""}:_:${t}>`}function tt(t,e){return typeof t!="number"&&(t=Math.floor((t?.getTime()??Date.now())/1e3)),typeof e=="string"?``:``}var nt={ShortTime:"t",LongTime:"T",ShortDate:"d",LongDate:"D",ShortDateTime:"f",LongDateTime:"F",RelativeTime:"R"},oe;(function(o){o.Shrug="\xAF\\_(\u30C4)\\_/\xAF",o.Tableflip="(\u256F\xB0\u25A1\xB0\uFF09\u256F\uFE35 \u253B\u2501\u253B",o.Unflip="\u252C\u2500\u252C \u30CE( \u309C-\u309C\u30CE)"})(oe||(oe={}));var ae={};L(ae,{assertReturnOfBuilder:()=>y,validateDefaultPermission:()=>re,validateDescription:()=>U,validateMaxChoicesLength:()=>se,validateMaxOptionsLength:()=>C,validateName:()=>k,validateRequiredParameters:()=>x});var _=s(require("@sindresorhus/is")),h=s(require("ow"));function x(t,e,n){k(t),U(e),C(n)}var it=h.default.string.lowercase.minLength(1).maxLength(32).addValidator({message:(t,e)=>`Expected ${e} to match "^[\\p{L}\\p{N}_-]+$", got ${t} instead`,validator:t=>/^[\p{L}\p{N}_-]+$/u.test(t)});function k(t){(0,h.default)(t,"name",it)}var ot=h.default.string.minLength(1).maxLength(100);function U(t){(0,h.default)(t,"description",ot)}var rt=h.default.boolean;function re(t){(0,h.default)(t,"default_permission",rt)}var Be=h.default.array.maxLength(25);function C(t){(0,h.default)(t,"options",Be)}function se(t){(0,h.default)(t,"choices",Be)}function y(t,e){let n=e.name;if(_.default.nullOrUndefined(t))throw new TypeError(`Expected to receive a ${n} builder, got ${t===null?"null":"undefined"} instead.`);if(_.default.primitive(t))throw new TypeError(`Expected to receive a ${n} builder, got a primitive (${typeof t}) instead.`);if(!(t instanceof e)){let o=t,p=_.default.function_(t)?t.name:o.constructor.name,P=Reflect.get(o,Symbol.toStringTag),$=P?`${p} [${P}]`:p;throw new TypeError(`Expected to receive a ${n} builder, got ${$} instead.`)}}var we=s(require("ts-mixer"));var me=s(require("discord-api-types/v9"));var N=s(require("ow"));var S=class{constructor(){i(this,"name");i(this,"description")}setName(e){return k(e),Reflect.set(this,"name",e),this}setDescription(e){return U(e),Reflect.set(this,"description",e),this}};var d=class extends S{constructor(e){super();i(this,"required",!1);i(this,"type");this.type=e}setRequired(e){return(0,N.default)(e,"required",N.default.boolean),this.required=e,this}toJSON(){return x(this.name,this.description,[]),(0,N.default)(this.required,"required",N.default.boolean),{type:this.type,name:this.name,description:this.description,required:this.required}}};var G=class extends d{constructor(){super(me.ApplicationCommandOptionType.Boolean);i(this,"type",me.ApplicationCommandOptionType.Boolean)}};var le=s(require("discord-api-types/v9"));var l=s(require("discord-api-types/v9")),pe=s(require("ow"));var st=[l.ChannelType.GuildCategory,l.ChannelType.GuildNews,l.ChannelType.GuildNewsThread,l.ChannelType.GuildStore,l.ChannelType.GuildStageVoice,l.ChannelType.GuildText,l.ChannelType.GuildVoice,l.ChannelType.GuildPublicThread,l.ChannelType.GuildPrivateThread],at=pe.default.number.oneOf(st),de=class extends d{constructor(){super(...arguments);i(this,"channelTypes")}addChannelType(e){return this.channelTypes??=[],(0,pe.default)(e,"channel type",at),this.channelTypes.push(e),this}addChannelTypes(e){return e.forEach(n=>this.addChannelType(n)),this}toJSON(){return{...super.toJSON(),type:l.ApplicationCommandOptionType.Channel,channel_types:this.channelTypes}}};var F=class extends de{constructor(){super(le.ApplicationCommandOptionType.Channel);i(this,"type",le.ApplicationCommandOptionType.Channel)}};var he=s(require("discord-api-types/v9"));var c=s(require("discord-api-types/v9")),u=s(require("ow"));var ce=u.default.string.minLength(1).maxLength(100),Ne=u.default.number.finite,mt=u.default.array.ofType(u.default.array.exactShape([ce,u.default.any(u.default.string,Ne)])),g=class extends d{constructor(){super(...arguments);i(this,"choices")}addChoice(e,n){return this.choices??=[],se(this.choices),(0,u.default)(e,`${ue[this.type]} choice name`,ce),this.type===c.ApplicationCommandOptionType.String?(0,u.default)(n,"string choice value",ce):(0,u.default)(n,`${ue[this.type]} choice value`,Ne),this.choices.push({name:e,value:n}),this}addChoices(e){(0,u.default)(e,`${ue[this.type]} choices`,mt);for(let[n,o]of e)this.addChoice(n,o);return this}toJSON(){return{...super.toJSON(),choices:this.choices}}},ue={[c.ApplicationCommandOptionType.Subcommand]:"subcommand",[c.ApplicationCommandOptionType.SubcommandGroup]:"subcommand group",[c.ApplicationCommandOptionType.String]:"string",[c.ApplicationCommandOptionType.Integer]:"integer",[c.ApplicationCommandOptionType.Boolean]:"boolean",[c.ApplicationCommandOptionType.User]:"user",[c.ApplicationCommandOptionType.Channel]:"channel",[c.ApplicationCommandOptionType.Role]:"role",[c.ApplicationCommandOptionType.Mentionable]:"mentionable",[c.ApplicationCommandOptionType.Number]:"number"};var J=class extends g{constructor(){super(he.ApplicationCommandOptionType.Integer);i(this,"type",he.ApplicationCommandOptionType.Integer)}};var Ce=s(require("discord-api-types/v9"));var q=class extends d{constructor(){super(Ce.ApplicationCommandOptionType.Mentionable);i(this,"type",Ce.ApplicationCommandOptionType.Mentionable)}};var fe=s(require("discord-api-types/v9"));var V=class extends g{constructor(){super(fe.ApplicationCommandOptionType.Number);i(this,"type",fe.ApplicationCommandOptionType.Number)}};var be=s(require("discord-api-types/v9"));var W=class extends d{constructor(){super(be.ApplicationCommandOptionType.Role);i(this,"type",be.ApplicationCommandOptionType.Role)}};var xe=s(require("discord-api-types/v9"));var j=class extends g{constructor(){super(xe.ApplicationCommandOptionType.String);i(this,"type",xe.ApplicationCommandOptionType.String)}};var ye=s(require("discord-api-types/v9"));var z=class extends d{constructor(){super(ye.ApplicationCommandOptionType.User);i(this,"type",ye.ApplicationCommandOptionType.User)}};var w=class{constructor(){i(this,"options")}addBooleanOption(e){return this._sharedAddOptionMethod(e,G)}addUserOption(e){return this._sharedAddOptionMethod(e,z)}addChannelOption(e){return this._sharedAddOptionMethod(e,F)}addRoleOption(e){return this._sharedAddOptionMethod(e,W)}addMentionableOption(e){return this._sharedAddOptionMethod(e,q)}addStringOption(e){return this._sharedAddOptionMethod(e,j)}addIntegerOption(e){return this._sharedAddOptionMethod(e,J)}addNumberOption(e){return this._sharedAddOptionMethod(e,V)}_sharedAddOptionMethod(e,n){let{options:o}=this;C(o);let p=typeof e=="function"?e(new n):e;return y(p,n),o.push(p),this}};var Se=s(require("discord-api-types/v9")),ge=s(require("ts-mixer"));var O=class{constructor(){i(this,"name");i(this,"description");i(this,"options",[])}addSubcommand(e){let{options:n}=this;C(n);let o=typeof e=="function"?e(new f):e;return y(o,f),n.push(o),this}toJSON(){return x(this.name,this.description,this.options),{type:Se.ApplicationCommandOptionType.SubcommandGroup,name:this.name,description:this.description,options:this.options.map(e=>e.toJSON())}}};O=I([(0,ge.mix)(S)],O);var f=class{constructor(){i(this,"name");i(this,"description");i(this,"options",[])}toJSON(){return x(this.name,this.description,this.options),{type:Se.ApplicationCommandOptionType.Subcommand,name:this.name,description:this.description,options:this.options.map(e=>e.toJSON())}}};f=I([(0,ge.mix)(S,w)],f);var K=class{constructor(){i(this,"name");i(this,"description");i(this,"options",[]);i(this,"defaultPermission")}toJSON(){return x(this.name,this.description,this.options),{name:this.name,description:this.description,options:this.options.map(e=>e.toJSON()),default_permission:this.defaultPermission}}setDefaultPermission(e){return re(e),Reflect.set(this,"defaultPermission",e),this}addSubcommandGroup(e){let{options:n}=this;C(n);let o=typeof e=="function"?e(new O):e;return y(o,O),n.push(o),this}addSubcommand(e){let{options:n}=this;C(n);let o=typeof e=="function"?e(new f):e;return y(o,f),n.push(o),this}};K=I([(0,we.mix)(w,S)],K);var Te={};L(Te,{validateDefaultPermission:()=>Pe,validateName:()=>Q,validateRequiredParameters:()=>Ae,validateType:()=>H});var A=s(require("ow")),Oe=s(require("discord-api-types/v9"));function Ae(t,e){Q(t),H(e)}var pt=A.default.string.minLength(1).maxLength(32).matches(/^( *[\p{L}\p{N}_-]+ *)+$/u);function Q(t){(0,A.default)(t,"name",pt)}var dt=A.default.number.oneOf([Oe.ApplicationCommandType.User,Oe.ApplicationCommandType.Message]);function H(t){(0,A.default)(t,"type",dt)}var lt=A.default.boolean;function Pe(t){(0,A.default)(t,"default_permission",lt)}var Le=class{constructor(){i(this,"name");i(this,"type");i(this,"defaultPermission")}setName(e){return Q(e),Reflect.set(this,"name",e),this}setType(e){return H(e),Reflect.set(this,"type",e),this}setDefaultPermission(e){return Pe(e),Reflect.set(this,"defaultPermission",e),this}toJSON(){return Ae(this.name,this.type),{name:this.name,type:this.type,default_permission:this.defaultPermission}}};0&&(module.exports={ContextMenuCommandAssertions,ContextMenuCommandBuilder,Embed,EmbedAssertions,Faces,SlashCommandAssertions,SlashCommandBooleanOption,SlashCommandBuilder,SlashCommandChannelOption,SlashCommandIntegerOption,SlashCommandMentionableOption,SlashCommandNumberOption,SlashCommandRoleOption,SlashCommandStringOption,SlashCommandSubcommandBuilder,SlashCommandSubcommandGroupBuilder,SlashCommandUserOption,TimestampStyles,blockQuote,bold,channelMention,codeBlock,formatEmoji,hideLinkEmbed,hyperlink,inlineCode,italic,memberNicknameMention,quote,roleMention,spoiler,strikethrough,time,underscore,userMention}); -//# sourceMappingURL=index.js.map +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SlashCommandAssertions = exports.EmbedAssertions = void 0; +const tslib_1 = require("tslib"); +exports.EmbedAssertions = tslib_1.__importStar(require("./messages/embed/Assertions")); +tslib_1.__exportStar(require("./messages/embed/Embed"), exports); +tslib_1.__exportStar(require("./messages/formatters"), exports); +exports.SlashCommandAssertions = tslib_1.__importStar(require("./interactions/slashCommands/Assertions")); +tslib_1.__exportStar(require("./interactions/slashCommands/SlashCommandBuilder"), exports); +tslib_1.__exportStar(require("./interactions/slashCommands/SlashCommandSubcommands"), exports); +tslib_1.__exportStar(require("./interactions/slashCommands/options/boolean"), exports); +tslib_1.__exportStar(require("./interactions/slashCommands/options/channel"), exports); +tslib_1.__exportStar(require("./interactions/slashCommands/options/integer"), exports); +tslib_1.__exportStar(require("./interactions/slashCommands/options/mentionable"), exports); +tslib_1.__exportStar(require("./interactions/slashCommands/options/number"), exports); +tslib_1.__exportStar(require("./interactions/slashCommands/options/role"), exports); +tslib_1.__exportStar(require("./interactions/slashCommands/options/string"), exports); +tslib_1.__exportStar(require("./interactions/slashCommands/options/user"), exports); +//# 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 index 00cd8a6..eec9c2e 100644 --- a/node_modules/@discordjs/builders/dist/index.js.map +++ b/node_modules/@discordjs/builders/dist/index.js.map @@ -1,7 +1 @@ -{ - "version": 3, - "sources": ["../src/index.ts", "../src/messages/embed/Assertions.ts", "../src/messages/embed/Embed.ts", "../src/messages/formatters.ts", "../src/interactions/slashCommands/Assertions.ts", "../src/interactions/slashCommands/SlashCommandBuilder.ts", "../src/interactions/slashCommands/options/boolean.ts", "../src/interactions/slashCommands/mixins/CommandOptionBase.ts", "../src/interactions/slashCommands/mixins/NameAndDescription.ts", "../src/interactions/slashCommands/options/channel.ts", "../src/interactions/slashCommands/mixins/CommandChannelOptionBase.ts", "../src/interactions/slashCommands/options/integer.ts", "../src/interactions/slashCommands/mixins/CommandOptionWithChoices.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/CommandOptions.ts", "../src/interactions/slashCommands/SlashCommandSubcommands.ts", "../src/interactions/contextMenuCommands/Assertions.ts", "../src/interactions/contextMenuCommands/ContextMenuCommandBuilder.ts"], - "sourcesContent": ["export * as EmbedAssertions from './messages/embed/Assertions';\nexport * from './messages/embed/Embed';\nexport * from './messages/formatters';\n\nexport * as SlashCommandAssertions from './interactions/slashCommands/Assertions';\nexport * from './interactions/slashCommands/SlashCommandBuilder';\nexport * from './interactions/slashCommands/SlashCommandSubcommands';\nexport * from './interactions/slashCommands/options/boolean';\nexport * from './interactions/slashCommands/options/channel';\nexport * from './interactions/slashCommands/options/integer';\nexport * from './interactions/slashCommands/options/mentionable';\nexport * from './interactions/slashCommands/options/number';\nexport * from './interactions/slashCommands/options/role';\nexport * from './interactions/slashCommands/options/string';\nexport * from './interactions/slashCommands/options/user';\n\nexport * as ContextMenuCommandAssertions from './interactions/contextMenuCommands/Assertions';\nexport * from './interactions/contextMenuCommands/ContextMenuCommandBuilder';\n", "import type { APIEmbedField } from 'discord-api-types/v9';\nimport ow from 'ow';\n\nexport const fieldNamePredicate = ow.string.minLength(1).maxLength(256);\n\nexport const fieldValuePredicate = ow.string.minLength(1).maxLength(1024);\n\nexport const fieldInlinePredicate = ow.optional.boolean;\n\nexport const embedFieldPredicate = ow.object.exactShape({\n\tname: fieldNamePredicate,\n\tvalue: fieldValuePredicate,\n\tinline: fieldInlinePredicate,\n});\n\nexport const embedFieldsArrayPredicate = ow.array.ofType(embedFieldPredicate);\n\nexport function validateFieldLength(fields: APIEmbedField[], amountAdding: number): void {\n\tow(fields.length + amountAdding, 'field amount', ow.number.lessThanOrEqual(25));\n}\n\nexport const authorNamePredicate = ow.any(fieldNamePredicate, ow.null);\n\nexport const urlPredicate = ow.any(ow.string.url, ow.nullOrUndefined);\n\nexport const colorPredicate = ow.any(ow.number.greaterThanOrEqual(0).lessThanOrEqual(0xffffff), ow.null);\n\nexport const descriptionPredicate = ow.any(ow.string.minLength(1).maxLength(4096), ow.null);\n\nexport const footerTextPredicate = ow.any(ow.string.minLength(1).maxLength(2048), ow.null);\n\nexport const timestampPredicate = ow.any(ow.number, ow.date, ow.null);\n\nexport const titlePredicate = ow.any(fieldNamePredicate, ow.null);\n", "import type {\n\tAPIEmbed,\n\tAPIEmbedAuthor,\n\tAPIEmbedField,\n\tAPIEmbedFooter,\n\tAPIEmbedImage,\n\tAPIEmbedProvider,\n\tAPIEmbedThumbnail,\n\tAPIEmbedVideo,\n} from 'discord-api-types/v9';\nimport ow from 'ow';\nimport {\n\tauthorNamePredicate,\n\tcolorPredicate,\n\tdescriptionPredicate,\n\tembedFieldsArrayPredicate,\n\tfieldInlinePredicate,\n\tfieldNamePredicate,\n\tfieldValuePredicate,\n\tfooterTextPredicate,\n\ttimestampPredicate,\n\ttitlePredicate,\n\turlPredicate,\n\tvalidateFieldLength,\n} from './Assertions';\n\nexport interface AuthorOptions {\n\tname: string;\n\turl?: string;\n\ticonURL?: string;\n}\n\nexport interface FooterOptions {\n\ttext: string;\n\ticonURL?: string;\n}\n\n/**\n * Represents an embed in a message (image/video preview, rich embed, etc.)\n */\nexport class Embed implements APIEmbed {\n\t/**\n\t * An array of fields of this embed\n\t */\n\tpublic fields: APIEmbedField[];\n\n\t/**\n\t * The embed title\n\t */\n\tpublic title?: string;\n\n\t/**\n\t * The embed description\n\t */\n\tpublic description?: string;\n\n\t/**\n\t * The embed url\n\t */\n\tpublic url?: string;\n\n\t/**\n\t * The embed color\n\t */\n\tpublic color?: number;\n\n\t/**\n\t * The timestamp of the embed in the ISO format\n\t */\n\tpublic timestamp?: string;\n\n\t/**\n\t * The embed thumbnail data\n\t */\n\tpublic thumbnail?: APIEmbedThumbnail;\n\n\t/**\n\t * The embed image data\n\t */\n\tpublic image?: APIEmbedImage;\n\n\t/**\n\t * Received video data\n\t */\n\tpublic video?: APIEmbedVideo;\n\n\t/**\n\t * The embed author data\n\t */\n\tpublic author?: APIEmbedAuthor;\n\n\t/**\n\t * Received data about the embed provider\n\t */\n\tpublic provider?: APIEmbedProvider;\n\n\t/**\n\t * The embed footer data\n\t */\n\tpublic footer?: APIEmbedFooter;\n\n\tpublic constructor(data: APIEmbed = {}) {\n\t\tthis.title = data.title;\n\t\tthis.description = data.description;\n\t\tthis.url = data.url;\n\t\tthis.color = data.color;\n\t\tthis.thumbnail = data.thumbnail;\n\t\tthis.image = data.image;\n\t\tthis.video = data.video;\n\t\tthis.author = data.author;\n\t\tthis.provider = data.provider;\n\t\tthis.footer = data.footer;\n\t\tthis.fields = data.fields ?? [];\n\n\t\tif (data.timestamp) this.timestamp = new Date(data.timestamp).toISOString();\n\t}\n\n\t/**\n\t * The accumulated length for the embed title, description, fields, footer text, and author name\n\t */\n\tpublic get length(): number {\n\t\treturn (\n\t\t\t(this.title?.length ?? 0) +\n\t\t\t(this.description?.length ?? 0) +\n\t\t\tthis.fields.reduce((prev, curr) => prev + curr.name.length + curr.value.length, 0) +\n\t\t\t(this.footer?.text.length ?? 0) +\n\t\t\t(this.author?.name.length ?? 0)\n\t\t);\n\t}\n\n\t/**\n\t * Adds a field to the embed (max 25)\n\t *\n\t * @param field The field to add.\n\t */\n\tpublic addField(field: APIEmbedField): this {\n\t\treturn this.addFields(field);\n\t}\n\n\t/**\n\t * Adds fields to the embed (max 25)\n\t *\n\t * @param fields The fields to add\n\t */\n\tpublic addFields(...fields: APIEmbedField[]): this {\n\t\t// Data assertions\n\t\tow(fields, 'fields', embedFieldsArrayPredicate);\n\n\t\t// Ensure adding these fields won't exceed the 25 field limit\n\t\tvalidateFieldLength(this.fields, fields.length);\n\n\t\tthis.fields.push(...Embed.normalizeFields(...fields));\n\t\treturn this;\n\t}\n\n\t/**\n\t * Removes, replaces, or inserts fields in the embed (max 25)\n\t *\n\t * @param index The index to start at\n\t * @param deleteCount The number of fields to remove\n\t * @param fields The replacing field objects\n\t */\n\tpublic spliceFields(index: number, deleteCount: number, ...fields: APIEmbedField[]): this {\n\t\t// Data assertions\n\t\tow(fields, 'fields', embedFieldsArrayPredicate);\n\n\t\t// Ensure adding these fields won't exceed the 25 field limit\n\t\tvalidateFieldLength(this.fields, fields.length - deleteCount);\n\n\t\tthis.fields.splice(index, deleteCount, ...Embed.normalizeFields(...fields));\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the author of this embed\n\t *\n\t * @param options The options for the author\n\t */\n\tpublic setAuthor(options: AuthorOptions | null): this {\n\t\tif (options === null) {\n\t\t\tthis.author = undefined;\n\t\t\treturn this;\n\t\t}\n\n\t\tconst { name, iconURL, url } = options;\n\t\t// Data assertions\n\t\tow(name, 'name', authorNamePredicate);\n\t\tow(iconURL, 'iconURL', urlPredicate);\n\t\tow(url, 'url', urlPredicate);\n\n\t\tthis.author = { name, url, icon_url: iconURL };\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the color of this embed\n\t *\n\t * @param color The color of the embed\n\t */\n\tpublic setColor(color: number | null): this {\n\t\t// Data assertions\n\t\tow(color, 'color', colorPredicate);\n\n\t\tthis.color = color ?? undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the description of this embed\n\t *\n\t * @param description The description\n\t */\n\tpublic setDescription(description: string | null): this {\n\t\t// Data assertions\n\t\tow(description, 'description', descriptionPredicate);\n\n\t\tthis.description = description ?? undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the footer of this embed\n\t *\n\t * @param options The options for the footer\n\t */\n\tpublic setFooter(options: FooterOptions | null): this {\n\t\tif (options === null) {\n\t\t\tthis.footer = undefined;\n\t\t\treturn this;\n\t\t}\n\n\t\tconst { text, iconURL } = options;\n\t\t// Data assertions\n\t\tow(text, 'text', footerTextPredicate);\n\t\tow(iconURL, 'iconURL', urlPredicate);\n\n\t\tthis.footer = { text, icon_url: iconURL };\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the image of this embed\n\t *\n\t * @param url The URL of the image\n\t */\n\tpublic setImage(url: string | null): this {\n\t\t// Data assertions\n\t\tow(url, 'url', urlPredicate);\n\n\t\tthis.image = url ? { url } : undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the thumbnail of this embed\n\t *\n\t * @param url The URL of the thumbnail\n\t */\n\tpublic setThumbnail(url: string | null): this {\n\t\t// Data assertions\n\t\tow(url, 'url', urlPredicate);\n\n\t\tthis.thumbnail = url ? { url } : undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the timestamp of this embed\n\t *\n\t * @param timestamp The timestamp or date\n\t */\n\tpublic setTimestamp(timestamp: number | Date | null = Date.now()): this {\n\t\t// Data assertions\n\t\tow(timestamp, 'timestamp', timestampPredicate);\n\n\t\tthis.timestamp = timestamp ? new Date(timestamp).toISOString() : undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the title of this embed\n\t *\n\t * @param title The title\n\t */\n\tpublic setTitle(title: string | null): this {\n\t\t// Data assertions\n\t\tow(title, 'title', titlePredicate);\n\n\t\tthis.title = title ?? undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the URL of this embed\n\t *\n\t * @param url The URL\n\t */\n\tpublic setURL(url: string | null): this {\n\t\t// Data assertions\n\t\tow(url, 'url', urlPredicate);\n\n\t\tthis.url = url ?? undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Transforms the embed to a plain object\n\t */\n\tpublic toJSON(): APIEmbed {\n\t\treturn { ...this };\n\t}\n\n\t/**\n\t * Normalizes field input and resolves strings\n\t *\n\t * @param fields Fields to normalize\n\t */\n\tpublic static normalizeFields(...fields: APIEmbedField[]): APIEmbedField[] {\n\t\treturn fields.flat(Infinity).map((field) => {\n\t\t\tow(field.name, 'field name', fieldNamePredicate);\n\t\t\tow(field.value, 'field value', fieldValuePredicate);\n\t\t\tow(field.inline, 'field inline', fieldInlinePredicate);\n\n\t\t\treturn { name: field.name, value: field.value, inline: field.inline ?? undefined };\n\t\t});\n\t}\n}\n", "import type { Snowflake } from 'discord-api-types/globals';\nimport type { URL } from 'url';\n\n/**\n * Wraps the content inside a codeblock with no language\n *\n * @param content The content to wrap\n */\nexport function codeBlock(content: C): `\\`\\`\\`\\n${C}\\`\\`\\``;\n\n/**\n * Wraps the content inside a codeblock with the specified language\n *\n * @param language The language for the codeblock\n * @param content The content to wrap\n */\nexport function codeBlock(language: L, content: C): `\\`\\`\\`${L}\\n${C}\\`\\`\\``;\nexport function codeBlock(language: string, content?: string): string {\n\treturn typeof content === 'undefined' ? `\\`\\`\\`\\n${language}\\`\\`\\`` : `\\`\\`\\`${language}\\n${content}\\`\\`\\``;\n}\n\n/**\n * Wraps the content inside \\`backticks\\`, which formats it as inline code\n *\n * @param content The content to wrap\n */\nexport function inlineCode(content: C): `\\`${C}\\`` {\n\treturn `\\`${content}\\``;\n}\n\n/**\n * Formats the content into italic text\n *\n * @param content The content to wrap\n */\nexport function italic(content: C): `_${C}_` {\n\treturn `_${content}_`;\n}\n\n/**\n * Formats the content into bold text\n *\n * @param content The content to wrap\n */\nexport function bold(content: C): `**${C}**` {\n\treturn `**${content}**`;\n}\n\n/**\n * Formats the content into underscored text\n *\n * @param content The content to wrap\n */\nexport function underscore(content: C): `__${C}__` {\n\treturn `__${content}__`;\n}\n\n/**\n * Formats the content into strike-through text\n *\n * @param content The content to wrap\n */\nexport function strikethrough(content: C): `~~${C}~~` {\n\treturn `~~${content}~~`;\n}\n\n/**\n * Formats the content into a quote. This needs to be at the start of the line for Discord to format it\n *\n * @param content The content to wrap\n */\nexport function quote(content: C): `> ${C}` {\n\treturn `> ${content}`;\n}\n\n/**\n * Formats the content into a block quote. This needs to be at the start of the line for Discord to format it\n *\n * @param content The content to wrap\n */\nexport function blockQuote(content: C): `>>> ${C}` {\n\treturn `>>> ${content}`;\n}\n\n/**\n * Wraps the URL into `<>`, which stops it from embedding\n *\n * @param url The URL to wrap\n */\nexport function hideLinkEmbed(url: C): `<${C}>`;\n\n/**\n * Wraps the URL into `<>`, which stops it from embedding\n *\n * @param url The URL to wrap\n */\nexport function hideLinkEmbed(url: URL): `<${string}>`;\nexport function hideLinkEmbed(url: string | URL) {\n\t// eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n\treturn `<${url}>`;\n}\n\n/**\n * Formats the content and the URL into a masked URL\n *\n * @param content The content to display\n * @param url The URL the content links to\n */\nexport function hyperlink(content: C, url: URL): `[${C}](${string})`;\n\n/**\n * Formats the content and the URL into a masked URL\n *\n * @param content The content to display\n * @param url The URL the content links to\n */\nexport function hyperlink(content: C, url: U): `[${C}](${U})`;\n\n/**\n * Formats the content and the URL into a masked URL\n *\n * @param content The content to display\n * @param url The URL the content links to\n * @param title The title shown when hovering on the masked link\n */\nexport function hyperlink(\n\tcontent: C,\n\turl: URL,\n\ttitle: T,\n): `[${C}](${string} \"${T}\")`;\n\n/**\n * Formats the content and the URL into a masked URL\n *\n * @param content The content to display\n * @param url The URL the content links to\n * @param title The title shown when hovering on the masked link\n */\nexport function hyperlink(\n\tcontent: C,\n\turl: U,\n\ttitle: T,\n): `[${C}](${U} \"${T}\")`;\nexport function hyperlink(content: string, url: string | URL, title?: string) {\n\t// eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n\treturn title ? `[${content}](${url} \"${title}\")` : `[${content}](${url})`;\n}\n\n/**\n * Wraps the content inside spoiler (hidden text)\n *\n * @param content The content to wrap\n */\nexport function spoiler(content: C): `||${C}||` {\n\treturn `||${content}||`;\n}\n\n/**\n * Formats a user ID into a user mention\n *\n * @param userId The user ID to format\n */\nexport function userMention(userId: C): `<@${C}>` {\n\treturn `<@${userId}>`;\n}\n\n/**\n * Formats a user ID into a member-nickname mention\n *\n * @param memberId The user ID to format\n */\nexport function memberNicknameMention(memberId: C): `<@!${C}>` {\n\treturn `<@!${memberId}>`;\n}\n\n/**\n * Formats a channel ID into a channel mention\n *\n * @param channelId The channel ID to format\n */\nexport function channelMention(channelId: C): `<#${C}>` {\n\treturn `<#${channelId}>`;\n}\n\n/**\n * Formats a role ID into a role mention\n *\n * @param roleId The role ID to format\n */\nexport function roleMention(roleId: C): `<@&${C}>` {\n\treturn `<@&${roleId}>`;\n}\n\n/**\n * Formats an emoji ID into a fully qualified emoji identifier\n *\n * @param emojiId The emoji ID to format\n */\nexport function formatEmoji(emojiId: C, animated?: false): `<:_:${C}>`;\n\n/**\n * Formats an emoji ID into a fully qualified emoji identifier\n *\n * @param emojiId The emoji ID to format\n * @param animated Whether the emoji is animated or not. Defaults to `false`\n */\nexport function formatEmoji(emojiId: C, animated?: true): ``;\n\n/**\n * Formats an emoji ID into a fully qualified emoji identifier\n *\n * @param emojiId The emoji ID to format\n * @param animated Whether the emoji is animated or not. Defaults to `false`\n */\nexport function formatEmoji(emojiId: C, animated = false): `` | `<:_:${C}>` {\n\treturn `<${animated ? 'a' : ''}:_:${emojiId}>`;\n}\n\n/**\n * Formats a date into a short date-time string\n *\n * @param date The date to format, defaults to the current time\n */\nexport function time(date?: Date): ``;\n\n/**\n * Formats a date given a format style\n *\n * @param date The date to format\n * @param style The style to use\n */\nexport function time(date: Date, style: S): ``;\n\n/**\n * Formats the given timestamp into a short date-time string\n *\n * @param seconds The time to format, represents an UNIX timestamp in seconds\n */\nexport function time(seconds: C): ``;\n\n/**\n * Formats the given timestamp into a short date-time string\n *\n * @param seconds The time to format, represents an UNIX timestamp in seconds\n * @param style The style to use\n */\nexport function time(seconds: C, style: S): ``;\nexport function time(timeOrSeconds?: number | Date, style?: TimestampStylesString): string {\n\tif (typeof timeOrSeconds !== 'number') {\n\t\ttimeOrSeconds = Math.floor((timeOrSeconds?.getTime() ?? Date.now()) / 1000);\n\t}\n\n\treturn typeof style === 'string' ? `` : ``;\n}\n\n/**\n * The [message formatting timestamp styles](https://discord.com/developers/docs/reference#message-formatting-timestamp-styles) supported by Discord\n */\nexport const TimestampStyles = {\n\t/**\n\t * Short time format, consisting of hours and minutes, e.g. 16:20\n\t */\n\tShortTime: 't',\n\n\t/**\n\t * Long time format, consisting of hours, minutes, and seconds, e.g. 16:20:30\n\t */\n\tLongTime: 'T',\n\n\t/**\n\t * Short date format, consisting of day, month, and year, e.g. 20/04/2021\n\t */\n\tShortDate: 'd',\n\n\t/**\n\t * Long date format, consisting of day, month, and year, e.g. 20 April 2021\n\t */\n\tLongDate: 'D',\n\n\t/**\n\t * Short date-time format, consisting of short date and short time formats, e.g. 20 April 2021 16:20\n\t */\n\tShortDateTime: 'f',\n\n\t/**\n\t * Long date-time format, consisting of long date and short time formats, e.g. Tuesday, 20 April 2021 16:20\n\t */\n\tLongDateTime: 'F',\n\n\t/**\n\t * Relative time format, consisting of a relative duration format, e.g. 2 months ago\n\t */\n\tRelativeTime: 'R',\n} as const;\n\n/**\n * The possible values, see {@link TimestampStyles} for more information\n */\nexport type TimestampStylesString = typeof TimestampStyles[keyof typeof TimestampStyles];\n\n/**\n * An enum with all the available faces from Discord's native slash commands\n */\nexport enum Faces {\n\t/**\n\t * \u00AF\\\\_(\u30C4)\\\\_/\u00AF\n\t */\n\tShrug = '\u00AF\\\\_(\u30C4)\\\\_/\u00AF',\n\n\t/**\n\t * (\u256F\u00B0\u25A1\u00B0\uFF09\u256F\uFE35 \u253B\u2501\u253B\n\t */\n\tTableflip = '(\u256F\u00B0\u25A1\u00B0\uFF09\u256F\uFE35 \u253B\u2501\u253B',\n\n\t/**\n\t * \u252C\u2500\u252C \u30CE( \u309C-\u309C\u30CE)\n\t */\n\tUnflip = '\u252C\u2500\u252C \u30CE( \u309C-\u309C\u30CE)',\n}\n", "import is from '@sindresorhus/is';\nimport type { APIApplicationCommandOptionChoice } from 'discord-api-types/v9';\nimport ow from 'ow';\nimport type { SlashCommandOptionBase } from './mixins/CommandOptionBase';\nimport type { ToAPIApplicationCommandOptions } from './SlashCommandBuilder';\nimport type { SlashCommandSubcommandBuilder, SlashCommandSubcommandGroupBuilder } from './SlashCommandSubcommands';\n\nexport function validateRequiredParameters(\n\tname: string,\n\tdescription: string,\n\toptions: ToAPIApplicationCommandOptions[],\n) {\n\t// Assert name matches all conditions\n\tvalidateName(name);\n\n\t// Assert description conditions\n\tvalidateDescription(description);\n\n\t// Assert options conditions\n\tvalidateMaxOptionsLength(options);\n}\n\nconst namePredicate = ow.string.lowercase\n\t.minLength(1)\n\t.maxLength(32)\n\t.addValidator({\n\t\tmessage: (value, label) => `Expected ${label!} to match \"^[\\\\p{L}\\\\p{N}_-]+$\", got ${value} instead`,\n\t\tvalidator: (value) => /^[\\p{L}\\p{N}_-]+$/u.test(value),\n\t});\n\nexport function validateName(name: unknown): asserts name is string {\n\tow(name, 'name', namePredicate);\n}\n\nconst descriptionPredicate = ow.string.minLength(1).maxLength(100);\n\nexport function validateDescription(description: unknown): asserts description is string {\n\tow(description, 'description', descriptionPredicate);\n}\n\nconst defaultPermissionPredicate = ow.boolean;\n\nexport function validateDefaultPermission(value: unknown): asserts value is boolean {\n\tow(value, 'default_permission', defaultPermissionPredicate);\n}\n\nconst maxArrayLengthPredicate = ow.array.maxLength(25);\n\nexport function validateMaxOptionsLength(options: unknown): asserts options is ToAPIApplicationCommandOptions[] {\n\tow(options, 'options', maxArrayLengthPredicate);\n}\n\nexport function validateMaxChoicesLength(choices: APIApplicationCommandOptionChoice[]) {\n\tow(choices, 'choices', maxArrayLengthPredicate);\n}\n\nexport function assertReturnOfBuilder<\n\tT extends SlashCommandOptionBase | SlashCommandSubcommandBuilder | SlashCommandSubcommandGroupBuilder,\n>(input: unknown, ExpectedInstanceOf: new () => T): asserts input is T {\n\tconst instanceName = ExpectedInstanceOf.name;\n\n\tif (is.nullOrUndefined(input)) {\n\t\tthrow new TypeError(\n\t\t\t`Expected to receive a ${instanceName} builder, got ${input === null ? 'null' : 'undefined'} instead.`,\n\t\t);\n\t}\n\n\tif (is.primitive(input)) {\n\t\tthrow new TypeError(`Expected to receive a ${instanceName} builder, got a primitive (${typeof input}) instead.`);\n\t}\n\n\tif (!(input instanceof ExpectedInstanceOf)) {\n\t\tconst casted = input as Record;\n\n\t\tconst constructorName = is.function_(input) ? input.name : casted.constructor.name;\n\t\tconst stringTag = Reflect.get(casted, Symbol.toStringTag) as string | undefined;\n\n\t\tconst fullResultName = stringTag ? `${constructorName} [${stringTag}]` : constructorName;\n\n\t\tthrow new TypeError(`Expected to receive a ${instanceName} builder, got ${fullResultName} instead.`);\n\t}\n}\n", "import type { APIApplicationCommandOption, RESTPostAPIApplicationCommandsJSONBody } from 'discord-api-types/v9';\nimport { mix } from 'ts-mixer';\nimport {\n\tassertReturnOfBuilder,\n\tvalidateDefaultPermission,\n\tvalidateMaxOptionsLength,\n\tvalidateRequiredParameters,\n} from './Assertions';\nimport { SharedSlashCommandOptions } from './mixins/CommandOptions';\nimport { SharedNameAndDescription } from './mixins/NameAndDescription';\nimport { SlashCommandSubcommandBuilder, SlashCommandSubcommandGroupBuilder } from './SlashCommandSubcommands';\n\n@mix(SharedSlashCommandOptions, SharedNameAndDescription)\nexport class SlashCommandBuilder {\n\t/**\n\t * The name of this slash command\n\t */\n\tpublic readonly name: string = undefined!;\n\n\t/**\n\t * The description of this slash command\n\t */\n\tpublic readonly description: string = undefined!;\n\n\t/**\n\t * The options of this slash command\n\t */\n\tpublic readonly options: ToAPIApplicationCommandOptions[] = [];\n\n\t/**\n\t * Whether the command is enabled by default when the app is added to a guild\n\t *\n\t * @default true\n\t */\n\tpublic readonly defaultPermission: boolean | undefined = undefined;\n\n\t/**\n\t * Returns the final data that should be sent to Discord.\n\t *\n\t * **Note:** Calling this function will validate required properties based on their conditions.\n\t */\n\tpublic toJSON(): RESTPostAPIApplicationCommandsJSONBody {\n\t\tvalidateRequiredParameters(this.name, this.description, this.options);\n\t\treturn {\n\t\t\tname: this.name,\n\t\t\tdescription: this.description,\n\t\t\toptions: this.options.map((option) => option.toJSON()),\n\t\t\tdefault_permission: this.defaultPermission,\n\t\t};\n\t}\n\n\t/**\n\t * Sets whether the command is enabled by default when the application is added to a guild.\n\t *\n\t * **Note**: If set to `false`, you will have to later `PUT` the permissions for this command.\n\t *\n\t * @param value Whether or not to enable this command by default\n\t *\n\t * @see https://discord.com/developers/docs/interactions/application-commands#permissions\n\t */\n\tpublic setDefaultPermission(value: boolean) {\n\t\t// Assert the value matches the conditions\n\t\tvalidateDefaultPermission(value);\n\n\t\tReflect.set(this, 'defaultPermission', value);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Adds a new subcommand group to this command\n\t *\n\t * @param input A function that returns a subcommand group builder, or an already built builder\n\t */\n\tpublic addSubcommandGroup(\n\t\tinput:\n\t\t\t| SlashCommandSubcommandGroupBuilder\n\t\t\t| ((subcommandGroup: SlashCommandSubcommandGroupBuilder) => SlashCommandSubcommandGroupBuilder),\n\t): SlashCommandSubcommandsOnlyBuilder {\n\t\tconst { options } = this;\n\n\t\t// First, assert options conditions - we cannot have more than 25 options\n\t\tvalidateMaxOptionsLength(options);\n\n\t\t// Get the final result\n\t\tconst result = typeof input === 'function' ? input(new SlashCommandSubcommandGroupBuilder()) : input;\n\n\t\tassertReturnOfBuilder(result, SlashCommandSubcommandGroupBuilder);\n\n\t\t// Push it\n\t\toptions.push(result);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Adds a new subcommand to this command\n\t *\n\t * @param input A function that returns a subcommand builder, or an already built builder\n\t */\n\tpublic addSubcommand(\n\t\tinput:\n\t\t\t| SlashCommandSubcommandBuilder\n\t\t\t| ((subcommandGroup: SlashCommandSubcommandBuilder) => SlashCommandSubcommandBuilder),\n\t): SlashCommandSubcommandsOnlyBuilder {\n\t\tconst { options } = this;\n\n\t\t// First, assert options conditions - we cannot have more than 25 options\n\t\tvalidateMaxOptionsLength(options);\n\n\t\t// Get the final result\n\t\tconst result = typeof input === 'function' ? input(new SlashCommandSubcommandBuilder()) : input;\n\n\t\tassertReturnOfBuilder(result, SlashCommandSubcommandBuilder);\n\n\t\t// Push it\n\t\toptions.push(result);\n\n\t\treturn this;\n\t}\n}\n\nexport interface SlashCommandBuilder extends SharedNameAndDescription, SharedSlashCommandOptions {}\n\nexport interface SlashCommandSubcommandsOnlyBuilder\n\textends SharedNameAndDescription,\n\t\tPick {}\n\nexport interface SlashCommandOptionsOnlyBuilder\n\textends SharedNameAndDescription,\n\t\tSharedSlashCommandOptions,\n\t\tPick {}\n\nexport interface ToAPIApplicationCommandOptions {\n\ttoJSON(): APIApplicationCommandOption;\n}\n", "import { ApplicationCommandOptionType } from 'discord-api-types/v9';\nimport { SlashCommandOptionBase } from '../mixins/CommandOptionBase';\n\nexport class SlashCommandBooleanOption extends SlashCommandOptionBase {\n\tpublic override readonly type = ApplicationCommandOptionType.Boolean as const;\n\n\tpublic constructor() {\n\t\tsuper(ApplicationCommandOptionType.Boolean);\n\t}\n}\n", "import type { APIApplicationCommandOption, ApplicationCommandOptionType } from 'discord-api-types/v9';\nimport ow from 'ow';\nimport { validateRequiredParameters } from '../Assertions';\nimport type { ToAPIApplicationCommandOptions } from '../SlashCommandBuilder';\nimport { SharedNameAndDescription } from './NameAndDescription';\n\nexport class SlashCommandOptionBase extends SharedNameAndDescription implements ToAPIApplicationCommandOptions {\n\tpublic required = false;\n\tpublic readonly type: ApplicationCommandOptionType;\n\n\tpublic constructor(type: ApplicationCommandOptionType) {\n\t\tsuper();\n\t\tthis.type = type;\n\t}\n\n\t/**\n\t * Marks the option as required\n\t *\n\t * @param required If this option should be required\n\t */\n\tpublic setRequired(required: boolean) {\n\t\t// Assert that you actually passed a boolean\n\t\tow(required, 'required', ow.boolean);\n\n\t\tthis.required = required;\n\n\t\treturn this;\n\t}\n\n\tpublic toJSON(): APIApplicationCommandOption {\n\t\tvalidateRequiredParameters(this.name, this.description, []);\n\n\t\t// Assert that you actually passed a boolean\n\t\tow(this.required, 'required', ow.boolean);\n\n\t\treturn {\n\t\t\ttype: this.type,\n\t\t\tname: this.name,\n\t\t\tdescription: this.description,\n\t\t\trequired: this.required,\n\t\t};\n\t}\n}\n", "import { validateDescription, validateName } from '../Assertions';\n\nexport class SharedNameAndDescription {\n\tpublic readonly name!: string;\n\tpublic readonly description!: string;\n\n\t/**\n\t * Sets the name\n\t *\n\t * @param name The name\n\t */\n\tpublic setName(name: string) {\n\t\t// Assert the name matches the conditions\n\t\tvalidateName(name);\n\n\t\tReflect.set(this, 'name', name);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the description\n\t *\n\t * @param description The description\n\t */\n\tpublic setDescription(description: string) {\n\t\t// Assert the description matches the conditions\n\t\tvalidateDescription(description);\n\n\t\tReflect.set(this, 'description', description);\n\n\t\treturn this;\n\t}\n}\n", "import { ApplicationCommandOptionType } from 'discord-api-types/v9';\nimport { ApplicationCommandOptionWithChannelTypesBase } from '../mixins/CommandChannelOptionBase';\n\nexport class SlashCommandChannelOption extends ApplicationCommandOptionWithChannelTypesBase {\n\tpublic override readonly type = ApplicationCommandOptionType.Channel as const;\n\n\tpublic constructor() {\n\t\tsuper(ApplicationCommandOptionType.Channel);\n\t}\n}\n", "import { APIApplicationCommandChannelOptions, ApplicationCommandOptionType, ChannelType } from 'discord-api-types/v9';\nimport ow from 'ow';\nimport type { ToAPIApplicationCommandOptions } from '../../..';\nimport { SlashCommandOptionBase } from './CommandOptionBase';\n\n// Only allow valid channel types to be used. (This can't be dynamic because const enums are erased at runtime)\nconst allowedChannelTypes = [\n\tChannelType.GuildCategory,\n\tChannelType.GuildNews,\n\tChannelType.GuildNewsThread,\n\tChannelType.GuildStore,\n\tChannelType.GuildStageVoice,\n\tChannelType.GuildText,\n\tChannelType.GuildVoice,\n\tChannelType.GuildPublicThread,\n\tChannelType.GuildPrivateThread,\n];\n\nconst channelTypePredicate = ow.number.oneOf(allowedChannelTypes);\n\nexport abstract class ApplicationCommandOptionWithChannelTypesBase\n\textends SlashCommandOptionBase\n\timplements ToAPIApplicationCommandOptions\n{\n\tpublic channelTypes?: Exclude[];\n\n\t/**\n\t * Adds a channel type to this option\n\t *\n\t * @param channelType The type of channel to allow\n\t */\n\tpublic addChannelType(channelType: Exclude) {\n\t\tthis.channelTypes ??= [];\n\n\t\tow(channelType, 'channel type', channelTypePredicate);\n\t\tthis.channelTypes.push(channelType);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Adds channel types to this option\n\t *\n\t * @param channelTypes The channel types to add\n\t */\n\tpublic addChannelTypes(channelTypes: Exclude[]) {\n\t\tchannelTypes.forEach((channelType) => this.addChannelType(channelType));\n\t\treturn this;\n\t}\n\n\tpublic override toJSON(): APIApplicationCommandChannelOptions {\n\t\treturn {\n\t\t\t...super.toJSON(),\n\t\t\ttype: ApplicationCommandOptionType.Channel,\n\t\t\tchannel_types: this.channelTypes,\n\t\t};\n\t}\n}\n", "import { ApplicationCommandOptionType } from 'discord-api-types/v9';\nimport { ApplicationCommandOptionWithChoicesBase } from '../mixins/CommandOptionWithChoices';\n\nexport class SlashCommandIntegerOption extends ApplicationCommandOptionWithChoicesBase {\n\tpublic override readonly type = ApplicationCommandOptionType.Integer as const;\n\n\tpublic constructor() {\n\t\tsuper(ApplicationCommandOptionType.Integer);\n\t}\n}\n", "import { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from 'discord-api-types/v9';\nimport ow, { Predicate } from 'ow';\nimport { validateMaxChoicesLength } from '../Assertions';\nimport type { ToAPIApplicationCommandOptions } from '../SlashCommandBuilder';\nimport { SlashCommandOptionBase } from './CommandOptionBase';\n\nconst stringPredicate = ow.string.minLength(1).maxLength(100);\nconst integerPredicate = ow.number.finite;\n\n// TODO: See resolution for sindresorhus/ow#217 in relation to this cast\nconst choicesPredicate = ow.array.ofType<[string, string | number]>(\n\tow.array.exactShape([stringPredicate, ow.any(ow.string, integerPredicate) as unknown as Predicate]),\n);\n\nexport abstract class ApplicationCommandOptionWithChoicesBase\n\textends SlashCommandOptionBase\n\timplements ToAPIApplicationCommandOptions\n{\n\tpublic choices?: APIApplicationCommandOptionChoice[];\n\n\t/**\n\t * Adds a choice for this option\n\t *\n\t * @param name The name of the choice\n\t * @param value The value of the choice\n\t */\n\tpublic addChoice(name: string, value: T) {\n\t\tthis.choices ??= [];\n\n\t\tvalidateMaxChoicesLength(this.choices);\n\n\t\t// Validate name\n\t\tow(name, `${ApplicationCommandOptionTypeNames[this.type]} choice name`, stringPredicate);\n\n\t\t// Validate the value\n\t\tif (this.type === ApplicationCommandOptionType.String) ow(value, 'string choice value', stringPredicate);\n\t\telse ow(value, `${ApplicationCommandOptionTypeNames[this.type]} choice value`, integerPredicate);\n\n\t\tthis.choices.push({ name, value });\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Adds multiple choices for this option\n\t *\n\t * @param choices The choices to add\n\t */\n\tpublic addChoices(choices: [name: string, value: T][]) {\n\t\tow(choices, `${ApplicationCommandOptionTypeNames[this.type]} choices`, choicesPredicate);\n\n\t\tfor (const [label, value] of choices) this.addChoice(label, value);\n\t\treturn this;\n\t}\n\n\tpublic override toJSON() {\n\t\treturn {\n\t\t\t...super.toJSON(),\n\t\t\tchoices: this.choices,\n\t\t};\n\t}\n}\n\nconst ApplicationCommandOptionTypeNames = {\n\t[ApplicationCommandOptionType.Subcommand]: 'subcommand',\n\t[ApplicationCommandOptionType.SubcommandGroup]: 'subcommand group',\n\t[ApplicationCommandOptionType.String]: 'string',\n\t[ApplicationCommandOptionType.Integer]: 'integer',\n\t[ApplicationCommandOptionType.Boolean]: 'boolean',\n\t[ApplicationCommandOptionType.User]: 'user',\n\t[ApplicationCommandOptionType.Channel]: 'channel',\n\t[ApplicationCommandOptionType.Role]: 'role',\n\t[ApplicationCommandOptionType.Mentionable]: 'mentionable',\n\t[ApplicationCommandOptionType.Number]: 'number',\n} as const;\n", "import { ApplicationCommandOptionType } from 'discord-api-types/v9';\nimport { SlashCommandOptionBase } from '../mixins/CommandOptionBase';\n\nexport class SlashCommandMentionableOption extends SlashCommandOptionBase {\n\tpublic override readonly type = ApplicationCommandOptionType.Mentionable as const;\n\n\tpublic constructor() {\n\t\tsuper(ApplicationCommandOptionType.Mentionable);\n\t}\n}\n", "import { ApplicationCommandOptionType } from 'discord-api-types/v9';\nimport { ApplicationCommandOptionWithChoicesBase } from '../mixins/CommandOptionWithChoices';\n\nexport class SlashCommandNumberOption extends ApplicationCommandOptionWithChoicesBase {\n\tpublic override readonly type = ApplicationCommandOptionType.Number as const;\n\n\tpublic constructor() {\n\t\tsuper(ApplicationCommandOptionType.Number);\n\t}\n}\n", "import { ApplicationCommandOptionType } from 'discord-api-types/v9';\nimport { SlashCommandOptionBase } from '../mixins/CommandOptionBase';\n\nexport class SlashCommandRoleOption extends SlashCommandOptionBase {\n\tpublic override readonly type = ApplicationCommandOptionType.Role as const;\n\n\tpublic constructor() {\n\t\tsuper(ApplicationCommandOptionType.Role);\n\t}\n}\n", "import { ApplicationCommandOptionType } from 'discord-api-types/v9';\nimport { ApplicationCommandOptionWithChoicesBase } from '../mixins/CommandOptionWithChoices';\n\nexport class SlashCommandStringOption extends ApplicationCommandOptionWithChoicesBase {\n\tpublic override readonly type = ApplicationCommandOptionType.String as const;\n\n\tpublic constructor() {\n\t\tsuper(ApplicationCommandOptionType.String);\n\t}\n}\n", "import { ApplicationCommandOptionType } from 'discord-api-types/v9';\nimport { SlashCommandOptionBase } from '../mixins/CommandOptionBase';\n\nexport class SlashCommandUserOption extends SlashCommandOptionBase {\n\tpublic override readonly type = ApplicationCommandOptionType.User as const;\n\n\tpublic constructor() {\n\t\tsuper(ApplicationCommandOptionType.User);\n\t}\n}\n", "import { assertReturnOfBuilder, validateMaxOptionsLength } from '../Assertions';\nimport type { SlashCommandOptionBase } from './CommandOptionBase';\nimport { SlashCommandBooleanOption } from '../options/boolean';\nimport { SlashCommandChannelOption } from '../options/channel';\nimport { SlashCommandIntegerOption } from '../options/integer';\nimport { SlashCommandMentionableOption } from '../options/mentionable';\nimport { SlashCommandNumberOption } from '../options/number';\nimport { SlashCommandRoleOption } from '../options/role';\nimport { SlashCommandStringOption } from '../options/string';\nimport { SlashCommandUserOption } from '../options/user';\nimport type { ToAPIApplicationCommandOptions } from '../SlashCommandBuilder';\n\nexport class SharedSlashCommandOptions {\n\tpublic readonly options!: ToAPIApplicationCommandOptions[];\n\n\t/**\n\t * Adds a boolean option\n\t *\n\t * @param input A function that returns an option builder, or an already built builder\n\t */\n\tpublic addBooleanOption(\n\t\tinput: SlashCommandBooleanOption | ((builder: SlashCommandBooleanOption) => SlashCommandBooleanOption),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandBooleanOption);\n\t}\n\n\t/**\n\t * Adds a user option\n\t *\n\t * @param input A function that returns an option builder, or an already built builder\n\t */\n\tpublic addUserOption(input: SlashCommandUserOption | ((builder: SlashCommandUserOption) => SlashCommandUserOption)) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandUserOption);\n\t}\n\n\t/**\n\t * Adds a channel option\n\t *\n\t * @param input A function that returns an option builder, or an already built builder\n\t */\n\tpublic addChannelOption(\n\t\tinput: SlashCommandChannelOption | ((builder: SlashCommandChannelOption) => SlashCommandChannelOption),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandChannelOption);\n\t}\n\n\t/**\n\t * Adds a role option\n\t *\n\t * @param input A function that returns an option builder, or an already built builder\n\t */\n\tpublic addRoleOption(input: SlashCommandRoleOption | ((builder: SlashCommandRoleOption) => SlashCommandRoleOption)) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandRoleOption);\n\t}\n\n\t/**\n\t * Adds a mentionable option\n\t *\n\t * @param input A function that returns an option builder, or an already built builder\n\t */\n\tpublic addMentionableOption(\n\t\tinput: SlashCommandMentionableOption | ((builder: SlashCommandMentionableOption) => SlashCommandMentionableOption),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandMentionableOption);\n\t}\n\n\t/**\n\t * Adds a string option\n\t *\n\t * @param input A function that returns an option builder, or an already built builder\n\t */\n\tpublic addStringOption(\n\t\tinput: SlashCommandStringOption | ((builder: SlashCommandStringOption) => SlashCommandStringOption),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandStringOption);\n\t}\n\n\t/**\n\t * Adds an integer option\n\t *\n\t * @param input A function that returns an option builder, or an already built builder\n\t */\n\tpublic addIntegerOption(\n\t\tinput: SlashCommandIntegerOption | ((builder: SlashCommandIntegerOption) => SlashCommandIntegerOption),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandIntegerOption);\n\t}\n\n\t/**\n\t * Adds a number option\n\t *\n\t * @param input A function that returns an option builder, or an already built builder\n\t */\n\tpublic addNumberOption(\n\t\tinput: SlashCommandNumberOption | ((builder: SlashCommandNumberOption) => SlashCommandNumberOption),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandNumberOption);\n\t}\n\n\tprivate _sharedAddOptionMethod(\n\t\tinput: T | ((builder: T) => T),\n\t\tInstance: new () => T,\n\t): ShouldOmitSubcommandFunctions extends true ? Omit : this {\n\t\tconst { options } = this;\n\n\t\t// First, assert options conditions - we cannot have more than 25 options\n\t\tvalidateMaxOptionsLength(options);\n\n\t\t// Get the final result\n\t\tconst result = typeof input === 'function' ? input(new Instance()) : input;\n\n\t\tassertReturnOfBuilder(result, Instance);\n\n\t\t// Push it\n\t\toptions.push(result);\n\n\t\treturn this;\n\t}\n}\n", "import { APIApplicationCommandSubCommandOptions, ApplicationCommandOptionType } from 'discord-api-types/v9';\nimport { mix } from 'ts-mixer';\nimport { assertReturnOfBuilder, validateMaxOptionsLength, validateRequiredParameters } from './Assertions';\nimport { SharedSlashCommandOptions } from './mixins/CommandOptions';\nimport { SharedNameAndDescription } from './mixins/NameAndDescription';\nimport type { ToAPIApplicationCommandOptions } from './SlashCommandBuilder';\n\n/**\n * Represents a folder for subcommands\n *\n * For more information, go to https://discord.com/developers/docs/interactions/slash-commands#subcommands-and-subcommand-groups\n */\n@mix(SharedNameAndDescription)\nexport class SlashCommandSubcommandGroupBuilder implements ToAPIApplicationCommandOptions {\n\t/**\n\t * The name of this subcommand group\n\t */\n\tpublic readonly name: string = undefined!;\n\n\t/**\n\t * The description of this subcommand group\n\t */\n\tpublic readonly description: string = undefined!;\n\n\t/**\n\t * The subcommands part of this subcommand group\n\t */\n\tpublic readonly options: ToAPIApplicationCommandOptions[] = [];\n\n\t/**\n\t * Adds a new subcommand to this group\n\t *\n\t * @param input A function that returns a subcommand builder, or an already built builder\n\t */\n\tpublic addSubcommand(\n\t\tinput:\n\t\t\t| SlashCommandSubcommandBuilder\n\t\t\t| ((subcommandGroup: SlashCommandSubcommandBuilder) => SlashCommandSubcommandBuilder),\n\t) {\n\t\tconst { options } = this;\n\n\t\t// First, assert options conditions - we cannot have more than 25 options\n\t\tvalidateMaxOptionsLength(options);\n\n\t\t// Get the final result\n\t\tconst result = typeof input === 'function' ? input(new SlashCommandSubcommandBuilder()) : input;\n\n\t\tassertReturnOfBuilder(result, SlashCommandSubcommandBuilder);\n\n\t\t// Push it\n\t\toptions.push(result);\n\n\t\treturn this;\n\t}\n\n\tpublic toJSON(): APIApplicationCommandSubCommandOptions {\n\t\tvalidateRequiredParameters(this.name, this.description, this.options);\n\t\treturn {\n\t\t\ttype: ApplicationCommandOptionType.SubcommandGroup,\n\t\t\tname: this.name,\n\t\t\tdescription: this.description,\n\t\t\toptions: this.options.map((option) => option.toJSON()),\n\t\t};\n\t}\n}\n\nexport interface SlashCommandSubcommandGroupBuilder extends SharedNameAndDescription {}\n\n/**\n * Represents a subcommand\n *\n * For more information, go to https://discord.com/developers/docs/interactions/slash-commands#subcommands-and-subcommand-groups\n */\n@mix(SharedNameAndDescription, SharedSlashCommandOptions)\nexport class SlashCommandSubcommandBuilder implements ToAPIApplicationCommandOptions {\n\t/**\n\t * The name of this subcommand\n\t */\n\tpublic readonly name: string = undefined!;\n\n\t/**\n\t * The description of this subcommand\n\t */\n\tpublic readonly description: string = undefined!;\n\n\t/**\n\t * The options of this subcommand\n\t */\n\tpublic readonly options: ToAPIApplicationCommandOptions[] = [];\n\n\tpublic toJSON(): APIApplicationCommandSubCommandOptions {\n\t\tvalidateRequiredParameters(this.name, this.description, this.options);\n\t\treturn {\n\t\t\ttype: ApplicationCommandOptionType.Subcommand,\n\t\t\tname: this.name,\n\t\t\tdescription: this.description,\n\t\t\toptions: this.options.map((option) => option.toJSON()),\n\t\t};\n\t}\n}\n\nexport interface SlashCommandSubcommandBuilder extends SharedNameAndDescription, SharedSlashCommandOptions {}\n", "import ow from 'ow';\nimport { ApplicationCommandType } from 'discord-api-types/v9';\nimport type { ContextMenuCommandType } from './ContextMenuCommandBuilder';\n\nexport function validateRequiredParameters(name: string, type: number) {\n\t// Assert name matches all conditions\n\tvalidateName(name);\n\n\t// Assert type is valid\n\tvalidateType(type);\n}\n\nconst namePredicate = ow.string\n\t.minLength(1)\n\t.maxLength(32)\n\t.matches(/^( *[\\p{L}\\p{N}_-]+ *)+$/u);\n\nexport function validateName(name: unknown): asserts name is string {\n\tow(name, 'name', namePredicate);\n}\n\nconst typePredicate = ow.number.oneOf([ApplicationCommandType.User, ApplicationCommandType.Message]);\n\nexport function validateType(type: unknown): asserts type is ContextMenuCommandType {\n\tow(type, 'type', typePredicate);\n}\n\nconst defaultPermissionPredicate = ow.boolean;\n\nexport function validateDefaultPermission(value: unknown): asserts value is boolean {\n\tow(value, 'default_permission', defaultPermissionPredicate);\n}\n", "import { validateRequiredParameters, validateName, validateType, validateDefaultPermission } from './Assertions';\nimport type { ApplicationCommandType, RESTPostAPIApplicationCommandsJSONBody } from 'discord-api-types/v9';\n\nexport class ContextMenuCommandBuilder {\n\t/**\n\t * The name of this context menu command\n\t */\n\tpublic readonly name: string = undefined!;\n\n\t/**\n\t * The type of this context menu command\n\t */\n\tpublic readonly type: ContextMenuCommandType = undefined!;\n\n\t/**\n\t * Whether the command is enabled by default when the app is added to a guild\n\t *\n\t * @default true\n\t */\n\tpublic readonly defaultPermission: boolean | undefined = undefined;\n\n\t/**\n\t * Sets the name\n\t *\n\t * @param name The name\n\t */\n\tpublic setName(name: string) {\n\t\t// Assert the name matches the conditions\n\t\tvalidateName(name);\n\n\t\tReflect.set(this, 'name', name);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the type\n\t *\n\t * @param type The type\n\t */\n\tpublic setType(type: ContextMenuCommandType) {\n\t\t// Assert the type is valid\n\t\tvalidateType(type);\n\n\t\tReflect.set(this, 'type', type);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets whether the command is enabled by default when the application is added to a guild.\n\t *\n\t * **Note**: If set to `false`, you will have to later `PUT` the permissions for this command.\n\t *\n\t * @param value Whether or not to enable this command by default\n\t *\n\t * @see https://discord.com/developers/docs/interactions/application-commands#permissions\n\t */\n\tpublic setDefaultPermission(value: boolean) {\n\t\t// Assert the value matches the conditions\n\t\tvalidateDefaultPermission(value);\n\n\t\tReflect.set(this, 'defaultPermission', value);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Returns the final data that should be sent to Discord.\n\t *\n\t * **Note:** Calling this function will validate required properties based on their conditions.\n\t */\n\tpublic toJSON(): RESTPostAPIApplicationCommandsJSONBody {\n\t\tvalidateRequiredParameters(this.name, this.type);\n\t\treturn {\n\t\t\tname: this.name,\n\t\t\ttype: this.type,\n\t\t\tdefault_permission: this.defaultPermission,\n\t\t};\n\t}\n}\n\nexport type ContextMenuCommandType = ApplicationCommandType.User | ApplicationCommandType.Message;\n"], - "mappings": "m3BAAA,00BCAA,6VACA,MAAe,iBAEF,EAAqB,UAAG,OAAO,UAAU,GAAG,UAAU,KAEtD,EAAsB,UAAG,OAAO,UAAU,GAAG,UAAU,MAEvD,EAAuB,UAAG,SAAS,QAEnC,GAAsB,UAAG,OAAO,WAAW,CACvD,KAAM,EACN,MAAO,EACP,OAAQ,IAGI,EAA4B,UAAG,MAAM,OAAO,IAElD,WAA6B,EAAyB,EAA4B,CACxF,cAAG,EAAO,OAAS,EAAc,eAAgB,UAAG,OAAO,gBAAgB,KAGrE,GAAM,GAAsB,UAAG,IAAI,EAAoB,UAAG,MAEpD,EAAe,UAAG,IAAI,UAAG,OAAO,IAAK,UAAG,iBAExC,EAAiB,UAAG,IAAI,UAAG,OAAO,mBAAmB,GAAG,gBAAgB,UAAW,UAAG,MAEtF,EAAuB,UAAG,IAAI,UAAG,OAAO,UAAU,GAAG,UAAU,MAAO,UAAG,MAEzE,GAAsB,UAAG,IAAI,UAAG,OAAO,UAAU,GAAG,UAAU,MAAO,UAAG,MAExE,GAAqB,UAAG,IAAI,UAAG,OAAQ,UAAG,KAAM,UAAG,MAEnD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pC,CACN,KAAM,KAAK,KACX,KAAM,KAAK,KACX,mBAAoB,KAAK", - "names": [] -} +{"version":3,"file":"index.js","sourceRoot":"/","sources":["index.ts"],"names":[],"mappings":";;;;AAAA,uFAA+D;AAC/D,iEAAuC;AACvC,gEAAsC;AAEtC,0GAAkF;AAClF,2FAAiE;AACjE,+FAAqE;AACrE,uFAA6D;AAC7D,uFAA6D;AAC7D,uFAA6D;AAC7D,2FAAiE;AACjE,sFAA4D;AAC5D,oFAA0D;AAC1D,sFAA4D;AAC5D,oFAA0D","sourcesContent":["export * as EmbedAssertions from './messages/embed/Assertions';\nexport * from './messages/embed/Embed';\nexport * from './messages/formatters';\n\nexport * as SlashCommandAssertions from './interactions/slashCommands/Assertions';\nexport * from './interactions/slashCommands/SlashCommandBuilder';\nexport * from './interactions/slashCommands/SlashCommandSubcommands';\nexport * from './interactions/slashCommands/options/boolean';\nexport * from './interactions/slashCommands/options/channel';\nexport * from './interactions/slashCommands/options/integer';\nexport * from './interactions/slashCommands/options/mentionable';\nexport * from './interactions/slashCommands/options/number';\nexport * from './interactions/slashCommands/options/role';\nexport * from './interactions/slashCommands/options/string';\nexport * from './interactions/slashCommands/options/user';\n"]} \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/index.mjs b/node_modules/@discordjs/builders/dist/index.mjs index cea9963..639884c 100644 --- a/node_modules/@discordjs/builders/dist/index.mjs +++ b/node_modules/@discordjs/builders/dist/index.mjs @@ -1,4 +1,36 @@ -var $=Object.defineProperty;var $e=Object.getOwnPropertyDescriptor;var Ie=(t,e,n)=>e in t?$(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Be=t=>$(t,"__esModule",{value:!0});var k=(t,e)=>{Be(t);for(var n in e)$(t,n,{get:e[n],enumerable:!0})};var T=(t,e,n,o)=>{for(var a=o>1?void 0:o?$e(e,n):e,S=t.length-1,P;S>=0;S--)(P=t[S])&&(a=(o?P(e,n,a):P(a))||a);return o&&a&&$(e,n,a),a};var i=(t,e,n)=>(Ie(t,typeof e!="symbol"?e+"":e,n),n);var pe={};k(pe,{authorNamePredicate:()=>U,colorPredicate:()=>G,descriptionPredicate:()=>F,embedFieldPredicate:()=>me,embedFieldsArrayPredicate:()=>N,fieldInlinePredicate:()=>B,fieldNamePredicate:()=>g,fieldValuePredicate:()=>I,footerTextPredicate:()=>J,timestampPredicate:()=>q,titlePredicate:()=>V,urlPredicate:()=>h,validateFieldLength:()=>w});import r from"ow";var g=r.string.minLength(1).maxLength(256),I=r.string.minLength(1).maxLength(1024),B=r.optional.boolean,me=r.object.exactShape({name:g,value:I,inline:B}),N=r.array.ofType(me);function w(t,e){r(t.length+e,"field amount",r.number.lessThanOrEqual(25))}var U=r.any(g,r.null),h=r.any(r.string.url,r.nullOrUndefined),G=r.any(r.number.greaterThanOrEqual(0).lessThanOrEqual(16777215),r.null),F=r.any(r.string.minLength(1).maxLength(4096),r.null),J=r.any(r.string.minLength(1).maxLength(2048),r.null),q=r.any(r.number,r.date,r.null),V=r.any(g,r.null);import s from"ow";var L=class{constructor(e={}){i(this,"fields");i(this,"title");i(this,"description");i(this,"url");i(this,"color");i(this,"timestamp");i(this,"thumbnail");i(this,"image");i(this,"video");i(this,"author");i(this,"provider");i(this,"footer");this.title=e.title,this.description=e.description,this.url=e.url,this.color=e.color,this.thumbnail=e.thumbnail,this.image=e.image,this.video=e.video,this.author=e.author,this.provider=e.provider,this.footer=e.footer,this.fields=e.fields??[],e.timestamp&&(this.timestamp=new Date(e.timestamp).toISOString())}get length(){return(this.title?.length??0)+(this.description?.length??0)+this.fields.reduce((e,n)=>e+n.name.length+n.value.length,0)+(this.footer?.text.length??0)+(this.author?.name.length??0)}addField(e){return this.addFields(e)}addFields(...e){return s(e,"fields",N),w(this.fields,e.length),this.fields.push(...L.normalizeFields(...e)),this}spliceFields(e,n,...o){return s(o,"fields",N),w(this.fields,o.length-n),this.fields.splice(e,n,...L.normalizeFields(...o)),this}setAuthor(e){if(e===null)return this.author=void 0,this;let{name:n,iconURL:o,url:a}=e;return s(n,"name",U),s(o,"iconURL",h),s(a,"url",h),this.author={name:n,url:a,icon_url:o},this}setColor(e){return s(e,"color",G),this.color=e??void 0,this}setDescription(e){return s(e,"description",F),this.description=e??void 0,this}setFooter(e){if(e===null)return this.footer=void 0,this;let{text:n,iconURL:o}=e;return s(n,"text",J),s(o,"iconURL",h),this.footer={text:n,icon_url:o},this}setImage(e){return s(e,"url",h),this.image=e?{url:e}:void 0,this}setThumbnail(e){return s(e,"url",h),this.thumbnail=e?{url:e}:void 0,this}setTimestamp(e=Date.now()){return s(e,"timestamp",q),this.timestamp=e?new Date(e).toISOString():void 0,this}setTitle(e){return s(e,"title",V),this.title=e??void 0,this}setURL(e){return s(e,"url",h),this.url=e??void 0,this}toJSON(){return{...this}}static normalizeFields(...e){return e.flat(1/0).map(n=>(s(n.name,"field name",g),s(n.value,"field value",I),s(n.inline,"field inline",B),{name:n.name,value:n.value,inline:n.inline??void 0}))}};function ze(t,e){return typeof e=="undefined"?`\`\`\` -${t}\`\`\``:`\`\`\`${t} -${e}\`\`\``}function Ke(t){return`\`${t}\``}function Qe(t){return`_${t}_`}function He(t){return`**${t}**`}function Xe(t){return`__${t}__`}function Ye(t){return`~~${t}~~`}function Ze(t){return`> ${t}`}function et(t){return`>>> ${t}`}function tt(t){return`<${t}>`}function nt(t,e,n){return n?`[${t}](${e} "${n}")`:`[${t}](${e})`}function it(t){return`||${t}||`}function ot(t){return`<@${t}>`}function rt(t){return`<@!${t}>`}function st(t){return`<#${t}>`}function at(t){return`<@&${t}>`}function mt(t,e=!1){return`<${e?"a":""}:_:${t}>`}function pt(t,e){return typeof t!="number"&&(t=Math.floor((t?.getTime()??Date.now())/1e3)),typeof e=="string"?``:``}var dt={ShortTime:"t",LongTime:"T",ShortDate:"d",LongDate:"D",ShortDateTime:"f",LongDateTime:"F",RelativeTime:"R"},de;(function(o){o.Shrug="\xAF\\_(\u30C4)\\_/\xAF",o.Tableflip="(\u256F\xB0\u25A1\xB0\uFF09\u256F\uFE35 \u253B\u2501\u253B",o.Unflip="\u252C\u2500\u252C \u30CE( \u309C-\u309C\u30CE)"})(de||(de={}));var ce={};k(ce,{assertReturnOfBuilder:()=>f,validateDefaultPermission:()=>j,validateDescription:()=>R,validateMaxChoicesLength:()=>z,validateMaxOptionsLength:()=>c,validateName:()=>E,validateRequiredParameters:()=>C});import W from"@sindresorhus/is";import l from"ow";function C(t,e,n){E(t),R(e),c(n)}var Ne=l.string.lowercase.minLength(1).maxLength(32).addValidator({message:(t,e)=>`Expected ${e} to match "^[\\p{L}\\p{N}_-]+$", got ${t} instead`,validator:t=>/^[\p{L}\p{N}_-]+$/u.test(t)});function E(t){l(t,"name",Ne)}var we=l.string.minLength(1).maxLength(100);function R(t){l(t,"description",we)}var Le=l.boolean;function j(t){l(t,"default_permission",Le)}var le=l.array.maxLength(25);function c(t){l(t,"options",le)}function z(t){l(t,"choices",le)}function f(t,e){let n=e.name;if(W.nullOrUndefined(t))throw new TypeError(`Expected to receive a ${n} builder, got ${t===null?"null":"undefined"} instead.`);if(W.primitive(t))throw new TypeError(`Expected to receive a ${n} builder, got a primitive (${typeof t}) instead.`);if(!(t instanceof e)){let o=t,a=W.function_(t)?t.name:o.constructor.name,S=Reflect.get(o,Symbol.toStringTag),P=S?`${a} [${S}]`:a;throw new TypeError(`Expected to receive a ${n} builder, got ${P} instead.`)}}import{mix as _e}from"ts-mixer";import{ApplicationCommandOptionType as ue}from"discord-api-types/v9";import M from"ow";var b=class{constructor(){i(this,"name");i(this,"description")}setName(e){return E(e),Reflect.set(this,"name",e),this}setDescription(e){return R(e),Reflect.set(this,"description",e),this}};var m=class extends b{constructor(e){super();i(this,"required",!1);i(this,"type");this.type=e}setRequired(e){return M(e,"required",M.boolean),this.required=e,this}toJSON(){return C(this.name,this.description,[]),M(this.required,"required",M.boolean),{type:this.type,name:this.name,description:this.description,required:this.required}}};var K=class extends m{constructor(){super(ue.Boolean);i(this,"type",ue.Boolean)}};import{ApplicationCommandOptionType as Ce}from"discord-api-types/v9";import{ApplicationCommandOptionType as Ee,ChannelType as u}from"discord-api-types/v9";import he from"ow";var Re=[u.GuildCategory,u.GuildNews,u.GuildNewsThread,u.GuildStore,u.GuildStageVoice,u.GuildText,u.GuildVoice,u.GuildPublicThread,u.GuildPrivateThread],Me=he.number.oneOf(Re),Q=class extends m{constructor(){super(...arguments);i(this,"channelTypes")}addChannelType(e){return this.channelTypes??=[],he(e,"channel type",Me),this.channelTypes.push(e),this}addChannelTypes(e){return e.forEach(n=>this.addChannelType(n)),this}toJSON(){return{...super.toJSON(),type:Ee.Channel,channel_types:this.channelTypes}}};var H=class extends Q{constructor(){super(Ce.Channel);i(this,"type",Ce.Channel)}};import{ApplicationCommandOptionType as be}from"discord-api-types/v9";import{ApplicationCommandOptionType as p}from"discord-api-types/v9";import d from"ow";var X=d.string.minLength(1).maxLength(100),fe=d.number.finite,De=d.array.ofType(d.array.exactShape([X,d.any(d.string,fe)])),y=class extends m{constructor(){super(...arguments);i(this,"choices")}addChoice(e,n){return this.choices??=[],z(this.choices),d(e,`${Y[this.type]} choice name`,X),this.type===p.String?d(n,"string choice value",X):d(n,`${Y[this.type]} choice value`,fe),this.choices.push({name:e,value:n}),this}addChoices(e){d(e,`${Y[this.type]} choices`,De);for(let[n,o]of e)this.addChoice(n,o);return this}toJSON(){return{...super.toJSON(),choices:this.choices}}},Y={[p.Subcommand]:"subcommand",[p.SubcommandGroup]:"subcommand group",[p.String]:"string",[p.Integer]:"integer",[p.Boolean]:"boolean",[p.User]:"user",[p.Channel]:"channel",[p.Role]:"role",[p.Mentionable]:"mentionable",[p.Number]:"number"};var Z=class extends y{constructor(){super(be.Integer);i(this,"type",be.Integer)}};import{ApplicationCommandOptionType as xe}from"discord-api-types/v9";var ee=class extends m{constructor(){super(xe.Mentionable);i(this,"type",xe.Mentionable)}};import{ApplicationCommandOptionType as ye}from"discord-api-types/v9";var te=class extends y{constructor(){super(ye.Number);i(this,"type",ye.Number)}};import{ApplicationCommandOptionType as Se}from"discord-api-types/v9";var ne=class extends m{constructor(){super(Se.Role);i(this,"type",Se.Role)}};import{ApplicationCommandOptionType as ge}from"discord-api-types/v9";var ie=class extends y{constructor(){super(ge.String);i(this,"type",ge.String)}};import{ApplicationCommandOptionType as Oe}from"discord-api-types/v9";var oe=class extends m{constructor(){super(Oe.User);i(this,"type",Oe.User)}};var v=class{constructor(){i(this,"options")}addBooleanOption(e){return this._sharedAddOptionMethod(e,K)}addUserOption(e){return this._sharedAddOptionMethod(e,oe)}addChannelOption(e){return this._sharedAddOptionMethod(e,H)}addRoleOption(e){return this._sharedAddOptionMethod(e,ne)}addMentionableOption(e){return this._sharedAddOptionMethod(e,ee)}addStringOption(e){return this._sharedAddOptionMethod(e,ie)}addIntegerOption(e){return this._sharedAddOptionMethod(e,Z)}addNumberOption(e){return this._sharedAddOptionMethod(e,te)}_sharedAddOptionMethod(e,n){let{options:o}=this;c(o);let a=typeof e=="function"?e(new n):e;return f(a,n),o.push(a),this}};import{ApplicationCommandOptionType as Ae}from"discord-api-types/v9";import{mix as Pe}from"ts-mixer";var O=class{constructor(){i(this,"name");i(this,"description");i(this,"options",[])}addSubcommand(e){let{options:n}=this;c(n);let o=typeof e=="function"?e(new x):e;return f(o,x),n.push(o),this}toJSON(){return C(this.name,this.description,this.options),{type:Ae.SubcommandGroup,name:this.name,description:this.description,options:this.options.map(e=>e.toJSON())}}};O=T([Pe(b)],O);var x=class{constructor(){i(this,"name");i(this,"description");i(this,"options",[])}toJSON(){return C(this.name,this.description,this.options),{type:Ae.Subcommand,name:this.name,description:this.description,options:this.options.map(e=>e.toJSON())}}};x=T([Pe(b,v)],x);var re=class{constructor(){i(this,"name");i(this,"description");i(this,"options",[]);i(this,"defaultPermission")}toJSON(){return C(this.name,this.description,this.options),{name:this.name,description:this.description,options:this.options.map(e=>e.toJSON()),default_permission:this.defaultPermission}}setDefaultPermission(e){return j(e),Reflect.set(this,"defaultPermission",e),this}addSubcommandGroup(e){let{options:n}=this;c(n);let o=typeof e=="function"?e(new O):e;return f(o,O),n.push(o),this}addSubcommand(e){let{options:n}=this;c(n);let o=typeof e=="function"?e(new x):e;return f(o,x),n.push(o),this}};re=T([_e(v,b)],re);var ve={};k(ve,{validateDefaultPermission:()=>ae,validateName:()=>D,validateRequiredParameters:()=>se,validateType:()=>_});import A from"ow";import{ApplicationCommandType as Te}from"discord-api-types/v9";function se(t,e){D(t),_(e)}var ke=A.string.minLength(1).maxLength(32).matches(/^( *[\p{L}\p{N}_-]+ *)+$/u);function D(t){A(t,"name",ke)}var Ue=A.number.oneOf([Te.User,Te.Message]);function _(t){A(t,"type",Ue)}var Ge=A.boolean;function ae(t){A(t,"default_permission",Ge)}var Fe=class{constructor(){i(this,"name");i(this,"type");i(this,"defaultPermission")}setName(e){return D(e),Reflect.set(this,"name",e),this}setType(e){return _(e),Reflect.set(this,"type",e),this}setDefaultPermission(e){return ae(e),Reflect.set(this,"defaultPermission",e),this}toJSON(){return se(this.name,this.type),{name:this.name,type:this.type,default_permission:this.defaultPermission}}};export{ve as ContextMenuCommandAssertions,Fe as ContextMenuCommandBuilder,L as Embed,pe as EmbedAssertions,de as Faces,ce as SlashCommandAssertions,K as SlashCommandBooleanOption,re as SlashCommandBuilder,H as SlashCommandChannelOption,Z as SlashCommandIntegerOption,ee as SlashCommandMentionableOption,te as SlashCommandNumberOption,ne as SlashCommandRoleOption,ie as SlashCommandStringOption,x as SlashCommandSubcommandBuilder,O as SlashCommandSubcommandGroupBuilder,oe as SlashCommandUserOption,dt as TimestampStyles,et as blockQuote,He as bold,st as channelMention,ze as codeBlock,mt as formatEmoji,tt as hideLinkEmbed,nt as hyperlink,Ke as inlineCode,Qe as italic,rt as memberNicknameMention,Ze as quote,at as roleMention,it as spoiler,Ye as strikethrough,pt as time,Xe as underscore,ot as userMention}; -//# sourceMappingURL=index.mjs.map +import mod from "./index.js"; + +export default mod; +export const Embed = mod.Embed; +export const EmbedAssertions = mod.EmbedAssertions; +export const Faces = mod.Faces; +export const SlashCommandAssertions = mod.SlashCommandAssertions; +export const SlashCommandBooleanOption = mod.SlashCommandBooleanOption; +export const SlashCommandBuilder = mod.SlashCommandBuilder; +export const SlashCommandChannelOption = mod.SlashCommandChannelOption; +export const SlashCommandIntegerOption = mod.SlashCommandIntegerOption; +export const SlashCommandMentionableOption = mod.SlashCommandMentionableOption; +export const SlashCommandNumberOption = mod.SlashCommandNumberOption; +export const SlashCommandRoleOption = mod.SlashCommandRoleOption; +export const SlashCommandStringOption = mod.SlashCommandStringOption; +export const SlashCommandSubcommandBuilder = mod.SlashCommandSubcommandBuilder; +export const SlashCommandSubcommandGroupBuilder = mod.SlashCommandSubcommandGroupBuilder; +export const SlashCommandUserOption = mod.SlashCommandUserOption; +export const TimestampStyles = mod.TimestampStyles; +export const blockQuote = mod.blockQuote; +export const bold = mod.bold; +export const channelMention = mod.channelMention; +export const codeBlock = mod.codeBlock; +export const formatEmoji = mod.formatEmoji; +export const hideLinkEmbed = mod.hideLinkEmbed; +export const hyperlink = mod.hyperlink; +export const inlineCode = mod.inlineCode; +export const italic = mod.italic; +export const memberNicknameMention = mod.memberNicknameMention; +export const quote = mod.quote; +export const roleMention = mod.roleMention; +export const spoiler = mod.spoiler; +export const strikethrough = mod.strikethrough; +export const time = mod.time; +export const underscore = mod.underscore; +export const userMention = mod.userMention; diff --git a/node_modules/@discordjs/builders/dist/index.mjs.map b/node_modules/@discordjs/builders/dist/index.mjs.map deleted file mode 100644 index d34b61f..0000000 --- a/node_modules/@discordjs/builders/dist/index.mjs.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../src/messages/embed/Assertions.ts", "../src/messages/embed/Embed.ts", "../src/messages/formatters.ts", "../src/interactions/slashCommands/Assertions.ts", "../src/interactions/slashCommands/SlashCommandBuilder.ts", "../src/interactions/slashCommands/options/boolean.ts", "../src/interactions/slashCommands/mixins/CommandOptionBase.ts", "../src/interactions/slashCommands/mixins/NameAndDescription.ts", "../src/interactions/slashCommands/options/channel.ts", "../src/interactions/slashCommands/mixins/CommandChannelOptionBase.ts", "../src/interactions/slashCommands/options/integer.ts", "../src/interactions/slashCommands/mixins/CommandOptionWithChoices.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/CommandOptions.ts", "../src/interactions/slashCommands/SlashCommandSubcommands.ts", "../src/interactions/contextMenuCommands/Assertions.ts", "../src/interactions/contextMenuCommands/ContextMenuCommandBuilder.ts"], - "sourcesContent": ["import type { APIEmbedField } from 'discord-api-types/v9';\nimport ow from 'ow';\n\nexport const fieldNamePredicate = ow.string.minLength(1).maxLength(256);\n\nexport const fieldValuePredicate = ow.string.minLength(1).maxLength(1024);\n\nexport const fieldInlinePredicate = ow.optional.boolean;\n\nexport const embedFieldPredicate = ow.object.exactShape({\n\tname: fieldNamePredicate,\n\tvalue: fieldValuePredicate,\n\tinline: fieldInlinePredicate,\n});\n\nexport const embedFieldsArrayPredicate = ow.array.ofType(embedFieldPredicate);\n\nexport function validateFieldLength(fields: APIEmbedField[], amountAdding: number): void {\n\tow(fields.length + amountAdding, 'field amount', ow.number.lessThanOrEqual(25));\n}\n\nexport const authorNamePredicate = ow.any(fieldNamePredicate, ow.null);\n\nexport const urlPredicate = ow.any(ow.string.url, ow.nullOrUndefined);\n\nexport const colorPredicate = ow.any(ow.number.greaterThanOrEqual(0).lessThanOrEqual(0xffffff), ow.null);\n\nexport const descriptionPredicate = ow.any(ow.string.minLength(1).maxLength(4096), ow.null);\n\nexport const footerTextPredicate = ow.any(ow.string.minLength(1).maxLength(2048), ow.null);\n\nexport const timestampPredicate = ow.any(ow.number, ow.date, ow.null);\n\nexport const titlePredicate = ow.any(fieldNamePredicate, ow.null);\n", "import type {\n\tAPIEmbed,\n\tAPIEmbedAuthor,\n\tAPIEmbedField,\n\tAPIEmbedFooter,\n\tAPIEmbedImage,\n\tAPIEmbedProvider,\n\tAPIEmbedThumbnail,\n\tAPIEmbedVideo,\n} from 'discord-api-types/v9';\nimport ow from 'ow';\nimport {\n\tauthorNamePredicate,\n\tcolorPredicate,\n\tdescriptionPredicate,\n\tembedFieldsArrayPredicate,\n\tfieldInlinePredicate,\n\tfieldNamePredicate,\n\tfieldValuePredicate,\n\tfooterTextPredicate,\n\ttimestampPredicate,\n\ttitlePredicate,\n\turlPredicate,\n\tvalidateFieldLength,\n} from './Assertions';\n\nexport interface AuthorOptions {\n\tname: string;\n\turl?: string;\n\ticonURL?: string;\n}\n\nexport interface FooterOptions {\n\ttext: string;\n\ticonURL?: string;\n}\n\n/**\n * Represents an embed in a message (image/video preview, rich embed, etc.)\n */\nexport class Embed implements APIEmbed {\n\t/**\n\t * An array of fields of this embed\n\t */\n\tpublic fields: APIEmbedField[];\n\n\t/**\n\t * The embed title\n\t */\n\tpublic title?: string;\n\n\t/**\n\t * The embed description\n\t */\n\tpublic description?: string;\n\n\t/**\n\t * The embed url\n\t */\n\tpublic url?: string;\n\n\t/**\n\t * The embed color\n\t */\n\tpublic color?: number;\n\n\t/**\n\t * The timestamp of the embed in the ISO format\n\t */\n\tpublic timestamp?: string;\n\n\t/**\n\t * The embed thumbnail data\n\t */\n\tpublic thumbnail?: APIEmbedThumbnail;\n\n\t/**\n\t * The embed image data\n\t */\n\tpublic image?: APIEmbedImage;\n\n\t/**\n\t * Received video data\n\t */\n\tpublic video?: APIEmbedVideo;\n\n\t/**\n\t * The embed author data\n\t */\n\tpublic author?: APIEmbedAuthor;\n\n\t/**\n\t * Received data about the embed provider\n\t */\n\tpublic provider?: APIEmbedProvider;\n\n\t/**\n\t * The embed footer data\n\t */\n\tpublic footer?: APIEmbedFooter;\n\n\tpublic constructor(data: APIEmbed = {}) {\n\t\tthis.title = data.title;\n\t\tthis.description = data.description;\n\t\tthis.url = data.url;\n\t\tthis.color = data.color;\n\t\tthis.thumbnail = data.thumbnail;\n\t\tthis.image = data.image;\n\t\tthis.video = data.video;\n\t\tthis.author = data.author;\n\t\tthis.provider = data.provider;\n\t\tthis.footer = data.footer;\n\t\tthis.fields = data.fields ?? [];\n\n\t\tif (data.timestamp) this.timestamp = new Date(data.timestamp).toISOString();\n\t}\n\n\t/**\n\t * The accumulated length for the embed title, description, fields, footer text, and author name\n\t */\n\tpublic get length(): number {\n\t\treturn (\n\t\t\t(this.title?.length ?? 0) +\n\t\t\t(this.description?.length ?? 0) +\n\t\t\tthis.fields.reduce((prev, curr) => prev + curr.name.length + curr.value.length, 0) +\n\t\t\t(this.footer?.text.length ?? 0) +\n\t\t\t(this.author?.name.length ?? 0)\n\t\t);\n\t}\n\n\t/**\n\t * Adds a field to the embed (max 25)\n\t *\n\t * @param field The field to add.\n\t */\n\tpublic addField(field: APIEmbedField): this {\n\t\treturn this.addFields(field);\n\t}\n\n\t/**\n\t * Adds fields to the embed (max 25)\n\t *\n\t * @param fields The fields to add\n\t */\n\tpublic addFields(...fields: APIEmbedField[]): this {\n\t\t// Data assertions\n\t\tow(fields, 'fields', embedFieldsArrayPredicate);\n\n\t\t// Ensure adding these fields won't exceed the 25 field limit\n\t\tvalidateFieldLength(this.fields, fields.length);\n\n\t\tthis.fields.push(...Embed.normalizeFields(...fields));\n\t\treturn this;\n\t}\n\n\t/**\n\t * Removes, replaces, or inserts fields in the embed (max 25)\n\t *\n\t * @param index The index to start at\n\t * @param deleteCount The number of fields to remove\n\t * @param fields The replacing field objects\n\t */\n\tpublic spliceFields(index: number, deleteCount: number, ...fields: APIEmbedField[]): this {\n\t\t// Data assertions\n\t\tow(fields, 'fields', embedFieldsArrayPredicate);\n\n\t\t// Ensure adding these fields won't exceed the 25 field limit\n\t\tvalidateFieldLength(this.fields, fields.length - deleteCount);\n\n\t\tthis.fields.splice(index, deleteCount, ...Embed.normalizeFields(...fields));\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the author of this embed\n\t *\n\t * @param options The options for the author\n\t */\n\tpublic setAuthor(options: AuthorOptions | null): this {\n\t\tif (options === null) {\n\t\t\tthis.author = undefined;\n\t\t\treturn this;\n\t\t}\n\n\t\tconst { name, iconURL, url } = options;\n\t\t// Data assertions\n\t\tow(name, 'name', authorNamePredicate);\n\t\tow(iconURL, 'iconURL', urlPredicate);\n\t\tow(url, 'url', urlPredicate);\n\n\t\tthis.author = { name, url, icon_url: iconURL };\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the color of this embed\n\t *\n\t * @param color The color of the embed\n\t */\n\tpublic setColor(color: number | null): this {\n\t\t// Data assertions\n\t\tow(color, 'color', colorPredicate);\n\n\t\tthis.color = color ?? undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the description of this embed\n\t *\n\t * @param description The description\n\t */\n\tpublic setDescription(description: string | null): this {\n\t\t// Data assertions\n\t\tow(description, 'description', descriptionPredicate);\n\n\t\tthis.description = description ?? undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the footer of this embed\n\t *\n\t * @param options The options for the footer\n\t */\n\tpublic setFooter(options: FooterOptions | null): this {\n\t\tif (options === null) {\n\t\t\tthis.footer = undefined;\n\t\t\treturn this;\n\t\t}\n\n\t\tconst { text, iconURL } = options;\n\t\t// Data assertions\n\t\tow(text, 'text', footerTextPredicate);\n\t\tow(iconURL, 'iconURL', urlPredicate);\n\n\t\tthis.footer = { text, icon_url: iconURL };\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the image of this embed\n\t *\n\t * @param url The URL of the image\n\t */\n\tpublic setImage(url: string | null): this {\n\t\t// Data assertions\n\t\tow(url, 'url', urlPredicate);\n\n\t\tthis.image = url ? { url } : undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the thumbnail of this embed\n\t *\n\t * @param url The URL of the thumbnail\n\t */\n\tpublic setThumbnail(url: string | null): this {\n\t\t// Data assertions\n\t\tow(url, 'url', urlPredicate);\n\n\t\tthis.thumbnail = url ? { url } : undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the timestamp of this embed\n\t *\n\t * @param timestamp The timestamp or date\n\t */\n\tpublic setTimestamp(timestamp: number | Date | null = Date.now()): this {\n\t\t// Data assertions\n\t\tow(timestamp, 'timestamp', timestampPredicate);\n\n\t\tthis.timestamp = timestamp ? new Date(timestamp).toISOString() : undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the title of this embed\n\t *\n\t * @param title The title\n\t */\n\tpublic setTitle(title: string | null): this {\n\t\t// Data assertions\n\t\tow(title, 'title', titlePredicate);\n\n\t\tthis.title = title ?? undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the URL of this embed\n\t *\n\t * @param url The URL\n\t */\n\tpublic setURL(url: string | null): this {\n\t\t// Data assertions\n\t\tow(url, 'url', urlPredicate);\n\n\t\tthis.url = url ?? undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Transforms the embed to a plain object\n\t */\n\tpublic toJSON(): APIEmbed {\n\t\treturn { ...this };\n\t}\n\n\t/**\n\t * Normalizes field input and resolves strings\n\t *\n\t * @param fields Fields to normalize\n\t */\n\tpublic static normalizeFields(...fields: APIEmbedField[]): APIEmbedField[] {\n\t\treturn fields.flat(Infinity).map((field) => {\n\t\t\tow(field.name, 'field name', fieldNamePredicate);\n\t\t\tow(field.value, 'field value', fieldValuePredicate);\n\t\t\tow(field.inline, 'field inline', fieldInlinePredicate);\n\n\t\t\treturn { name: field.name, value: field.value, inline: field.inline ?? undefined };\n\t\t});\n\t}\n}\n", "import type { Snowflake } from 'discord-api-types/globals';\nimport type { URL } from 'url';\n\n/**\n * Wraps the content inside a codeblock with no language\n *\n * @param content The content to wrap\n */\nexport function codeBlock(content: C): `\\`\\`\\`\\n${C}\\`\\`\\``;\n\n/**\n * Wraps the content inside a codeblock with the specified language\n *\n * @param language The language for the codeblock\n * @param content The content to wrap\n */\nexport function codeBlock(language: L, content: C): `\\`\\`\\`${L}\\n${C}\\`\\`\\``;\nexport function codeBlock(language: string, content?: string): string {\n\treturn typeof content === 'undefined' ? `\\`\\`\\`\\n${language}\\`\\`\\`` : `\\`\\`\\`${language}\\n${content}\\`\\`\\``;\n}\n\n/**\n * Wraps the content inside \\`backticks\\`, which formats it as inline code\n *\n * @param content The content to wrap\n */\nexport function inlineCode(content: C): `\\`${C}\\`` {\n\treturn `\\`${content}\\``;\n}\n\n/**\n * Formats the content into italic text\n *\n * @param content The content to wrap\n */\nexport function italic(content: C): `_${C}_` {\n\treturn `_${content}_`;\n}\n\n/**\n * Formats the content into bold text\n *\n * @param content The content to wrap\n */\nexport function bold(content: C): `**${C}**` {\n\treturn `**${content}**`;\n}\n\n/**\n * Formats the content into underscored text\n *\n * @param content The content to wrap\n */\nexport function underscore(content: C): `__${C}__` {\n\treturn `__${content}__`;\n}\n\n/**\n * Formats the content into strike-through text\n *\n * @param content The content to wrap\n */\nexport function strikethrough(content: C): `~~${C}~~` {\n\treturn `~~${content}~~`;\n}\n\n/**\n * Formats the content into a quote. This needs to be at the start of the line for Discord to format it\n *\n * @param content The content to wrap\n */\nexport function quote(content: C): `> ${C}` {\n\treturn `> ${content}`;\n}\n\n/**\n * Formats the content into a block quote. This needs to be at the start of the line for Discord to format it\n *\n * @param content The content to wrap\n */\nexport function blockQuote(content: C): `>>> ${C}` {\n\treturn `>>> ${content}`;\n}\n\n/**\n * Wraps the URL into `<>`, which stops it from embedding\n *\n * @param url The URL to wrap\n */\nexport function hideLinkEmbed(url: C): `<${C}>`;\n\n/**\n * Wraps the URL into `<>`, which stops it from embedding\n *\n * @param url The URL to wrap\n */\nexport function hideLinkEmbed(url: URL): `<${string}>`;\nexport function hideLinkEmbed(url: string | URL) {\n\t// eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n\treturn `<${url}>`;\n}\n\n/**\n * Formats the content and the URL into a masked URL\n *\n * @param content The content to display\n * @param url The URL the content links to\n */\nexport function hyperlink(content: C, url: URL): `[${C}](${string})`;\n\n/**\n * Formats the content and the URL into a masked URL\n *\n * @param content The content to display\n * @param url The URL the content links to\n */\nexport function hyperlink(content: C, url: U): `[${C}](${U})`;\n\n/**\n * Formats the content and the URL into a masked URL\n *\n * @param content The content to display\n * @param url The URL the content links to\n * @param title The title shown when hovering on the masked link\n */\nexport function hyperlink(\n\tcontent: C,\n\turl: URL,\n\ttitle: T,\n): `[${C}](${string} \"${T}\")`;\n\n/**\n * Formats the content and the URL into a masked URL\n *\n * @param content The content to display\n * @param url The URL the content links to\n * @param title The title shown when hovering on the masked link\n */\nexport function hyperlink(\n\tcontent: C,\n\turl: U,\n\ttitle: T,\n): `[${C}](${U} \"${T}\")`;\nexport function hyperlink(content: string, url: string | URL, title?: string) {\n\t// eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n\treturn title ? `[${content}](${url} \"${title}\")` : `[${content}](${url})`;\n}\n\n/**\n * Wraps the content inside spoiler (hidden text)\n *\n * @param content The content to wrap\n */\nexport function spoiler(content: C): `||${C}||` {\n\treturn `||${content}||`;\n}\n\n/**\n * Formats a user ID into a user mention\n *\n * @param userId The user ID to format\n */\nexport function userMention(userId: C): `<@${C}>` {\n\treturn `<@${userId}>`;\n}\n\n/**\n * Formats a user ID into a member-nickname mention\n *\n * @param memberId The user ID to format\n */\nexport function memberNicknameMention(memberId: C): `<@!${C}>` {\n\treturn `<@!${memberId}>`;\n}\n\n/**\n * Formats a channel ID into a channel mention\n *\n * @param channelId The channel ID to format\n */\nexport function channelMention(channelId: C): `<#${C}>` {\n\treturn `<#${channelId}>`;\n}\n\n/**\n * Formats a role ID into a role mention\n *\n * @param roleId The role ID to format\n */\nexport function roleMention(roleId: C): `<@&${C}>` {\n\treturn `<@&${roleId}>`;\n}\n\n/**\n * Formats an emoji ID into a fully qualified emoji identifier\n *\n * @param emojiId The emoji ID to format\n */\nexport function formatEmoji(emojiId: C, animated?: false): `<:_:${C}>`;\n\n/**\n * Formats an emoji ID into a fully qualified emoji identifier\n *\n * @param emojiId The emoji ID to format\n * @param animated Whether the emoji is animated or not. Defaults to `false`\n */\nexport function formatEmoji(emojiId: C, animated?: true): ``;\n\n/**\n * Formats an emoji ID into a fully qualified emoji identifier\n *\n * @param emojiId The emoji ID to format\n * @param animated Whether the emoji is animated or not. Defaults to `false`\n */\nexport function formatEmoji(emojiId: C, animated = false): `` | `<:_:${C}>` {\n\treturn `<${animated ? 'a' : ''}:_:${emojiId}>`;\n}\n\n/**\n * Formats a date into a short date-time string\n *\n * @param date The date to format, defaults to the current time\n */\nexport function time(date?: Date): ``;\n\n/**\n * Formats a date given a format style\n *\n * @param date The date to format\n * @param style The style to use\n */\nexport function time(date: Date, style: S): ``;\n\n/**\n * Formats the given timestamp into a short date-time string\n *\n * @param seconds The time to format, represents an UNIX timestamp in seconds\n */\nexport function time(seconds: C): ``;\n\n/**\n * Formats the given timestamp into a short date-time string\n *\n * @param seconds The time to format, represents an UNIX timestamp in seconds\n * @param style The style to use\n */\nexport function time(seconds: C, style: S): ``;\nexport function time(timeOrSeconds?: number | Date, style?: TimestampStylesString): string {\n\tif (typeof timeOrSeconds !== 'number') {\n\t\ttimeOrSeconds = Math.floor((timeOrSeconds?.getTime() ?? Date.now()) / 1000);\n\t}\n\n\treturn typeof style === 'string' ? `` : ``;\n}\n\n/**\n * The [message formatting timestamp styles](https://discord.com/developers/docs/reference#message-formatting-timestamp-styles) supported by Discord\n */\nexport const TimestampStyles = {\n\t/**\n\t * Short time format, consisting of hours and minutes, e.g. 16:20\n\t */\n\tShortTime: 't',\n\n\t/**\n\t * Long time format, consisting of hours, minutes, and seconds, e.g. 16:20:30\n\t */\n\tLongTime: 'T',\n\n\t/**\n\t * Short date format, consisting of day, month, and year, e.g. 20/04/2021\n\t */\n\tShortDate: 'd',\n\n\t/**\n\t * Long date format, consisting of day, month, and year, e.g. 20 April 2021\n\t */\n\tLongDate: 'D',\n\n\t/**\n\t * Short date-time format, consisting of short date and short time formats, e.g. 20 April 2021 16:20\n\t */\n\tShortDateTime: 'f',\n\n\t/**\n\t * Long date-time format, consisting of long date and short time formats, e.g. Tuesday, 20 April 2021 16:20\n\t */\n\tLongDateTime: 'F',\n\n\t/**\n\t * Relative time format, consisting of a relative duration format, e.g. 2 months ago\n\t */\n\tRelativeTime: 'R',\n} as const;\n\n/**\n * The possible values, see {@link TimestampStyles} for more information\n */\nexport type TimestampStylesString = typeof TimestampStyles[keyof typeof TimestampStyles];\n\n/**\n * An enum with all the available faces from Discord's native slash commands\n */\nexport enum Faces {\n\t/**\n\t * \u00AF\\\\_(\u30C4)\\\\_/\u00AF\n\t */\n\tShrug = '\u00AF\\\\_(\u30C4)\\\\_/\u00AF',\n\n\t/**\n\t * (\u256F\u00B0\u25A1\u00B0\uFF09\u256F\uFE35 \u253B\u2501\u253B\n\t */\n\tTableflip = '(\u256F\u00B0\u25A1\u00B0\uFF09\u256F\uFE35 \u253B\u2501\u253B',\n\n\t/**\n\t * \u252C\u2500\u252C \u30CE( \u309C-\u309C\u30CE)\n\t */\n\tUnflip = '\u252C\u2500\u252C \u30CE( \u309C-\u309C\u30CE)',\n}\n", "import is from '@sindresorhus/is';\nimport type { APIApplicationCommandOptionChoice } from 'discord-api-types/v9';\nimport ow from 'ow';\nimport type { SlashCommandOptionBase } from './mixins/CommandOptionBase';\nimport type { ToAPIApplicationCommandOptions } from './SlashCommandBuilder';\nimport type { SlashCommandSubcommandBuilder, SlashCommandSubcommandGroupBuilder } from './SlashCommandSubcommands';\n\nexport function validateRequiredParameters(\n\tname: string,\n\tdescription: string,\n\toptions: ToAPIApplicationCommandOptions[],\n) {\n\t// Assert name matches all conditions\n\tvalidateName(name);\n\n\t// Assert description conditions\n\tvalidateDescription(description);\n\n\t// Assert options conditions\n\tvalidateMaxOptionsLength(options);\n}\n\nconst namePredicate = ow.string.lowercase\n\t.minLength(1)\n\t.maxLength(32)\n\t.addValidator({\n\t\tmessage: (value, label) => `Expected ${label!} to match \"^[\\\\p{L}\\\\p{N}_-]+$\", got ${value} instead`,\n\t\tvalidator: (value) => /^[\\p{L}\\p{N}_-]+$/u.test(value),\n\t});\n\nexport function validateName(name: unknown): asserts name is string {\n\tow(name, 'name', namePredicate);\n}\n\nconst descriptionPredicate = ow.string.minLength(1).maxLength(100);\n\nexport function validateDescription(description: unknown): asserts description is string {\n\tow(description, 'description', descriptionPredicate);\n}\n\nconst defaultPermissionPredicate = ow.boolean;\n\nexport function validateDefaultPermission(value: unknown): asserts value is boolean {\n\tow(value, 'default_permission', defaultPermissionPredicate);\n}\n\nconst maxArrayLengthPredicate = ow.array.maxLength(25);\n\nexport function validateMaxOptionsLength(options: unknown): asserts options is ToAPIApplicationCommandOptions[] {\n\tow(options, 'options', maxArrayLengthPredicate);\n}\n\nexport function validateMaxChoicesLength(choices: APIApplicationCommandOptionChoice[]) {\n\tow(choices, 'choices', maxArrayLengthPredicate);\n}\n\nexport function assertReturnOfBuilder<\n\tT extends SlashCommandOptionBase | SlashCommandSubcommandBuilder | SlashCommandSubcommandGroupBuilder,\n>(input: unknown, ExpectedInstanceOf: new () => T): asserts input is T {\n\tconst instanceName = ExpectedInstanceOf.name;\n\n\tif (is.nullOrUndefined(input)) {\n\t\tthrow new TypeError(\n\t\t\t`Expected to receive a ${instanceName} builder, got ${input === null ? 'null' : 'undefined'} instead.`,\n\t\t);\n\t}\n\n\tif (is.primitive(input)) {\n\t\tthrow new TypeError(`Expected to receive a ${instanceName} builder, got a primitive (${typeof input}) instead.`);\n\t}\n\n\tif (!(input instanceof ExpectedInstanceOf)) {\n\t\tconst casted = input as Record;\n\n\t\tconst constructorName = is.function_(input) ? input.name : casted.constructor.name;\n\t\tconst stringTag = Reflect.get(casted, Symbol.toStringTag) as string | undefined;\n\n\t\tconst fullResultName = stringTag ? `${constructorName} [${stringTag}]` : constructorName;\n\n\t\tthrow new TypeError(`Expected to receive a ${instanceName} builder, got ${fullResultName} instead.`);\n\t}\n}\n", "import type { APIApplicationCommandOption, RESTPostAPIApplicationCommandsJSONBody } from 'discord-api-types/v9';\nimport { mix } from 'ts-mixer';\nimport {\n\tassertReturnOfBuilder,\n\tvalidateDefaultPermission,\n\tvalidateMaxOptionsLength,\n\tvalidateRequiredParameters,\n} from './Assertions';\nimport { SharedSlashCommandOptions } from './mixins/CommandOptions';\nimport { SharedNameAndDescription } from './mixins/NameAndDescription';\nimport { SlashCommandSubcommandBuilder, SlashCommandSubcommandGroupBuilder } from './SlashCommandSubcommands';\n\n@mix(SharedSlashCommandOptions, SharedNameAndDescription)\nexport class SlashCommandBuilder {\n\t/**\n\t * The name of this slash command\n\t */\n\tpublic readonly name: string = undefined!;\n\n\t/**\n\t * The description of this slash command\n\t */\n\tpublic readonly description: string = undefined!;\n\n\t/**\n\t * The options of this slash command\n\t */\n\tpublic readonly options: ToAPIApplicationCommandOptions[] = [];\n\n\t/**\n\t * Whether the command is enabled by default when the app is added to a guild\n\t *\n\t * @default true\n\t */\n\tpublic readonly defaultPermission: boolean | undefined = undefined;\n\n\t/**\n\t * Returns the final data that should be sent to Discord.\n\t *\n\t * **Note:** Calling this function will validate required properties based on their conditions.\n\t */\n\tpublic toJSON(): RESTPostAPIApplicationCommandsJSONBody {\n\t\tvalidateRequiredParameters(this.name, this.description, this.options);\n\t\treturn {\n\t\t\tname: this.name,\n\t\t\tdescription: this.description,\n\t\t\toptions: this.options.map((option) => option.toJSON()),\n\t\t\tdefault_permission: this.defaultPermission,\n\t\t};\n\t}\n\n\t/**\n\t * Sets whether the command is enabled by default when the application is added to a guild.\n\t *\n\t * **Note**: If set to `false`, you will have to later `PUT` the permissions for this command.\n\t *\n\t * @param value Whether or not to enable this command by default\n\t *\n\t * @see https://discord.com/developers/docs/interactions/application-commands#permissions\n\t */\n\tpublic setDefaultPermission(value: boolean) {\n\t\t// Assert the value matches the conditions\n\t\tvalidateDefaultPermission(value);\n\n\t\tReflect.set(this, 'defaultPermission', value);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Adds a new subcommand group to this command\n\t *\n\t * @param input A function that returns a subcommand group builder, or an already built builder\n\t */\n\tpublic addSubcommandGroup(\n\t\tinput:\n\t\t\t| SlashCommandSubcommandGroupBuilder\n\t\t\t| ((subcommandGroup: SlashCommandSubcommandGroupBuilder) => SlashCommandSubcommandGroupBuilder),\n\t): SlashCommandSubcommandsOnlyBuilder {\n\t\tconst { options } = this;\n\n\t\t// First, assert options conditions - we cannot have more than 25 options\n\t\tvalidateMaxOptionsLength(options);\n\n\t\t// Get the final result\n\t\tconst result = typeof input === 'function' ? input(new SlashCommandSubcommandGroupBuilder()) : input;\n\n\t\tassertReturnOfBuilder(result, SlashCommandSubcommandGroupBuilder);\n\n\t\t// Push it\n\t\toptions.push(result);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Adds a new subcommand to this command\n\t *\n\t * @param input A function that returns a subcommand builder, or an already built builder\n\t */\n\tpublic addSubcommand(\n\t\tinput:\n\t\t\t| SlashCommandSubcommandBuilder\n\t\t\t| ((subcommandGroup: SlashCommandSubcommandBuilder) => SlashCommandSubcommandBuilder),\n\t): SlashCommandSubcommandsOnlyBuilder {\n\t\tconst { options } = this;\n\n\t\t// First, assert options conditions - we cannot have more than 25 options\n\t\tvalidateMaxOptionsLength(options);\n\n\t\t// Get the final result\n\t\tconst result = typeof input === 'function' ? input(new SlashCommandSubcommandBuilder()) : input;\n\n\t\tassertReturnOfBuilder(result, SlashCommandSubcommandBuilder);\n\n\t\t// Push it\n\t\toptions.push(result);\n\n\t\treturn this;\n\t}\n}\n\nexport interface SlashCommandBuilder extends SharedNameAndDescription, SharedSlashCommandOptions {}\n\nexport interface SlashCommandSubcommandsOnlyBuilder\n\textends SharedNameAndDescription,\n\t\tPick {}\n\nexport interface SlashCommandOptionsOnlyBuilder\n\textends SharedNameAndDescription,\n\t\tSharedSlashCommandOptions,\n\t\tPick {}\n\nexport interface ToAPIApplicationCommandOptions {\n\ttoJSON(): APIApplicationCommandOption;\n}\n", "import { ApplicationCommandOptionType } from 'discord-api-types/v9';\nimport { SlashCommandOptionBase } from '../mixins/CommandOptionBase';\n\nexport class SlashCommandBooleanOption extends SlashCommandOptionBase {\n\tpublic override readonly type = ApplicationCommandOptionType.Boolean as const;\n\n\tpublic constructor() {\n\t\tsuper(ApplicationCommandOptionType.Boolean);\n\t}\n}\n", "import type { APIApplicationCommandOption, ApplicationCommandOptionType } from 'discord-api-types/v9';\nimport ow from 'ow';\nimport { validateRequiredParameters } from '../Assertions';\nimport type { ToAPIApplicationCommandOptions } from '../SlashCommandBuilder';\nimport { SharedNameAndDescription } from './NameAndDescription';\n\nexport class SlashCommandOptionBase extends SharedNameAndDescription implements ToAPIApplicationCommandOptions {\n\tpublic required = false;\n\tpublic readonly type: ApplicationCommandOptionType;\n\n\tpublic constructor(type: ApplicationCommandOptionType) {\n\t\tsuper();\n\t\tthis.type = type;\n\t}\n\n\t/**\n\t * Marks the option as required\n\t *\n\t * @param required If this option should be required\n\t */\n\tpublic setRequired(required: boolean) {\n\t\t// Assert that you actually passed a boolean\n\t\tow(required, 'required', ow.boolean);\n\n\t\tthis.required = required;\n\n\t\treturn this;\n\t}\n\n\tpublic toJSON(): APIApplicationCommandOption {\n\t\tvalidateRequiredParameters(this.name, this.description, []);\n\n\t\t// Assert that you actually passed a boolean\n\t\tow(this.required, 'required', ow.boolean);\n\n\t\treturn {\n\t\t\ttype: this.type,\n\t\t\tname: this.name,\n\t\t\tdescription: this.description,\n\t\t\trequired: this.required,\n\t\t};\n\t}\n}\n", "import { validateDescription, validateName } from '../Assertions';\n\nexport class SharedNameAndDescription {\n\tpublic readonly name!: string;\n\tpublic readonly description!: string;\n\n\t/**\n\t * Sets the name\n\t *\n\t * @param name The name\n\t */\n\tpublic setName(name: string) {\n\t\t// Assert the name matches the conditions\n\t\tvalidateName(name);\n\n\t\tReflect.set(this, 'name', name);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the description\n\t *\n\t * @param description The description\n\t */\n\tpublic setDescription(description: string) {\n\t\t// Assert the description matches the conditions\n\t\tvalidateDescription(description);\n\n\t\tReflect.set(this, 'description', description);\n\n\t\treturn this;\n\t}\n}\n", "import { ApplicationCommandOptionType } from 'discord-api-types/v9';\nimport { ApplicationCommandOptionWithChannelTypesBase } from '../mixins/CommandChannelOptionBase';\n\nexport class SlashCommandChannelOption extends ApplicationCommandOptionWithChannelTypesBase {\n\tpublic override readonly type = ApplicationCommandOptionType.Channel as const;\n\n\tpublic constructor() {\n\t\tsuper(ApplicationCommandOptionType.Channel);\n\t}\n}\n", "import { APIApplicationCommandChannelOptions, ApplicationCommandOptionType, ChannelType } from 'discord-api-types/v9';\nimport ow from 'ow';\nimport type { ToAPIApplicationCommandOptions } from '../../..';\nimport { SlashCommandOptionBase } from './CommandOptionBase';\n\n// Only allow valid channel types to be used. (This can't be dynamic because const enums are erased at runtime)\nconst allowedChannelTypes = [\n\tChannelType.GuildCategory,\n\tChannelType.GuildNews,\n\tChannelType.GuildNewsThread,\n\tChannelType.GuildStore,\n\tChannelType.GuildStageVoice,\n\tChannelType.GuildText,\n\tChannelType.GuildVoice,\n\tChannelType.GuildPublicThread,\n\tChannelType.GuildPrivateThread,\n];\n\nconst channelTypePredicate = ow.number.oneOf(allowedChannelTypes);\n\nexport abstract class ApplicationCommandOptionWithChannelTypesBase\n\textends SlashCommandOptionBase\n\timplements ToAPIApplicationCommandOptions\n{\n\tpublic channelTypes?: Exclude[];\n\n\t/**\n\t * Adds a channel type to this option\n\t *\n\t * @param channelType The type of channel to allow\n\t */\n\tpublic addChannelType(channelType: Exclude) {\n\t\tthis.channelTypes ??= [];\n\n\t\tow(channelType, 'channel type', channelTypePredicate);\n\t\tthis.channelTypes.push(channelType);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Adds channel types to this option\n\t *\n\t * @param channelTypes The channel types to add\n\t */\n\tpublic addChannelTypes(channelTypes: Exclude[]) {\n\t\tchannelTypes.forEach((channelType) => this.addChannelType(channelType));\n\t\treturn this;\n\t}\n\n\tpublic override toJSON(): APIApplicationCommandChannelOptions {\n\t\treturn {\n\t\t\t...super.toJSON(),\n\t\t\ttype: ApplicationCommandOptionType.Channel,\n\t\t\tchannel_types: this.channelTypes,\n\t\t};\n\t}\n}\n", "import { ApplicationCommandOptionType } from 'discord-api-types/v9';\nimport { ApplicationCommandOptionWithChoicesBase } from '../mixins/CommandOptionWithChoices';\n\nexport class SlashCommandIntegerOption extends ApplicationCommandOptionWithChoicesBase {\n\tpublic override readonly type = ApplicationCommandOptionType.Integer as const;\n\n\tpublic constructor() {\n\t\tsuper(ApplicationCommandOptionType.Integer);\n\t}\n}\n", "import { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from 'discord-api-types/v9';\nimport ow, { Predicate } from 'ow';\nimport { validateMaxChoicesLength } from '../Assertions';\nimport type { ToAPIApplicationCommandOptions } from '../SlashCommandBuilder';\nimport { SlashCommandOptionBase } from './CommandOptionBase';\n\nconst stringPredicate = ow.string.minLength(1).maxLength(100);\nconst integerPredicate = ow.number.finite;\n\n// TODO: See resolution for sindresorhus/ow#217 in relation to this cast\nconst choicesPredicate = ow.array.ofType<[string, string | number]>(\n\tow.array.exactShape([stringPredicate, ow.any(ow.string, integerPredicate) as unknown as Predicate]),\n);\n\nexport abstract class ApplicationCommandOptionWithChoicesBase\n\textends SlashCommandOptionBase\n\timplements ToAPIApplicationCommandOptions\n{\n\tpublic choices?: APIApplicationCommandOptionChoice[];\n\n\t/**\n\t * Adds a choice for this option\n\t *\n\t * @param name The name of the choice\n\t * @param value The value of the choice\n\t */\n\tpublic addChoice(name: string, value: T) {\n\t\tthis.choices ??= [];\n\n\t\tvalidateMaxChoicesLength(this.choices);\n\n\t\t// Validate name\n\t\tow(name, `${ApplicationCommandOptionTypeNames[this.type]} choice name`, stringPredicate);\n\n\t\t// Validate the value\n\t\tif (this.type === ApplicationCommandOptionType.String) ow(value, 'string choice value', stringPredicate);\n\t\telse ow(value, `${ApplicationCommandOptionTypeNames[this.type]} choice value`, integerPredicate);\n\n\t\tthis.choices.push({ name, value });\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Adds multiple choices for this option\n\t *\n\t * @param choices The choices to add\n\t */\n\tpublic addChoices(choices: [name: string, value: T][]) {\n\t\tow(choices, `${ApplicationCommandOptionTypeNames[this.type]} choices`, choicesPredicate);\n\n\t\tfor (const [label, value] of choices) this.addChoice(label, value);\n\t\treturn this;\n\t}\n\n\tpublic override toJSON() {\n\t\treturn {\n\t\t\t...super.toJSON(),\n\t\t\tchoices: this.choices,\n\t\t};\n\t}\n}\n\nconst ApplicationCommandOptionTypeNames = {\n\t[ApplicationCommandOptionType.Subcommand]: 'subcommand',\n\t[ApplicationCommandOptionType.SubcommandGroup]: 'subcommand group',\n\t[ApplicationCommandOptionType.String]: 'string',\n\t[ApplicationCommandOptionType.Integer]: 'integer',\n\t[ApplicationCommandOptionType.Boolean]: 'boolean',\n\t[ApplicationCommandOptionType.User]: 'user',\n\t[ApplicationCommandOptionType.Channel]: 'channel',\n\t[ApplicationCommandOptionType.Role]: 'role',\n\t[ApplicationCommandOptionType.Mentionable]: 'mentionable',\n\t[ApplicationCommandOptionType.Number]: 'number',\n} as const;\n", "import { ApplicationCommandOptionType } from 'discord-api-types/v9';\nimport { SlashCommandOptionBase } from '../mixins/CommandOptionBase';\n\nexport class SlashCommandMentionableOption extends SlashCommandOptionBase {\n\tpublic override readonly type = ApplicationCommandOptionType.Mentionable as const;\n\n\tpublic constructor() {\n\t\tsuper(ApplicationCommandOptionType.Mentionable);\n\t}\n}\n", "import { ApplicationCommandOptionType } from 'discord-api-types/v9';\nimport { ApplicationCommandOptionWithChoicesBase } from '../mixins/CommandOptionWithChoices';\n\nexport class SlashCommandNumberOption extends ApplicationCommandOptionWithChoicesBase {\n\tpublic override readonly type = ApplicationCommandOptionType.Number as const;\n\n\tpublic constructor() {\n\t\tsuper(ApplicationCommandOptionType.Number);\n\t}\n}\n", "import { ApplicationCommandOptionType } from 'discord-api-types/v9';\nimport { SlashCommandOptionBase } from '../mixins/CommandOptionBase';\n\nexport class SlashCommandRoleOption extends SlashCommandOptionBase {\n\tpublic override readonly type = ApplicationCommandOptionType.Role as const;\n\n\tpublic constructor() {\n\t\tsuper(ApplicationCommandOptionType.Role);\n\t}\n}\n", "import { ApplicationCommandOptionType } from 'discord-api-types/v9';\nimport { ApplicationCommandOptionWithChoicesBase } from '../mixins/CommandOptionWithChoices';\n\nexport class SlashCommandStringOption extends ApplicationCommandOptionWithChoicesBase {\n\tpublic override readonly type = ApplicationCommandOptionType.String as const;\n\n\tpublic constructor() {\n\t\tsuper(ApplicationCommandOptionType.String);\n\t}\n}\n", "import { ApplicationCommandOptionType } from 'discord-api-types/v9';\nimport { SlashCommandOptionBase } from '../mixins/CommandOptionBase';\n\nexport class SlashCommandUserOption extends SlashCommandOptionBase {\n\tpublic override readonly type = ApplicationCommandOptionType.User as const;\n\n\tpublic constructor() {\n\t\tsuper(ApplicationCommandOptionType.User);\n\t}\n}\n", "import { assertReturnOfBuilder, validateMaxOptionsLength } from '../Assertions';\nimport type { SlashCommandOptionBase } from './CommandOptionBase';\nimport { SlashCommandBooleanOption } from '../options/boolean';\nimport { SlashCommandChannelOption } from '../options/channel';\nimport { SlashCommandIntegerOption } from '../options/integer';\nimport { SlashCommandMentionableOption } from '../options/mentionable';\nimport { SlashCommandNumberOption } from '../options/number';\nimport { SlashCommandRoleOption } from '../options/role';\nimport { SlashCommandStringOption } from '../options/string';\nimport { SlashCommandUserOption } from '../options/user';\nimport type { ToAPIApplicationCommandOptions } from '../SlashCommandBuilder';\n\nexport class SharedSlashCommandOptions {\n\tpublic readonly options!: ToAPIApplicationCommandOptions[];\n\n\t/**\n\t * Adds a boolean option\n\t *\n\t * @param input A function that returns an option builder, or an already built builder\n\t */\n\tpublic addBooleanOption(\n\t\tinput: SlashCommandBooleanOption | ((builder: SlashCommandBooleanOption) => SlashCommandBooleanOption),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandBooleanOption);\n\t}\n\n\t/**\n\t * Adds a user option\n\t *\n\t * @param input A function that returns an option builder, or an already built builder\n\t */\n\tpublic addUserOption(input: SlashCommandUserOption | ((builder: SlashCommandUserOption) => SlashCommandUserOption)) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandUserOption);\n\t}\n\n\t/**\n\t * Adds a channel option\n\t *\n\t * @param input A function that returns an option builder, or an already built builder\n\t */\n\tpublic addChannelOption(\n\t\tinput: SlashCommandChannelOption | ((builder: SlashCommandChannelOption) => SlashCommandChannelOption),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandChannelOption);\n\t}\n\n\t/**\n\t * Adds a role option\n\t *\n\t * @param input A function that returns an option builder, or an already built builder\n\t */\n\tpublic addRoleOption(input: SlashCommandRoleOption | ((builder: SlashCommandRoleOption) => SlashCommandRoleOption)) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandRoleOption);\n\t}\n\n\t/**\n\t * Adds a mentionable option\n\t *\n\t * @param input A function that returns an option builder, or an already built builder\n\t */\n\tpublic addMentionableOption(\n\t\tinput: SlashCommandMentionableOption | ((builder: SlashCommandMentionableOption) => SlashCommandMentionableOption),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandMentionableOption);\n\t}\n\n\t/**\n\t * Adds a string option\n\t *\n\t * @param input A function that returns an option builder, or an already built builder\n\t */\n\tpublic addStringOption(\n\t\tinput: SlashCommandStringOption | ((builder: SlashCommandStringOption) => SlashCommandStringOption),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandStringOption);\n\t}\n\n\t/**\n\t * Adds an integer option\n\t *\n\t * @param input A function that returns an option builder, or an already built builder\n\t */\n\tpublic addIntegerOption(\n\t\tinput: SlashCommandIntegerOption | ((builder: SlashCommandIntegerOption) => SlashCommandIntegerOption),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandIntegerOption);\n\t}\n\n\t/**\n\t * Adds a number option\n\t *\n\t * @param input A function that returns an option builder, or an already built builder\n\t */\n\tpublic addNumberOption(\n\t\tinput: SlashCommandNumberOption | ((builder: SlashCommandNumberOption) => SlashCommandNumberOption),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandNumberOption);\n\t}\n\n\tprivate _sharedAddOptionMethod(\n\t\tinput: T | ((builder: T) => T),\n\t\tInstance: new () => T,\n\t): ShouldOmitSubcommandFunctions extends true ? Omit : this {\n\t\tconst { options } = this;\n\n\t\t// First, assert options conditions - we cannot have more than 25 options\n\t\tvalidateMaxOptionsLength(options);\n\n\t\t// Get the final result\n\t\tconst result = typeof input === 'function' ? input(new Instance()) : input;\n\n\t\tassertReturnOfBuilder(result, Instance);\n\n\t\t// Push it\n\t\toptions.push(result);\n\n\t\treturn this;\n\t}\n}\n", "import { APIApplicationCommandSubCommandOptions, ApplicationCommandOptionType } from 'discord-api-types/v9';\nimport { mix } from 'ts-mixer';\nimport { assertReturnOfBuilder, validateMaxOptionsLength, validateRequiredParameters } from './Assertions';\nimport { SharedSlashCommandOptions } from './mixins/CommandOptions';\nimport { SharedNameAndDescription } from './mixins/NameAndDescription';\nimport type { ToAPIApplicationCommandOptions } from './SlashCommandBuilder';\n\n/**\n * Represents a folder for subcommands\n *\n * For more information, go to https://discord.com/developers/docs/interactions/slash-commands#subcommands-and-subcommand-groups\n */\n@mix(SharedNameAndDescription)\nexport class SlashCommandSubcommandGroupBuilder implements ToAPIApplicationCommandOptions {\n\t/**\n\t * The name of this subcommand group\n\t */\n\tpublic readonly name: string = undefined!;\n\n\t/**\n\t * The description of this subcommand group\n\t */\n\tpublic readonly description: string = undefined!;\n\n\t/**\n\t * The subcommands part of this subcommand group\n\t */\n\tpublic readonly options: ToAPIApplicationCommandOptions[] = [];\n\n\t/**\n\t * Adds a new subcommand to this group\n\t *\n\t * @param input A function that returns a subcommand builder, or an already built builder\n\t */\n\tpublic addSubcommand(\n\t\tinput:\n\t\t\t| SlashCommandSubcommandBuilder\n\t\t\t| ((subcommandGroup: SlashCommandSubcommandBuilder) => SlashCommandSubcommandBuilder),\n\t) {\n\t\tconst { options } = this;\n\n\t\t// First, assert options conditions - we cannot have more than 25 options\n\t\tvalidateMaxOptionsLength(options);\n\n\t\t// Get the final result\n\t\tconst result = typeof input === 'function' ? input(new SlashCommandSubcommandBuilder()) : input;\n\n\t\tassertReturnOfBuilder(result, SlashCommandSubcommandBuilder);\n\n\t\t// Push it\n\t\toptions.push(result);\n\n\t\treturn this;\n\t}\n\n\tpublic toJSON(): APIApplicationCommandSubCommandOptions {\n\t\tvalidateRequiredParameters(this.name, this.description, this.options);\n\t\treturn {\n\t\t\ttype: ApplicationCommandOptionType.SubcommandGroup,\n\t\t\tname: this.name,\n\t\t\tdescription: this.description,\n\t\t\toptions: this.options.map((option) => option.toJSON()),\n\t\t};\n\t}\n}\n\nexport interface SlashCommandSubcommandGroupBuilder extends SharedNameAndDescription {}\n\n/**\n * Represents a subcommand\n *\n * For more information, go to https://discord.com/developers/docs/interactions/slash-commands#subcommands-and-subcommand-groups\n */\n@mix(SharedNameAndDescription, SharedSlashCommandOptions)\nexport class SlashCommandSubcommandBuilder implements ToAPIApplicationCommandOptions {\n\t/**\n\t * The name of this subcommand\n\t */\n\tpublic readonly name: string = undefined!;\n\n\t/**\n\t * The description of this subcommand\n\t */\n\tpublic readonly description: string = undefined!;\n\n\t/**\n\t * The options of this subcommand\n\t */\n\tpublic readonly options: ToAPIApplicationCommandOptions[] = [];\n\n\tpublic toJSON(): APIApplicationCommandSubCommandOptions {\n\t\tvalidateRequiredParameters(this.name, this.description, this.options);\n\t\treturn {\n\t\t\ttype: ApplicationCommandOptionType.Subcommand,\n\t\t\tname: this.name,\n\t\t\tdescription: this.description,\n\t\t\toptions: this.options.map((option) => option.toJSON()),\n\t\t};\n\t}\n}\n\nexport interface SlashCommandSubcommandBuilder extends SharedNameAndDescription, SharedSlashCommandOptions {}\n", "import ow from 'ow';\nimport { ApplicationCommandType } from 'discord-api-types/v9';\nimport type { ContextMenuCommandType } from './ContextMenuCommandBuilder';\n\nexport function validateRequiredParameters(name: string, type: number) {\n\t// Assert name matches all conditions\n\tvalidateName(name);\n\n\t// Assert type is valid\n\tvalidateType(type);\n}\n\nconst namePredicate = ow.string\n\t.minLength(1)\n\t.maxLength(32)\n\t.matches(/^( *[\\p{L}\\p{N}_-]+ *)+$/u);\n\nexport function validateName(name: unknown): asserts name is string {\n\tow(name, 'name', namePredicate);\n}\n\nconst typePredicate = ow.number.oneOf([ApplicationCommandType.User, ApplicationCommandType.Message]);\n\nexport function validateType(type: unknown): asserts type is ContextMenuCommandType {\n\tow(type, 'type', typePredicate);\n}\n\nconst defaultPermissionPredicate = ow.boolean;\n\nexport function validateDefaultPermission(value: unknown): asserts value is boolean {\n\tow(value, 'default_permission', defaultPermissionPredicate);\n}\n", "import { validateRequiredParameters, validateName, validateType, validateDefaultPermission } from './Assertions';\nimport type { ApplicationCommandType, RESTPostAPIApplicationCommandsJSONBody } from 'discord-api-types/v9';\n\nexport class ContextMenuCommandBuilder {\n\t/**\n\t * The name of this context menu command\n\t */\n\tpublic readonly name: string = undefined!;\n\n\t/**\n\t * The type of this context menu command\n\t */\n\tpublic readonly type: ContextMenuCommandType = undefined!;\n\n\t/**\n\t * Whether the command is enabled by default when the app is added to a guild\n\t *\n\t * @default true\n\t */\n\tpublic readonly defaultPermission: boolean | undefined = undefined;\n\n\t/**\n\t * Sets the name\n\t *\n\t * @param name The name\n\t */\n\tpublic setName(name: string) {\n\t\t// Assert the name matches the conditions\n\t\tvalidateName(name);\n\n\t\tReflect.set(this, 'name', name);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the type\n\t *\n\t * @param type The type\n\t */\n\tpublic setType(type: ContextMenuCommandType) {\n\t\t// Assert the type is valid\n\t\tvalidateType(type);\n\n\t\tReflect.set(this, 'type', type);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets whether the command is enabled by default when the application is added to a guild.\n\t *\n\t * **Note**: If set to `false`, you will have to later `PUT` the permissions for this command.\n\t *\n\t * @param value Whether or not to enable this command by default\n\t *\n\t * @see https://discord.com/developers/docs/interactions/application-commands#permissions\n\t */\n\tpublic setDefaultPermission(value: boolean) {\n\t\t// Assert the value matches the conditions\n\t\tvalidateDefaultPermission(value);\n\n\t\tReflect.set(this, 'defaultPermission', value);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Returns the final data that should be sent to Discord.\n\t *\n\t * **Note:** Calling this function will validate required properties based on their conditions.\n\t */\n\tpublic toJSON(): RESTPostAPIApplicationCommandsJSONBody {\n\t\tvalidateRequiredParameters(this.name, this.type);\n\t\treturn {\n\t\t\tname: this.name,\n\t\t\ttype: this.type,\n\t\t\tdefault_permission: this.defaultPermission,\n\t\t};\n\t}\n}\n\nexport type ContextMenuCommandType = ApplicationCommandType.User | ApplicationCommandType.Message;\n"], - "mappings": "mcAAA,0VACA,kBAEO,GAAM,GAAqB,EAAG,OAAO,UAAU,GAAG,UAAU,KAEtD,EAAsB,EAAG,OAAO,UAAU,GAAG,UAAU,MAEvD,EAAuB,EAAG,SAAS,QAEnC,GAAsB,EAAG,OAAO,WAAW,CACvD,KAAM,EACN,MAAO,EACP,OAAQ,IAGI,EAA4B,EAAG,MAAM,OAAO,IAElD,WAA6B,EAAyB,EAA4B,CACxF,EAAG,EAAO,OAAS,EAAc,eAAgB,EAAG,OAAO,gBAAgB,KAGrE,GAAM,GAAsB,EAAG,IAAI,EAAoB,EAAG,MAEpD,EAAe,EAAG,IAAI,EAAG,OAAO,IAAK,EAAG,iBAExC,EAAiB,EAAG,IAAI,EAAG,OAAO,mBAAmB,GAAG,gBAAgB,UAAW,EAAG,MAEtF,EAAuB,EAAG,IAAI,EAAG,OAAO,UAAU,GAAG,UAAU,MAAO,EAAG,MAEzE,EAAsB,EAAG,IAAI,EAAG,OAAO,UAAU,GAAG,UAAU,MAAO,EAAG,MAExE,EAAqB,EAAG,IAAI,EAAG,OAAQ,EAAG,KAAM,EAAG,MAEnD,EAAiB,EAAG,IAAI,EAAoB,EAAG,MCvB5D,kBA8BO,WAAgC,CA6D/B,YAAY,EAAiB,GAAI,CAzDjC,iBAKA,gBAKA,sBAKA,cAKA,gBAKA,oBAKA,oBAKA,gBAKA,gBAKA,i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CAAE,WAAY,KAGpB,EAAyB,GAGzB,GAAM,GAAS,MAAO,IAAU,WAAa,EAAM,GAAI,IAAmC,EAE1F,SAAsB,EAAQ,GAG9B,EAAQ,KAAK,GAEN,OAzGF,MADN,GAAI,EAA2B,IACzB,IebP,6IACA,+DAGO,YAAoC,EAAc,EAAc,CAEtE,EAAa,GAGb,EAAa,GAGd,GAAM,IAAgB,EAAG,OACvB,UAAU,GACV,UAAU,IACV,QAAQ,6BAEH,WAAsB,EAAuC,CACnE,EAAG,EAAM,OAAQ,IAGlB,GAAM,IAAgB,EAAG,OAAO,MAAM,CAAC,GAAuB,KAAM,GAAuB,UAEpF,WAAsB,EAAuD,CACnF,EAAG,EAAM,OAAQ,IAGlB,GAAM,IAA6B,EAAG,QAE/B,YAAmC,EAA0C,CACnF,EAAG,EAAO,qBAAsB,IC3B1B,YAAgC,CAAhC,aAHP,CAOiB,eAKA,eAOA,4BAOT,QAAQ,EAAc,CAE5B,SAAa,GAEb,QAAQ,IAAI,KAAM,OAAQ,GAEnB,KAQD,QAAQ,EAA8B,CAE5C,SAAa,GAEb,QAAQ,IAAI,KAAM,OAAQ,GAEnB,KAYD,qBAAqB,EAAgB,CAE3C,UAA0B,GAE1B,QAAQ,IAAI,KAAM,oBAAqB,GAEhC,KAQD,QAAiD,CACvD,UAA2B,KAAK,KAAM,KAAK,MACpC,CACN,KAAM,KAAK,KACX,KAAM,KAAK,KACX,mBAAoB,KAAK", - "names": [] -} diff --git a/node_modules/@discordjs/builders/dist/interactions/slashCommands/Assertions.d.ts b/node_modules/@discordjs/builders/dist/interactions/slashCommands/Assertions.d.ts new file mode 100644 index 0000000..fdc110a --- /dev/null +++ b/node_modules/@discordjs/builders/dist/interactions/slashCommands/Assertions.d.ts @@ -0,0 +1,12 @@ +import type { APIApplicationCommandOptionChoice } from 'discord-api-types/v9'; +import type { SlashCommandOptionBase } from './mixins/CommandOptionBase'; +import type { ToAPIApplicationCommandOptions } from './SlashCommandBuilder'; +import type { SlashCommandSubcommandBuilder, SlashCommandSubcommandGroupBuilder } from './SlashCommandSubcommands'; +export declare function validateRequiredParameters(name: string, description: string, options: ToAPIApplicationCommandOptions[]): void; +export declare function validateName(name: unknown): asserts name is string; +export declare function validateDescription(description: unknown): asserts description is string; +export declare function validateDefaultPermission(value: unknown): asserts value is boolean; +export declare function validateMaxOptionsLength(options: unknown): asserts options is ToAPIApplicationCommandOptions[]; +export declare function validateMaxChoicesLength(choices: APIApplicationCommandOptionChoice[]): void; +export declare function assertReturnOfBuilder(input: unknown, ExpectedInstanceOf: new () => T): asserts input is T; +//# sourceMappingURL=Assertions.d.ts.map \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/interactions/slashCommands/Assertions.d.ts.map b/node_modules/@discordjs/builders/dist/interactions/slashCommands/Assertions.d.ts.map new file mode 100644 index 0000000..b7eadbd --- /dev/null +++ b/node_modules/@discordjs/builders/dist/interactions/slashCommands/Assertions.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Assertions.d.ts","sourceRoot":"/","sources":["interactions/slashCommands/Assertions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,sBAAsB,CAAC;AAE9E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,uBAAuB,CAAC;AAC5E,OAAO,KAAK,EAAE,6BAA6B,EAAE,kCAAkC,EAAE,MAAM,2BAA2B,CAAC;AAEnH,wBAAgB,0BAA0B,CACzC,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,8BAA8B,EAAE,QAUzC;AAUD,wBAAgB,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,IAAI,MAAM,CAElE;AAID,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,OAAO,GAAG,OAAO,CAAC,WAAW,IAAI,MAAM,CAEvF;AAID,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,KAAK,IAAI,OAAO,CAElF;AAID,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,8BAA8B,EAAE,CAE9G;AAED,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,iCAAiC,EAAE,QAEpF;AAED,wBAAgB,qBAAqB,CACpC,CAAC,SAAS,sBAAsB,GAAG,6BAA6B,GAAG,kCAAkC,EACpG,KAAK,EAAE,OAAO,EAAE,kBAAkB,EAAE,UAAU,CAAC,GAAG,OAAO,CAAC,KAAK,IAAI,CAAC,CAuBrE"} \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/interactions/slashCommands/Assertions.js b/node_modules/@discordjs/builders/dist/interactions/slashCommands/Assertions.js new file mode 100644 index 0000000..b632ad1 --- /dev/null +++ b/node_modules/@discordjs/builders/dist/interactions/slashCommands/Assertions.js @@ -0,0 +1,63 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.assertReturnOfBuilder = exports.validateMaxChoicesLength = exports.validateMaxOptionsLength = exports.validateDefaultPermission = exports.validateDescription = exports.validateName = exports.validateRequiredParameters = void 0; +const tslib_1 = require("tslib"); +const is_1 = tslib_1.__importDefault(require("@sindresorhus/is")); +const ow_1 = tslib_1.__importDefault(require("ow")); +function validateRequiredParameters(name, description, options) { + // Assert name matches all conditions + validateName(name); + // Assert description conditions + validateDescription(description); + // Assert options conditions + validateMaxOptionsLength(options); +} +exports.validateRequiredParameters = validateRequiredParameters; +const namePredicate = ow_1.default.string.lowercase + .minLength(1) + .maxLength(32) + .addValidator({ + message: (value, label) => `Expected ${label} to match "^[\\p{L}\\p{N}_-]+$", got ${value} instead`, + validator: (value) => /^[\p{L}\p{N}_-]+$/u.test(value), +}); +function validateName(name) { + ow_1.default(name, 'name', namePredicate); +} +exports.validateName = validateName; +const descriptionPredicate = ow_1.default.string.minLength(1).maxLength(100); +function validateDescription(description) { + ow_1.default(description, 'description', descriptionPredicate); +} +exports.validateDescription = validateDescription; +const defaultPermissionPredicate = ow_1.default.boolean; +function validateDefaultPermission(value) { + ow_1.default(value, 'default_permission', defaultPermissionPredicate); +} +exports.validateDefaultPermission = validateDefaultPermission; +const maxArrayLengthPredicate = ow_1.default.array.maxLength(25); +function validateMaxOptionsLength(options) { + ow_1.default(options, 'options', maxArrayLengthPredicate); +} +exports.validateMaxOptionsLength = validateMaxOptionsLength; +function validateMaxChoicesLength(choices) { + ow_1.default(choices, 'choices', maxArrayLengthPredicate); +} +exports.validateMaxChoicesLength = validateMaxChoicesLength; +function assertReturnOfBuilder(input, ExpectedInstanceOf) { + const instanceName = ExpectedInstanceOf.name; + if (is_1.default.nullOrUndefined(input)) { + throw new TypeError(`Expected to receive a ${instanceName} builder, got ${input === null ? 'null' : 'undefined'} instead.`); + } + if (is_1.default.primitive(input)) { + throw new TypeError(`Expected to receive a ${instanceName} builder, got a primitive (${typeof input}) instead.`); + } + if (!(input instanceof ExpectedInstanceOf)) { + const casted = input; + const constructorName = is_1.default.function_(input) ? input.name : casted.constructor.name; + const stringTag = Reflect.get(casted, Symbol.toStringTag); + const fullResultName = stringTag ? `${constructorName} [${stringTag}]` : constructorName; + throw new TypeError(`Expected to receive a ${instanceName} builder, got ${fullResultName} instead.`); + } +} +exports.assertReturnOfBuilder = assertReturnOfBuilder; +//# sourceMappingURL=Assertions.js.map \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/interactions/slashCommands/Assertions.js.map b/node_modules/@discordjs/builders/dist/interactions/slashCommands/Assertions.js.map new file mode 100644 index 0000000..205c774 --- /dev/null +++ b/node_modules/@discordjs/builders/dist/interactions/slashCommands/Assertions.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Assertions.js","sourceRoot":"/","sources":["interactions/slashCommands/Assertions.ts"],"names":[],"mappings":";;;;AAAA,kEAAkC;AAElC,oDAAoB;AAKpB,SAAgB,0BAA0B,CACzC,IAAY,EACZ,WA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AC;AACjD,CAAC;AAFD,4DAEC;AAED,SAAgB,wBAAwB,CAAC,OAA4C;IACpF,YAAE,CAAC,OAAO,EAAE,SAAS,EAAE,uBAAuB,CAAC,CAAC;AACjD,CAAC;AAFD,4DAEC;AAED,SAAgB,qBAAqB,CAEnC,KAAc,EAAE,kBAA+B;IAChD,MAAM,YAAY,GAAG,kBAAkB,CAAC,IAAI,CAAC;IAE7C,IAAI,YAAE,CAAC,eAAe,CAAC,KAAK,CAAC,EAAE;QAC9B,MAAM,IAAI,SAAS,CAClB,yBAAyB,YAAY,iBAAiB,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,WAAW,WAAW,CACtG,CAAC;KACF;IAED,IAAI,YAAE,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE;QACxB,MAAM,IAAI,SAAS,CAAC,yBAAyB,YAAY,8BAA8B,OAAO,KAAK,YAAY,CAAC,CAAC;KACjH;IAED,IAAI,CAAC,CAAC,KAAK,YAAY,kBAAkB,CAAC,EAAE;QAC3C,MAAM,MAAM,GAAG,KAAqC,CAAC;QAErD,MAAM,eAAe,GAAG,YAAE,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC;QACnF,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,WAAW,CAAuB,CAAC;QAEhF,MAAM,cAAc,GAAG,SAAS,CAAC,CAAC,CAAC,GAAG,eAAe,KAAK,SAAS,GAAG,CAAC,CAAC,CAAC,eAAe,CAAC;QAEzF,MAAM,IAAI,SAAS,CAAC,yBAAyB,YAAY,iBAAiB,cAAc,WAAW,CAAC,CAAC;KACrG;AACF,CAAC;AAzBD,sDAyBC","sourcesContent":["import is from '@sindresorhus/is';\nimport type { APIApplicationCommandOptionChoice } from 'discord-api-types/v9';\nimport ow from 'ow';\nimport type { SlashCommandOptionBase } from './mixins/CommandOptionBase';\nimport type { ToAPIApplicationCommandOptions } from './SlashCommandBuilder';\nimport type { SlashCommandSubcommandBuilder, SlashCommandSubcommandGroupBuilder } from './SlashCommandSubcommands';\n\nexport function validateRequiredParameters(\n\tname: string,\n\tdescription: string,\n\toptions: ToAPIApplicationCommandOptions[],\n) {\n\t// Assert name matches all conditions\n\tvalidateName(name);\n\n\t// Assert description conditions\n\tvalidateDescription(description);\n\n\t// Assert options conditions\n\tvalidateMaxOptionsLength(options);\n}\n\nconst namePredicate = ow.string.lowercase\n\t.minLength(1)\n\t.maxLength(32)\n\t.addValidator({\n\t\tmessage: (value, label) => `Expected ${label!} to match \"^[\\\\p{L}\\\\p{N}_-]+$\", got ${value} instead`,\n\t\tvalidator: (value) => /^[\\p{L}\\p{N}_-]+$/u.test(value),\n\t});\n\nexport function validateName(name: unknown): asserts name is string {\n\tow(name, 'name', namePredicate);\n}\n\nconst descriptionPredicate = ow.string.minLength(1).maxLength(100);\n\nexport function validateDescription(description: unknown): asserts description is string {\n\tow(description, 'description', descriptionPredicate);\n}\n\nconst defaultPermissionPredicate = ow.boolean;\n\nexport function validateDefaultPermission(value: unknown): asserts value is boolean {\n\tow(value, 'default_permission', defaultPermissionPredicate);\n}\n\nconst maxArrayLengthPredicate = ow.array.maxLength(25);\n\nexport function validateMaxOptionsLength(options: unknown): asserts options is ToAPIApplicationCommandOptions[] {\n\tow(options, 'options', maxArrayLengthPredicate);\n}\n\nexport function validateMaxChoicesLength(choices: APIApplicationCommandOptionChoice[]) {\n\tow(choices, 'choices', maxArrayLengthPredicate);\n}\n\nexport function assertReturnOfBuilder<\n\tT extends SlashCommandOptionBase | SlashCommandSubcommandBuilder | SlashCommandSubcommandGroupBuilder,\n>(input: unknown, ExpectedInstanceOf: new () => T): asserts input is T {\n\tconst instanceName = ExpectedInstanceOf.name;\n\n\tif (is.nullOrUndefined(input)) {\n\t\tthrow new TypeError(\n\t\t\t`Expected to receive a ${instanceName} builder, got ${input === null ? 'null' : 'undefined'} instead.`,\n\t\t);\n\t}\n\n\tif (is.primitive(input)) {\n\t\tthrow new TypeError(`Expected to receive a ${instanceName} builder, got a primitive (${typeof input}) instead.`);\n\t}\n\n\tif (!(input instanceof ExpectedInstanceOf)) {\n\t\tconst casted = input as Record;\n\n\t\tconst constructorName = is.function_(input) ? input.name : casted.constructor.name;\n\t\tconst stringTag = Reflect.get(casted, Symbol.toStringTag) as string | undefined;\n\n\t\tconst fullResultName = stringTag ? `${constructorName} [${stringTag}]` : constructorName;\n\n\t\tthrow new TypeError(`Expected to receive a ${instanceName} builder, got ${fullResultName} instead.`);\n\t}\n}\n"]} \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/interactions/slashCommands/SlashCommandBuilder.d.ts b/node_modules/@discordjs/builders/dist/interactions/slashCommands/SlashCommandBuilder.d.ts new file mode 100644 index 0000000..1838748 --- /dev/null +++ b/node_modules/@discordjs/builders/dist/interactions/slashCommands/SlashCommandBuilder.d.ts @@ -0,0 +1,63 @@ +import type { APIApplicationCommandOption } from 'discord-api-types/v9'; +import { SharedSlashCommandOptions } from './mixins/CommandOptions'; +import { SharedNameAndDescription } from './mixins/NameAndDescription'; +import { SlashCommandSubcommandBuilder, SlashCommandSubcommandGroupBuilder } from './SlashCommandSubcommands'; +export declare class SlashCommandBuilder { + /** + * The name of this slash command + */ + readonly name: string; + /** + * The description of this slash command + */ + readonly description: string; + /** + * The options of this slash command + */ + readonly options: ToAPIApplicationCommandOptions[]; + /** + * Whether the command is enabled by default when the app is added to a guild + * @default true + */ + readonly defaultPermission: boolean | undefined; + /** + * Returns the final data that should be sent to Discord. + * + * **Note:** Calling this function will validate required properties based on their conditions. + */ + toJSON(): { + name: string; + description: string; + options: APIApplicationCommandOption[]; + default_permission: boolean | undefined; + }; + /** + * Sets whether the command is enabled by default when the application is added to a guild. + * + * **Note**: If set to `false`, you will have to later have to `PUT` the permissions for this command. + * @param value Whether or not to enable this command by default + * + * @see https://discord.com/developers/docs/interactions/slash-commands#permissions + */ + setDefaultPermission(value: boolean): this; + /** + * 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)): SlashCommandSubcommandsOnlyBuilder; + /** + * 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)): SlashCommandSubcommandsOnlyBuilder; +} +export interface SlashCommandBuilder extends SharedNameAndDescription, SharedSlashCommandOptions { +} +export interface SlashCommandSubcommandsOnlyBuilder extends SharedNameAndDescription, Pick { +} +export interface SlashCommandOptionsOnlyBuilder extends SharedNameAndDescription, SharedSlashCommandOptions, Pick { +} +export interface ToAPIApplicationCommandOptions { + toJSON(): APIApplicationCommandOption; +} +//# sourceMappingURL=SlashCommandBuilder.d.ts.map \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/interactions/slashCommands/SlashCommandBuilder.d.ts.map b/node_modules/@discordjs/builders/dist/interactions/slashCommands/SlashCommandBuilder.d.ts.map new file mode 100644 index 0000000..356c1fb --- /dev/null +++ b/node_modules/@discordjs/builders/dist/interactions/slashCommands/SlashCommandBuilder.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"SlashCommandBuilder.d.ts","sourceRoot":"/","sources":["interactions/slashCommands/SlashCommandBuilder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AAQxE,OAAO,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AACvE,OAAO,EAAE,6BAA6B,EAAE,kCAAkC,EAAE,MAAM,2BAA2B,CAAC;AAE9G,qBACa,mBAAmB;IAC/B;;OAEG;IACH,SAAgB,IAAI,EAAE,MAAM,CAAc;IAE1C;;OAEG;IACH,SAAgB,WAAW,EAAE,MAAM,CAAc;IAEjD;;OAEG;IACH,SAAgB,OAAO,EAAE,8BAA8B,EAAE,CAAM;IAE/D;;;OAGG;IACH,SAAgB,iBAAiB,EAAE,OAAO,GAAG,SAAS,CAAa;IAEnE;;;;OAIG;IACI,MAAM;;;;;;IAUb;;;;;;;OAOG;IACI,oBAAoB,CAAC,KAAK,EAAE,OAAO;IAS1C;;;OAGG;IACI,kBAAkB,CACxB,KAAK,EACF,kCAAkC,GAClC,CAAC,CAAC,eAAe,EAAE,kCAAkC,KAAK,kCAAkC,CAAC,GAC9F,kCAAkC;IAiBrC;;;OAGG;IACI,aAAa,CACnB,KAAK,EACF,6BAA6B,GAC7B,CAAC,CAAC,eAAe,EAAE,6BAA6B,KAAK,6BAA6B,CAAC,GACpF,kCAAkC;CAgBrC;AAED,MAAM,WAAW,mBAAoB,SAAQ,wBAAwB,EAAE,yBAAyB;CAAG;AAEnG,MAAM,WAAW,kCAChB,SAAQ,wBAAwB,EAC/B,IAAI,CAAC,mBAAmB,EAAE,QAAQ,GAAG,eAAe,GAAG,oBAAoB,CAAC;CAAG;AAEjF,MAAM,WAAW,8BAChB,SAAQ,wBAAwB,EAC/B,yBAAyB,EACzB,IAAI,CAAC,mBAAmB,EAAE,QAAQ,CAAC;CAAG;AAExC,MAAM,WAAW,8BAA8B;IAC9C,MAAM,IAAI,2BAA2B,CAAC;CACtC"} \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/interactions/slashCommands/SlashCommandBuilder.js b/node_modules/@discordjs/builders/dist/interactions/slashCommands/SlashCommandBuilder.js new file mode 100644 index 0000000..03851e0 --- /dev/null +++ b/node_modules/@discordjs/builders/dist/interactions/slashCommands/SlashCommandBuilder.js @@ -0,0 +1,113 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SlashCommandBuilder = void 0; +const tslib_1 = require("tslib"); +const ts_mixer_1 = require("ts-mixer"); +const Assertions_1 = require("./Assertions"); +const CommandOptions_1 = require("./mixins/CommandOptions"); +const NameAndDescription_1 = require("./mixins/NameAndDescription"); +const SlashCommandSubcommands_1 = require("./SlashCommandSubcommands"); +let SlashCommandBuilder = class SlashCommandBuilder { + constructor() { + /** + * The name of this slash command + */ + Object.defineProperty(this, "name", { + enumerable: true, + configurable: true, + writable: true, + value: undefined + }); + /** + * The description of this slash command + */ + Object.defineProperty(this, "description", { + enumerable: true, + configurable: true, + writable: true, + value: undefined + }); + /** + * The options of this slash command + */ + Object.defineProperty(this, "options", { + enumerable: true, + configurable: true, + writable: true, + value: [] + }); + /** + * Whether the command is enabled by default when the app is added to a guild + * @default true + */ + Object.defineProperty(this, "defaultPermission", { + enumerable: true, + configurable: true, + writable: true, + value: undefined + }); + } + /** + * Returns the final data that should be sent to Discord. + * + * **Note:** Calling this function will validate required properties based on their conditions. + */ + toJSON() { + Assertions_1.validateRequiredParameters(this.name, this.description, this.options); + return { + name: this.name, + description: this.description, + options: this.options.map((option) => option.toJSON()), + default_permission: this.defaultPermission, + }; + } + /** + * Sets whether the command is enabled by default when the application is added to a guild. + * + * **Note**: If set to `false`, you will have to later have to `PUT` the permissions for this command. + * @param value Whether or not to enable this command by default + * + * @see https://discord.com/developers/docs/interactions/slash-commands#permissions + */ + setDefaultPermission(value) { + // Assert the value matches the conditions + Assertions_1.validateDefaultPermission(value); + Reflect.set(this, 'defaultPermission', value); + return this; + } + /** + * 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; + // First, assert options conditions - we cannot have more than 25 options + Assertions_1.validateMaxOptionsLength(options); + // Get the final result + const result = typeof input === 'function' ? input(new SlashCommandSubcommands_1.SlashCommandSubcommandGroupBuilder()) : input; + Assertions_1.assertReturnOfBuilder(result, SlashCommandSubcommands_1.SlashCommandSubcommandGroupBuilder); + // Push it + 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; + // First, assert options conditions - we cannot have more than 25 options + Assertions_1.validateMaxOptionsLength(options); + // Get the final result + const result = typeof input === 'function' ? input(new SlashCommandSubcommands_1.SlashCommandSubcommandBuilder()) : input; + Assertions_1.assertReturnOfBuilder(result, SlashCommandSubcommands_1.SlashCommandSubcommandBuilder); + // Push it + options.push(result); + return this; + } +}; +SlashCommandBuilder = tslib_1.__decorate([ + ts_mixer_1.mix(CommandOptions_1.SharedSlashCommandOptions, NameAndDescription_1.SharedNameAndDescription) +], SlashCommandBuilder); +exports.SlashCommandBuilder = SlashCommandBuilder; +//# sourceMappingURL=SlashCommandBuilder.js.map \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/interactions/slashCommands/SlashCommandBuilder.js.map b/node_modules/@discordjs/builders/dist/interactions/slashCommands/SlashCommandBuilder.js.map new file mode 100644 index 0000000..628e5af --- /dev/null +++ b/node_modules/@discordjs/builders/dist/interactions/slashCommands/SlashCommandBuilder.js.map @@ -0,0 +1 @@ +{"version":3,"file":"SlashCommandBuilder.js","sourceRoot":"/","sources":["interactions/slashCommands/SlashCommandBuilder.ts"],"names":[],"mappings":";;;;AACA,uCAA+B;AAC/B,6CAKsB;AACtB,4DAAoE;AACpE,oEAAuE;AACvE,uEAA8G;AAG9G,IAAa,mBAAmB,GAAhC,MAAa,mBAAmB;IAAhC;QACC;;WAEG;QACH;;;;mBAA+B,SAAU;WAAC;QAE1C;;WAEG;QACH;;;;mBAAsC,SAAU;WAAC;QAEjD;;WAEG;QACH;;;;mBAA4D,EAAE;WAAC;QAE/D;;;WAGG;QACH;;;;mBAAyD,SAAS;WAAC;IAmFpE,CAAC;IAjFA;;;;OAIG;IACI,MAAM;QACZ,uCAA0B,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QACtE,OAAO;YACN,IAAI,EAAE,IAAI,C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QACV,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAErB,OAAO,IAAI,CAAC;IACb,CAAC;CACD,CAAA;AAvGY,mBAAmB;IAD/B,cAAG,CAAC,0CAAyB,EAAE,6CAAwB,CAAC;GAC5C,mBAAmB,CAuG/B;AAvGY,kDAAmB","sourcesContent":["import type { APIApplicationCommandOption } from 'discord-api-types/v9';\nimport { mix } from 'ts-mixer';\nimport {\n\tassertReturnOfBuilder,\n\tvalidateDefaultPermission,\n\tvalidateMaxOptionsLength,\n\tvalidateRequiredParameters,\n} from './Assertions';\nimport { SharedSlashCommandOptions } from './mixins/CommandOptions';\nimport { SharedNameAndDescription } from './mixins/NameAndDescription';\nimport { SlashCommandSubcommandBuilder, SlashCommandSubcommandGroupBuilder } from './SlashCommandSubcommands';\n\n@mix(SharedSlashCommandOptions, SharedNameAndDescription)\nexport class SlashCommandBuilder {\n\t/**\n\t * The name of this slash command\n\t */\n\tpublic readonly name: string = undefined!;\n\n\t/**\n\t * The description of this slash command\n\t */\n\tpublic readonly description: string = undefined!;\n\n\t/**\n\t * The options of this slash command\n\t */\n\tpublic readonly options: ToAPIApplicationCommandOptions[] = [];\n\n\t/**\n\t * Whether the command is enabled by default when the app is added to a guild\n\t * @default true\n\t */\n\tpublic readonly defaultPermission: boolean | undefined = undefined;\n\n\t/**\n\t * Returns the final data that should be sent to Discord.\n\t *\n\t * **Note:** Calling this function will validate required properties based on their conditions.\n\t */\n\tpublic toJSON() {\n\t\tvalidateRequiredParameters(this.name, this.description, this.options);\n\t\treturn {\n\t\t\tname: this.name,\n\t\t\tdescription: this.description,\n\t\t\toptions: this.options.map((option) => option.toJSON()),\n\t\t\tdefault_permission: this.defaultPermission,\n\t\t};\n\t}\n\n\t/**\n\t * Sets whether the command is enabled by default when the application is added to a guild.\n\t *\n\t * **Note**: If set to `false`, you will have to later have to `PUT` the permissions for this command.\n\t * @param value Whether or not to enable this command by default\n\t *\n\t * @see https://discord.com/developers/docs/interactions/slash-commands#permissions\n\t */\n\tpublic setDefaultPermission(value: boolean) {\n\t\t// Assert the value matches the conditions\n\t\tvalidateDefaultPermission(value);\n\n\t\tReflect.set(this, 'defaultPermission', value);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Adds a new subcommand group to this command\n\t * @param input A function that returns a subcommand group builder, or an already built builder\n\t */\n\tpublic addSubcommandGroup(\n\t\tinput:\n\t\t\t| SlashCommandSubcommandGroupBuilder\n\t\t\t| ((subcommandGroup: SlashCommandSubcommandGroupBuilder) => SlashCommandSubcommandGroupBuilder),\n\t): SlashCommandSubcommandsOnlyBuilder {\n\t\tconst { options } = this;\n\n\t\t// First, assert options conditions - we cannot have more than 25 options\n\t\tvalidateMaxOptionsLength(options);\n\n\t\t// Get the final result\n\t\tconst result = typeof input === 'function' ? input(new SlashCommandSubcommandGroupBuilder()) : input;\n\n\t\tassertReturnOfBuilder(result, SlashCommandSubcommandGroupBuilder);\n\n\t\t// Push it\n\t\toptions.push(result);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Adds a new subcommand to this command\n\t * @param input A function that returns a subcommand builder, or an already built builder\n\t */\n\tpublic addSubcommand(\n\t\tinput:\n\t\t\t| SlashCommandSubcommandBuilder\n\t\t\t| ((subcommandGroup: SlashCommandSubcommandBuilder) => SlashCommandSubcommandBuilder),\n\t): SlashCommandSubcommandsOnlyBuilder {\n\t\tconst { options } = this;\n\n\t\t// First, assert options conditions - we cannot have more than 25 options\n\t\tvalidateMaxOptionsLength(options);\n\n\t\t// Get the final result\n\t\tconst result = typeof input === 'function' ? input(new SlashCommandSubcommandBuilder()) : input;\n\n\t\tassertReturnOfBuilder(result, SlashCommandSubcommandBuilder);\n\n\t\t// Push it\n\t\toptions.push(result);\n\n\t\treturn this;\n\t}\n}\n\nexport interface SlashCommandBuilder extends SharedNameAndDescription, SharedSlashCommandOptions {}\n\nexport interface SlashCommandSubcommandsOnlyBuilder\n\textends SharedNameAndDescription,\n\t\tPick {}\n\nexport interface SlashCommandOptionsOnlyBuilder\n\textends SharedNameAndDescription,\n\t\tSharedSlashCommandOptions,\n\t\tPick {}\n\nexport interface ToAPIApplicationCommandOptions {\n\ttoJSON(): APIApplicationCommandOption;\n}\n"]} \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/interactions/slashCommands/SlashCommandSubcommands.d.ts b/node_modules/@discordjs/builders/dist/interactions/slashCommands/SlashCommandSubcommands.d.ts new file mode 100644 index 0000000..dff28bb --- /dev/null +++ b/node_modules/@discordjs/builders/dist/interactions/slashCommands/SlashCommandSubcommands.d.ts @@ -0,0 +1,64 @@ +import { ApplicationCommandOptionType } from 'discord-api-types/v9'; +import { SharedSlashCommandOptions } from './mixins/CommandOptions'; +import { SharedNameAndDescription } from './mixins/NameAndDescription'; +import type { ToAPIApplicationCommandOptions } from './SlashCommandBuilder'; +/** + * Represents a folder for subcommands + * + * For more information, go to https://discord.com/developers/docs/interactions/slash-commands#subcommands-and-subcommand-groups + */ +export 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 part of this subcommand group + */ + readonly options: ToAPIApplicationCommandOptions[]; + /** + * 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; + toJSON(): { + type: ApplicationCommandOptionType; + name: string; + description: string; + options: import("discord-api-types/v9").APIApplicationCommandOption[]; + }; +} +export interface SlashCommandSubcommandGroupBuilder extends SharedNameAndDescription { +} +/** + * Represents a subcommand + * + * For more information, go to https://discord.com/developers/docs/interactions/slash-commands#subcommands-and-subcommand-groups + */ +export declare class SlashCommandSubcommandBuilder implements ToAPIApplicationCommandOptions { + /** + * The name of this subcommand + */ + readonly name: string; + /** + * The description of this subcommand + */ + readonly description: string; + /** + * The options of this subcommand + */ + readonly options: ToAPIApplicationCommandOptions[]; + toJSON(): { + type: ApplicationCommandOptionType; + name: string; + description: string; + options: import("discord-api-types/v9").APIApplicationCommandOption[]; + }; +} +export interface SlashCommandSubcommandBuilder extends SharedNameAndDescription, SharedSlashCommandOptions { +} +//# sourceMappingURL=SlashCommandSubcommands.d.ts.map \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/interactions/slashCommands/SlashCommandSubcommands.d.ts.map b/node_modules/@discordjs/builders/dist/interactions/slashCommands/SlashCommandSubcommands.d.ts.map new file mode 100644 index 0000000..bdc2bb9 --- /dev/null +++ b/node_modules/@discordjs/builders/dist/interactions/slashCommands/SlashCommandSubcommands.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"SlashCommandSubcommands.d.ts","sourceRoot":"/","sources":["interactions/slashCommands/SlashCommandSubcommands.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAC;AAGpE,OAAO,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AACvE,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,uBAAuB,CAAC;AAE5E;;;;GAIG;AACH,qBACa,kCAAmC,YAAW,8BAA8B;IACxF;;OAEG;IACH,SAAgB,IAAI,EAAE,MAAM,CAAc;IAE1C;;OAEG;IACH,SAAgB,WAAW,EAAE,MAAM,CAAc;IAEjD;;OAEG;IACH,SAAgB,OAAO,EAAE,8BAA8B,EAAE,CAAM;IAE/D;;;OAGG;IACI,aAAa,CACnB,KAAK,EACF,6BAA6B,GAC7B,CAAC,CAAC,eAAe,EAAE,6BAA6B,KAAK,6BAA6B,CAAC;IAkBhF,MAAM;;;;;;CASb;AAED,MAAM,WAAW,kCAAmC,SAAQ,wBAAwB;CAAG;AAEvF;;;;GAIG;AACH,qBACa,6BAA8B,YAAW,8BAA8B;IACnF;;OAEG;IACH,SAAgB,IAAI,EAAE,MAAM,CAAc;IAE1C;;OAEG;IACH,SAAgB,WAAW,EAAE,MAAM,CAAc;IAEjD;;OAEG;IACH,SAAgB,OAAO,EAAE,8BAA8B,EAAE,CAAM;IAExD,MAAM;;;;;;CASb;AAED,MAAM,WAAW,6BAA8B,SAAQ,wBAAwB,EAAE,yBAAyB,CAAC,KAAK,CAAC;CAAG"} \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/interactions/slashCommands/SlashCommandSubcommands.js b/node_modules/@discordjs/builders/dist/interactions/slashCommands/SlashCommandSubcommands.js new file mode 100644 index 0000000..0bbb917 --- /dev/null +++ b/node_modules/@discordjs/builders/dist/interactions/slashCommands/SlashCommandSubcommands.js @@ -0,0 +1,123 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SlashCommandSubcommandBuilder = exports.SlashCommandSubcommandGroupBuilder = void 0; +const tslib_1 = require("tslib"); +require("discord-api-types/v9"); +const ts_mixer_1 = require("ts-mixer"); +const Assertions_1 = require("./Assertions"); +const CommandOptions_1 = require("./mixins/CommandOptions"); +const NameAndDescription_1 = require("./mixins/NameAndDescription"); +/** + * Represents a folder for subcommands + * + * For more information, go to https://discord.com/developers/docs/interactions/slash-commands#subcommands-and-subcommand-groups + */ +let SlashCommandSubcommandGroupBuilder = class SlashCommandSubcommandGroupBuilder { + constructor() { + /** + * The name of this subcommand group + */ + Object.defineProperty(this, "name", { + enumerable: true, + configurable: true, + writable: true, + value: undefined + }); + /** + * The description of this subcommand group + */ + Object.defineProperty(this, "description", { + enumerable: true, + configurable: true, + writable: true, + value: undefined + }); + /** + * The subcommands part of this subcommand group + */ + Object.defineProperty(this, "options", { + enumerable: true, + configurable: true, + writable: true, + value: [] + }); + } + /** + * 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; + // First, assert options conditions - we cannot have more than 25 options + Assertions_1.validateMaxOptionsLength(options); + // Get the final result + const result = typeof input === 'function' ? input(new SlashCommandSubcommandBuilder()) : input; + Assertions_1.assertReturnOfBuilder(result, SlashCommandSubcommandBuilder); + // Push it + options.push(result); + return this; + } + toJSON() { + Assertions_1.validateRequiredParameters(this.name, this.description, this.options); + return { + type: 2 /* SubcommandGroup */, + name: this.name, + description: this.description, + options: this.options.map((option) => option.toJSON()), + }; + } +}; +SlashCommandSubcommandGroupBuilder = tslib_1.__decorate([ + ts_mixer_1.mix(NameAndDescription_1.SharedNameAndDescription) +], SlashCommandSubcommandGroupBuilder); +exports.SlashCommandSubcommandGroupBuilder = SlashCommandSubcommandGroupBuilder; +/** + * Represents a subcommand + * + * For more information, go to https://discord.com/developers/docs/interactions/slash-commands#subcommands-and-subcommand-groups + */ +let SlashCommandSubcommandBuilder = class SlashCommandSubcommandBuilder { + constructor() { + /** + * The name of this subcommand + */ + Object.defineProperty(this, "name", { + enumerable: true, + configurable: true, + writable: true, + value: undefined + }); + /** + * The description of this subcommand + */ + Object.defineProperty(this, "description", { + enumerable: true, + configurable: true, + writable: true, + value: undefined + }); + /** + * The options of this subcommand + */ + Object.defineProperty(this, "options", { + enumerable: true, + configurable: true, + writable: true, + value: [] + }); + } + toJSON() { + Assertions_1.validateRequiredParameters(this.name, this.description, this.options); + return { + type: 1 /* Subcommand */, + name: this.name, + description: this.description, + options: this.options.map((option) => option.toJSON()), + }; + } +}; +SlashCommandSubcommandBuilder = tslib_1.__decorate([ + ts_mixer_1.mix(NameAndDescription_1.SharedNameAndDescription, CommandOptions_1.SharedSlashCommandOptions) +], SlashCommandSubcommandBuilder); +exports.SlashCommandSubcommandBuilder = SlashCommandSubcommandBuilder; +//# sourceMappingURL=SlashCommandSubcommands.js.map \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/interactions/slashCommands/SlashCommandSubcommands.js.map b/node_modules/@discordjs/builders/dist/interactions/slashCommands/SlashCommandSubcommands.js.map new file mode 100644 index 0000000..223a108 --- /dev/null +++ b/node_modules/@discordjs/builders/dist/interactions/slashCommands/SlashCommandSubcommands.js.map @@ -0,0 +1 @@ +{"version":3,"file":"SlashCommandSubcommands.js","sourceRoot":"/","sources":["interactions/slashCommands/SlashCommandSubcommands.ts"],"names":[],"mappings":";;;;AAAA,gCAAoE;AACpE,uCAA+B;AAC/B,6CAA2G;AAC3G,4DAAoE;AACpE,oEAAuE;AAGvE;;;;GAIG;AAEH,IAAa,kCAAkC,GAA/C,MAAa,kCAAkC;IAA/C;QACC;;WAEG;QACH;;;;mBAA+B,SAAU;WAAC;QAE1C;;WAEG;QACH;;;;mBAAsC,SAAU;WAAC;QAEjD;;WAEG;QACH;;;;mBAA4D,EAAE;WAAC;IAoChE,CAAC;IAlCA;;;OAGG;IACI,aAAa,CACnB,KAEsF;QAEtF,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;QAEzB,yEAAyE;QACzE,qCAAwB,CAAC,OAAO,CAAC,CAAC;QAElC,uBAAuB;QACvB,MAAM,MAAM,GAAG,OAAO,KAAK,KAAK,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,6BAA6B,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;QAEhG,kCAAqB,CAAC,MAAM,EAAE,6BAA6B,CAAC,CAAC;QAE7D,UAAU;QACV,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAErB,OAAO,IAAI,CAAC;IACb,CAAC;IAEM,MAAM;QACZ,uCAA0B,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QACtE,OAAO;YACN,IAAI,yBAA8C;YAClD,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;SACtD,CAAC;IACH,CAAC;CACD,CAAA;AAlDY,kCAAkC;IAD9C,cAAG,CAAC,6CAAwB,CAAC;GACjB,kCAAkC,CAkD9C;AAlDY,gFAAkC;AAsD/C;;;;GAIG;AAEH,IAAa,6BAA6B,GAA1C,MAAa,6BAA6B;IAA1C;QACC;;WAEG;QACH;;;;mBAA+B,SAAU;WAAC;QAE1C;;WAEG;QACH;;;;mBAAsC,SAAU;WAAC;QAEjD;;WAEG;QACH;;;;mBAA4D,EAAE;WAAC;IAWhE,CAAC;IATO,MAAM;QACZ,uCAA0B,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QACtE,OAAO;YACN,IAAI,oBAAyC;YAC7C,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC;SACtD,CAAC;IACH,CAAC;CACD,CAAA;AAzBY,6BAA6B;IADzC,cAAG,CAAC,6CAAwB,EAAE,0CAAyB,CAAC;GAC5C,6BAA6B,CAyBzC;AAzBY,sEAA6B","sourcesContent":["import { ApplicationCommandOptionType } from 'discord-api-types/v9';\nimport { mix } from 'ts-mixer';\nimport { assertReturnOfBuilder, validateMaxOptionsLength, validateRequiredParameters } from './Assertions';\nimport { SharedSlashCommandOptions } from './mixins/CommandOptions';\nimport { SharedNameAndDescription } from './mixins/NameAndDescription';\nimport type { ToAPIApplicationCommandOptions } from './SlashCommandBuilder';\n\n/**\n * Represents a folder for subcommands\n *\n * For more information, go to https://discord.com/developers/docs/interactions/slash-commands#subcommands-and-subcommand-groups\n */\n@mix(SharedNameAndDescription)\nexport class SlashCommandSubcommandGroupBuilder implements ToAPIApplicationCommandOptions {\n\t/**\n\t * The name of this subcommand group\n\t */\n\tpublic readonly name: string = undefined!;\n\n\t/**\n\t * The description of this subcommand group\n\t */\n\tpublic readonly description: string = undefined!;\n\n\t/**\n\t * The subcommands part of this subcommand group\n\t */\n\tpublic readonly options: ToAPIApplicationCommandOptions[] = [];\n\n\t/**\n\t * Adds a new subcommand to this group\n\t * @param input A function that returns a subcommand builder, or an already built builder\n\t */\n\tpublic addSubcommand(\n\t\tinput:\n\t\t\t| SlashCommandSubcommandBuilder\n\t\t\t| ((subcommandGroup: SlashCommandSubcommandBuilder) => SlashCommandSubcommandBuilder),\n\t) {\n\t\tconst { options } = this;\n\n\t\t// First, assert options conditions - we cannot have more than 25 options\n\t\tvalidateMaxOptionsLength(options);\n\n\t\t// Get the final result\n\t\tconst result = typeof input === 'function' ? input(new SlashCommandSubcommandBuilder()) : input;\n\n\t\tassertReturnOfBuilder(result, SlashCommandSubcommandBuilder);\n\n\t\t// Push it\n\t\toptions.push(result);\n\n\t\treturn this;\n\t}\n\n\tpublic toJSON() {\n\t\tvalidateRequiredParameters(this.name, this.description, this.options);\n\t\treturn {\n\t\t\ttype: ApplicationCommandOptionType.SubcommandGroup,\n\t\t\tname: this.name,\n\t\t\tdescription: this.description,\n\t\t\toptions: this.options.map((option) => option.toJSON()),\n\t\t};\n\t}\n}\n\nexport interface SlashCommandSubcommandGroupBuilder extends SharedNameAndDescription {}\n\n/**\n * Represents a subcommand\n *\n * For more information, go to https://discord.com/developers/docs/interactions/slash-commands#subcommands-and-subcommand-groups\n */\n@mix(SharedNameAndDescription, SharedSlashCommandOptions)\nexport class SlashCommandSubcommandBuilder implements ToAPIApplicationCommandOptions {\n\t/**\n\t * The name of this subcommand\n\t */\n\tpublic readonly name: string = undefined!;\n\n\t/**\n\t * The description of this subcommand\n\t */\n\tpublic readonly description: string = undefined!;\n\n\t/**\n\t * The options of this subcommand\n\t */\n\tpublic readonly options: ToAPIApplicationCommandOptions[] = [];\n\n\tpublic toJSON() {\n\t\tvalidateRequiredParameters(this.name, this.description, this.options);\n\t\treturn {\n\t\t\ttype: ApplicationCommandOptionType.Subcommand,\n\t\t\tname: this.name,\n\t\t\tdescription: this.description,\n\t\t\toptions: this.options.map((option) => option.toJSON()),\n\t\t};\n\t}\n}\n\nexport interface SlashCommandSubcommandBuilder extends SharedNameAndDescription, SharedSlashCommandOptions {}\n"]} \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/interactions/slashCommands/mixins/CommandOptionBase.d.ts b/node_modules/@discordjs/builders/dist/interactions/slashCommands/mixins/CommandOptionBase.d.ts new file mode 100644 index 0000000..605d794 --- /dev/null +++ b/node_modules/@discordjs/builders/dist/interactions/slashCommands/mixins/CommandOptionBase.d.ts @@ -0,0 +1,20 @@ +import type { ApplicationCommandOptionType } from 'discord-api-types/v9'; +import type { ToAPIApplicationCommandOptions } from '../SlashCommandBuilder'; +import { SharedNameAndDescription } from './NameAndDescription'; +export declare class SlashCommandOptionBase extends SharedNameAndDescription implements ToAPIApplicationCommandOptions { + required: boolean; + readonly type: ApplicationCommandOptionType; + constructor(type: ApplicationCommandOptionType); + /** + * Marks the option as required + * @param required If this option should be required + */ + setRequired(required: boolean): this; + toJSON(): { + type: ApplicationCommandOptionType; + name: string; + description: string; + required: boolean; + }; +} +//# sourceMappingURL=CommandOptionBase.d.ts.map \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/interactions/slashCommands/mixins/CommandOptionBase.d.ts.map b/node_modules/@discordjs/builders/dist/interactions/slashCommands/mixins/CommandOptionBase.d.ts.map new file mode 100644 index 0000000..2df4534 --- /dev/null +++ b/node_modules/@discordjs/builders/dist/interactions/slashCommands/mixins/CommandOptionBase.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"CommandOptionBase.d.ts","sourceRoot":"/","sources":["interactions/slashCommands/mixins/CommandOptionBase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAC;AAGzE,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,wBAAwB,CAAC;AAC7E,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAEhE,qBAAa,sBAAuB,SAAQ,wBAAyB,YAAW,8BAA8B;IACtG,QAAQ,UAAS;IACxB,SAAgB,IAAI,EAAE,4BAA4B,CAAC;gBAEhC,IAAI,EAAE,4BAA4B;IAKrD;;;OAGG;IACI,WAAW,CAAC,QAAQ,EAAE,OAAO;IAS7B,MAAM;;;;;;CAab"} \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/interactions/slashCommands/mixins/CommandOptionBase.js b/node_modules/@discordjs/builders/dist/interactions/slashCommands/mixins/CommandOptionBase.js new file mode 100644 index 0000000..0faefa5 --- /dev/null +++ b/node_modules/@discordjs/builders/dist/interactions/slashCommands/mixins/CommandOptionBase.js @@ -0,0 +1,48 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SlashCommandOptionBase = void 0; +const tslib_1 = require("tslib"); +const ow_1 = tslib_1.__importDefault(require("ow")); +const Assertions_1 = require("../Assertions"); +const NameAndDescription_1 = require("./NameAndDescription"); +class SlashCommandOptionBase extends NameAndDescription_1.SharedNameAndDescription { + constructor(type) { + super(); + Object.defineProperty(this, "required", { + enumerable: true, + configurable: true, + writable: true, + value: false + }); + Object.defineProperty(this, "type", { + enumerable: true, + configurable: true, + writable: true, + value: void 0 + }); + this.type = type; + } + /** + * Marks the option as required + * @param required If this option should be required + */ + setRequired(required) { + // Assert that you actually passed a boolean + ow_1.default(required, 'required', ow_1.default.boolean); + this.required = required; + return this; + } + toJSON() { + Assertions_1.validateRequiredParameters(this.name, this.description, []); + // Assert that you actually passed a boolean + ow_1.default(this.required, 'required', ow_1.default.boolean); + return { + type: this.type, + name: this.name, + description: this.description, + required: this.required, + }; + } +} +exports.SlashCommandOptionBase = SlashCommandOptionBase; +//# sourceMappingURL=CommandOptionBase.js.map \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/interactions/slashCommands/mixins/CommandOptionBase.js.map b/node_modules/@discordjs/builders/dist/interactions/slashCommands/mixins/CommandOptionBase.js.map new file mode 100644 index 0000000..7c34245 --- /dev/null +++ b/node_modules/@discordjs/builders/dist/interactions/slashCommands/mixins/CommandOptionBase.js.map @@ -0,0 +1 @@ +{"version":3,"file":"CommandOptionBase.js","sourceRoot":"/","sources":["interactions/slashCommands/mixins/CommandOptionBase.ts"],"names":[],"mappings":";;;;AACA,oDAAoB;AACpB,8CAA2D;AAE3D,6DAAgE;AAEhE,MAAa,sBAAuB,SAAQ,6CAAwB;IAInE,YAAmB,IAAkC;QACpD,KAAK,EAAE,CAAC;QAJT;;;;mBAAkB,KAAK;WAAC;QACxB;;;;;WAAmD;QAIlD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IAClB,CAAC;IAED;;;OAGG;IACI,WAAW,CAAC,QAAiB;QACnC,4CAA4C;QAC5C,YAAE,CAAC,QAAQ,EAAE,UAAU,EAAE,YAAE,CAAC,OAAO,CAAC,CAAC;QAErC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QAEzB,OAAO,IAAI,CAAC;IACb,CAAC;IAEM,MAAM;QACZ,uCAA0B,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;QAE5D,4CAA4C;QAC5C,YAAE,CAAC,IAAI,CAAC,QAAQ,EAAE,UAAU,EAAE,YAAE,CAAC,OAAO,CAAC,CAAC;QAE1C,OAAO;YACN,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,QAAQ,EAAE,IAAI,CAAC,QAAQ;SACvB,CAAC;IACH,CAAC;CACD;AAnCD,wDAmCC","sourcesContent":["import type { ApplicationCommandOptionType } from 'discord-api-types/v9';\nimport ow from 'ow';\nimport { validateRequiredParameters } from '../Assertions';\nimport type { ToAPIApplicationCommandOptions } from '../SlashCommandBuilder';\nimport { SharedNameAndDescription } from './NameAndDescription';\n\nexport class SlashCommandOptionBase extends SharedNameAndDescription implements ToAPIApplicationCommandOptions {\n\tpublic required = false;\n\tpublic readonly type: ApplicationCommandOptionType;\n\n\tpublic constructor(type: ApplicationCommandOptionType) {\n\t\tsuper();\n\t\tthis.type = type;\n\t}\n\n\t/**\n\t * Marks the option as required\n\t * @param required If this option should be required\n\t */\n\tpublic setRequired(required: boolean) {\n\t\t// Assert that you actually passed a boolean\n\t\tow(required, 'required', ow.boolean);\n\n\t\tthis.required = required;\n\n\t\treturn this;\n\t}\n\n\tpublic toJSON() {\n\t\tvalidateRequiredParameters(this.name, this.description, []);\n\n\t\t// Assert that you actually passed a boolean\n\t\tow(this.required, 'required', ow.boolean);\n\n\t\treturn {\n\t\t\ttype: this.type,\n\t\t\tname: this.name,\n\t\t\tdescription: this.description,\n\t\t\trequired: this.required,\n\t\t};\n\t}\n}\n"]} \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/interactions/slashCommands/mixins/CommandOptionWithChoices.d.ts b/node_modules/@discordjs/builders/dist/interactions/slashCommands/mixins/CommandOptionWithChoices.d.ts new file mode 100644 index 0000000..bbbab94 --- /dev/null +++ b/node_modules/@discordjs/builders/dist/interactions/slashCommands/mixins/CommandOptionWithChoices.d.ts @@ -0,0 +1,25 @@ +import { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from 'discord-api-types/v9'; +import type { ToAPIApplicationCommandOptions } from '../SlashCommandBuilder'; +import { SlashCommandOptionBase } from './CommandOptionBase'; +export declare abstract class ApplicationCommandOptionWithChoicesBase extends SlashCommandOptionBase implements ToAPIApplicationCommandOptions { + choices?: APIApplicationCommandOptionChoice[]; + /** + * Adds a choice for this option + * @param name The name of the choice + * @param value The value of the choice + */ + addChoice(name: string, value: T): this; + /** + * Adds multiple choices for this option + * @param choices The choices to add + */ + addChoices(choices: [name: string, value: T][]): this; + toJSON(): { + choices: APIApplicationCommandOptionChoice[] | undefined; + type: ApplicationCommandOptionType; + name: string; + description: string; + required: boolean; + }; +} +//# sourceMappingURL=CommandOptionWithChoices.d.ts.map \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/interactions/slashCommands/mixins/CommandOptionWithChoices.d.ts.map b/node_modules/@discordjs/builders/dist/interactions/slashCommands/mixins/CommandOptionWithChoices.d.ts.map new file mode 100644 index 0000000..a869d4f --- /dev/null +++ b/node_modules/@discordjs/builders/dist/interactions/slashCommands/mixins/CommandOptionWithChoices.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"CommandOptionWithChoices.d.ts","sourceRoot":"/","sources":["interactions/slashCommands/mixins/CommandOptionWithChoices.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iCAAiC,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAC;AAGvG,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,wBAAwB,CAAC;AAC7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAU7D,8BAAsB,uCAAuC,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,CACtF,SAAQ,sBACR,YAAW,8BAA8B;IAElC,OAAO,CAAC,EAAE,iCAAiC,EAAE,CAAC;IAErD;;;;OAIG;IACI,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;IAiBvC;;;OAGG;IACI,UAAU,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC,EAAE;IAOrC,MAAM;;;;;;;CAMtB"} \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/interactions/slashCommands/mixins/CommandOptionWithChoices.js b/node_modules/@discordjs/builders/dist/interactions/slashCommands/mixins/CommandOptionWithChoices.js new file mode 100644 index 0000000..c28acee --- /dev/null +++ b/node_modules/@discordjs/builders/dist/interactions/slashCommands/mixins/CommandOptionWithChoices.js @@ -0,0 +1,71 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ApplicationCommandOptionWithChoicesBase = void 0; +const tslib_1 = require("tslib"); +require("discord-api-types/v9"); +const ow_1 = tslib_1.__importDefault(require("ow")); +const Assertions_1 = require("../Assertions"); +const CommandOptionBase_1 = require("./CommandOptionBase"); +const stringPredicate = ow_1.default.string.minLength(1).maxLength(100); +const integerPredicate = ow_1.default.number.finite; +// TODO: See resolution for sindresorhus/ow#217 in relation to this cast +const choicesPredicate = ow_1.default.array.ofType(ow_1.default.array.exactShape([stringPredicate, ow_1.default.any(ow_1.default.string, integerPredicate)])); +class ApplicationCommandOptionWithChoicesBase extends CommandOptionBase_1.SlashCommandOptionBase { + constructor() { + super(...arguments); + Object.defineProperty(this, "choices", { + enumerable: true, + configurable: true, + writable: true, + value: void 0 + }); + } + /** + * Adds a choice for this option + * @param name The name of the choice + * @param value The value of the choice + */ + addChoice(name, value) { + this.choices ?? (this.choices = []); + Assertions_1.validateMaxChoicesLength(this.choices); + // Validate name + ow_1.default(name, `${ApplicationCommandOptionTypeNames[this.type]} choice name`, stringPredicate); + // Validate the value + if (this.type === 3 /* String */) + ow_1.default(value, 'string choice value', stringPredicate); + else + ow_1.default(value, `${ApplicationCommandOptionTypeNames[this.type]} choice value`, integerPredicate); + this.choices.push({ name, value }); + return this; + } + /** + * Adds multiple choices for this option + * @param choices The choices to add + */ + addChoices(choices) { + ow_1.default(choices, `${ApplicationCommandOptionTypeNames[this.type]} choices`, choicesPredicate); + for (const [label, value] of choices) + this.addChoice(label, value); + return this; + } + toJSON() { + return { + ...super.toJSON(), + choices: this.choices, + }; + } +} +exports.ApplicationCommandOptionWithChoicesBase = ApplicationCommandOptionWithChoicesBase; +const ApplicationCommandOptionTypeNames = { + [1 /* Subcommand */]: 'subcommand', + [2 /* SubcommandGroup */]: 'subcommand group', + [3 /* String */]: 'string', + [4 /* Integer */]: 'integer', + [5 /* Boolean */]: 'boolean', + [6 /* User */]: 'user', + [7 /* Channel */]: 'channel', + [8 /* Role */]: 'role', + [9 /* Mentionable */]: 'mentionable', + [10 /* Number */]: 'number', +}; +//# sourceMappingURL=CommandOptionWithChoices.js.map \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/interactions/slashCommands/mixins/CommandOptionWithChoices.js.map b/node_modules/@discordjs/builders/dist/interactions/slashCommands/mixins/CommandOptionWithChoices.js.map new file mode 100644 index 0000000..b00cb00 --- /dev/null +++ b/node_modules/@discordjs/builders/dist/interactions/slashCommands/mixins/CommandOptionWithChoices.js.map @@ -0,0 +1 @@ +{"version":3,"file":"CommandOptionWithChoices.js","sourceRoot":"/","sources":["interactions/slashCommands/mixins/CommandOptionWithChoices.ts"],"names":[],"mappings":";;;;AAAA,gCAAuG;AACvG,oDAAmC;AACnC,8CAAyD;AAEzD,2DAA6D;AAE7D,MAAM,eAAe,GAAG,YAAE,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;AAC9D,MAAM,gBAAgB,GAAG,YAAE,CAAC,MAAM,CAAC,MAAM,CAAC;AAE1C,wEAAwE;AACxE,MAAM,gBAAgB,GAAG,YAAE,CAAC,KAAK,CAAC,MAAM,CACvC,YAAE,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,eAAe,EAAE,YAAE,CAAC,GAAG,CAAC,YAAE,CAAC,MAAM,EAAE,gBAAgB,CAA0C,CAAC,CAAC,CACpH,CAAC;AAEF,MAAsB,uCACrB,SAAQ,0CAAsB;IAD/B;;QAIC;;;;;WAAqD;IAyCtD,CAAC;IAvCA;;;;OAIG;IACI,SAAS,CAAC,IAAY,EAAE,KAAQ;QACtC,IAAI,CAAC,OAAO,KAAZ,IAAI,CAAC,OAAO,GAAK,EAAE,EAAC;QAEpB,qCAAwB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAEvC,gBAAgB;QAChB,YAAE,CAAC,IAAI,EAAE,GAAG,iCAAiC,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,eAAe,CAAC,CAAC;QAEzF,qBAAqB;QACrB,IAAI,IAAI,CAAC,IAAI,mBAAwC;YAAE,YAAE,CAAC,KAAK,EAAE,qBAAqB,EAAE,eAAe,CAAC,CAAC;;YACpG,YAAE,CAAC,KAAK,EAAE,GAAG,iCAAiC,CAAC,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,gBAAgB,CAAC,CAAC;QAEjG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;QAEnC,OAAO,IAAI,CAAC;IACb,CAAC;IAED;;;OAGG;IACI,UAAU,CAAC,OAAmC;QACpD,YAAE,CAAC,OAAO,EAAE,GAAG,iCAAiC,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,gBAAgB,CAAC,CAAC;QAEzF,KAAK,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,OAAO;YAAE,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QACnE,OAAO,IAAI,CAAC;IACb,CAAC;IAEe,MAAM;QACrB,OAAO;YACN,GAAG,KAAK,CAAC,MAAM,EAAE;YACjB,OAAO,EAAE,IAAI,CAAC,OAAO;SACrB,CAAC;IACH,CAAC;CACD;AA7CD,0FA6CC;AAED,MAAM,iCAAiC,GAAG;IACzC,oBAAyC,EAAE,YAAY;IACvD,yBAA8C,EAAE,kBAAkB;IAClE,gBAAqC,EAAE,QAAQ;IAC/C,iBAAsC,EAAE,SAAS;IACjD,iBAAsC,EAAE,SAAS;IACjD,cAAmC,EAAE,MAAM;IAC3C,iBAAsC,EAAE,SAAS;IACjD,cAAmC,EAAE,MAAM;IAC3C,qBAA0C,EAAE,aAAa;IACzD,iBAAqC,EAAE,QAAQ;CACtC,CAAC","sourcesContent":["import { APIApplicationCommandOptionChoice, ApplicationCommandOptionType } from 'discord-api-types/v9';\nimport ow, { Predicate } from 'ow';\nimport { validateMaxChoicesLength } from '../Assertions';\nimport type { ToAPIApplicationCommandOptions } from '../SlashCommandBuilder';\nimport { SlashCommandOptionBase } from './CommandOptionBase';\n\nconst stringPredicate = ow.string.minLength(1).maxLength(100);\nconst integerPredicate = ow.number.finite;\n\n// TODO: See resolution for sindresorhus/ow#217 in relation to this cast\nconst choicesPredicate = ow.array.ofType<[string, string | number]>(\n\tow.array.exactShape([stringPredicate, ow.any(ow.string, integerPredicate) as unknown as Predicate]),\n);\n\nexport abstract class ApplicationCommandOptionWithChoicesBase\n\textends SlashCommandOptionBase\n\timplements ToAPIApplicationCommandOptions\n{\n\tpublic choices?: APIApplicationCommandOptionChoice[];\n\n\t/**\n\t * Adds a choice for this option\n\t * @param name The name of the choice\n\t * @param value The value of the choice\n\t */\n\tpublic addChoice(name: string, value: T) {\n\t\tthis.choices ??= [];\n\n\t\tvalidateMaxChoicesLength(this.choices);\n\n\t\t// Validate name\n\t\tow(name, `${ApplicationCommandOptionTypeNames[this.type]} choice name`, stringPredicate);\n\n\t\t// Validate the value\n\t\tif (this.type === ApplicationCommandOptionType.String) ow(value, 'string choice value', stringPredicate);\n\t\telse ow(value, `${ApplicationCommandOptionTypeNames[this.type]} choice value`, integerPredicate);\n\n\t\tthis.choices.push({ name, value });\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Adds multiple choices for this option\n\t * @param choices The choices to add\n\t */\n\tpublic addChoices(choices: [name: string, value: T][]) {\n\t\tow(choices, `${ApplicationCommandOptionTypeNames[this.type]} choices`, choicesPredicate);\n\n\t\tfor (const [label, value] of choices) this.addChoice(label, value);\n\t\treturn this;\n\t}\n\n\tpublic override toJSON() {\n\t\treturn {\n\t\t\t...super.toJSON(),\n\t\t\tchoices: this.choices,\n\t\t};\n\t}\n}\n\nconst ApplicationCommandOptionTypeNames = {\n\t[ApplicationCommandOptionType.Subcommand]: 'subcommand',\n\t[ApplicationCommandOptionType.SubcommandGroup]: 'subcommand group',\n\t[ApplicationCommandOptionType.String]: 'string',\n\t[ApplicationCommandOptionType.Integer]: 'integer',\n\t[ApplicationCommandOptionType.Boolean]: 'boolean',\n\t[ApplicationCommandOptionType.User]: 'user',\n\t[ApplicationCommandOptionType.Channel]: 'channel',\n\t[ApplicationCommandOptionType.Role]: 'role',\n\t[ApplicationCommandOptionType.Mentionable]: 'mentionable',\n\t[ApplicationCommandOptionType.Number]: 'number',\n} as const;\n"]} \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/interactions/slashCommands/mixins/CommandOptions.d.ts b/node_modules/@discordjs/builders/dist/interactions/slashCommands/mixins/CommandOptions.d.ts new file mode 100644 index 0000000..ebc6b4a --- /dev/null +++ b/node_modules/@discordjs/builders/dist/interactions/slashCommands/mixins/CommandOptions.d.ts @@ -0,0 +1,54 @@ +import { SlashCommandBooleanOption } from '../options/boolean'; +import { SlashCommandChannelOption } from '../options/channel'; +import { SlashCommandIntegerOption } from '../options/integer'; +import { SlashCommandMentionableOption } from '../options/mentionable'; +import { SlashCommandNumberOption } from '../options/number'; +import { SlashCommandRoleOption } from '../options/role'; +import { SlashCommandStringOption } from '../options/string'; +import { SlashCommandUserOption } from '../options/user'; +import type { ToAPIApplicationCommandOptions } from '../SlashCommandBuilder'; +export 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)): ShouldOmitSubcommandFunctions extends true ? Omit : this; + /** + * Adds a user option + * @param input A function that returns an option builder, or an already built builder + */ + addUserOption(input: SlashCommandUserOption | ((builder: SlashCommandUserOption) => SlashCommandUserOption)): ShouldOmitSubcommandFunctions extends true ? Omit : this; + /** + * Adds a channel option + * @param input A function that returns an option builder, or an already built builder + */ + addChannelOption(input: SlashCommandChannelOption | ((builder: SlashCommandChannelOption) => SlashCommandChannelOption)): ShouldOmitSubcommandFunctions extends true ? Omit : this; + /** + * Adds a role option + * @param input A function that returns an option builder, or an already built builder + */ + addRoleOption(input: SlashCommandRoleOption | ((builder: SlashCommandRoleOption) => SlashCommandRoleOption)): ShouldOmitSubcommandFunctions extends true ? Omit : this; + /** + * Adds a mentionable option + * @param input A function that returns an option builder, or an already built builder + */ + addMentionableOption(input: SlashCommandMentionableOption | ((builder: SlashCommandMentionableOption) => SlashCommandMentionableOption)): ShouldOmitSubcommandFunctions extends true ? Omit : this; + /** + * Adds a string option + * @param input A function that returns an option builder, or an already built builder + */ + addStringOption(input: SlashCommandStringOption | ((builder: SlashCommandStringOption) => SlashCommandStringOption)): ShouldOmitSubcommandFunctions extends true ? Omit : this; + /** + * Adds an integer option + * @param input A function that returns an option builder, or an already built builder + */ + addIntegerOption(input: SlashCommandIntegerOption | ((builder: SlashCommandIntegerOption) => SlashCommandIntegerOption)): ShouldOmitSubcommandFunctions extends true ? Omit : this; + /** + * Adds a number option + * @param input A function that returns an option builder, or an already built builder + */ + addNumberOption(input: SlashCommandNumberOption | ((builder: SlashCommandNumberOption) => SlashCommandNumberOption)): ShouldOmitSubcommandFunctions extends true ? Omit : this; + private _sharedAddOptionMethod; +} +//# sourceMappingURL=CommandOptions.d.ts.map \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/interactions/slashCommands/mixins/CommandOptions.d.ts.map b/node_modules/@discordjs/builders/dist/interactions/slashCommands/mixins/CommandOptions.d.ts.map new file mode 100644 index 0000000..79f811a --- /dev/null +++ b/node_modules/@discordjs/builders/dist/interactions/slashCommands/mixins/CommandOptions.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"CommandOptions.d.ts","sourceRoot":"/","sources":["interactions/slashCommands/mixins/CommandOptions.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,6BAA6B,EAAE,MAAM,wBAAwB,CAAC;AACvE,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,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ashCommands/mixins/CommandOptions.js b/node_modules/@discordjs/builders/dist/interactions/slashCommands/mixins/CommandOptions.js new file mode 100644 index 0000000..55ace0a --- /dev/null +++ b/node_modules/@discordjs/builders/dist/interactions/slashCommands/mixins/CommandOptions.js @@ -0,0 +1,91 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SharedSlashCommandOptions = void 0; +const Assertions_1 = require("../Assertions"); +const boolean_1 = require("../options/boolean"); +const channel_1 = require("../options/channel"); +const integer_1 = require("../options/integer"); +const mentionable_1 = require("../options/mentionable"); +const number_1 = require("../options/number"); +const role_1 = require("../options/role"); +const string_1 = require("../options/string"); +const user_1 = require("../options/user"); +class SharedSlashCommandOptions { + constructor() { + Object.defineProperty(this, "options", { + enumerable: true, + configurable: true, + writable: true, + value: void 0 + }); + } + /** + * Adds a boolean option + * @param input A function that returns an option builder, or an already built builder + */ + addBooleanOption(input) { + return this._sharedAddOptionMethod(input, boolean_1.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, user_1.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, channel_1.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, role_1.SlashCommandRoleOption); + } + /** + * Adds a mentionable option + * @param input A function that returns an option builder, or an already built builder + */ + addMentionableOption(input) { + return this._sharedAddOptionMethod(input, mentionable_1.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, string_1.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, integer_1.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, number_1.SlashCommandNumberOption); + } + _sharedAddOptionMethod(input, Instance) { + const { options } = this; + // First, assert options conditions - we cannot have more than 25 options + Assertions_1.validateMaxOptionsLength(options); + // Get the final result + const result = typeof input === 'function' ? input(new Instance()) : input; + Assertions_1.assertReturnOfBuilder(result, Instance); + // Push it + options.push(result); + return this; + } +} +exports.SharedSlashCommandOptions = SharedSlashCommandOptions; +//# sourceMappingURL=CommandOptions.js.map \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/interactions/slashCommands/mixins/CommandOptions.js.map b/node_modules/@discordjs/builders/dist/interactions/slashCommands/mixins/CommandOptions.js.map new file mode 100644 index 0000000..fed3320 --- /dev/null +++ b/node_modules/@discordjs/builders/dist/interactions/slashCommands/mixins/CommandOptions.js.map @@ -0,0 +1 @@ +{"version":3,"file":"CommandOptions.js","sourceRoot":"/","sources":["interactions/slashCommands/mixins/CommandOptions.ts"],"names":[],"mappings":";;;AAAA,8CAAgF;AAEhF,gDAA+D;AAC/D,gDAA+D;AAC/D,gDAA+D;AAC/D,wDAAuE;AACvE,8CAA6D;AAC7D,0CAAyD;AACzD,8CAA6D;AAC7D,0CAAyD;AAGzD,MAAa,yBAAyB;IAAtC;QACC;;;;;WAA2D;IAiG5D,CAAC;IA/FA;;;OAGG;IACI,gBAAgB,CACtB,KAAsG;QAEtG,OAAO,IAAI,CAAC,sBAAsB,CAAC,KAAK,EAAE,mCAAyB,CAAC,CAAC;IACtE,CAAC;IAED;;;OAGG;IACI,aAAa,CAAC,KAA6F;QACjH,OAAO,IAAI,CAAC,sBAAsB,CAAC,KAAK,EAAE,6BAAsB,CAAC,CAAC;IACnE,CAAC;IAED;;;OAGG;IACI,gBAAgB,CACtB,KAAsG;QAEtG,OAAO,IAAI,CAAC,sBAAsB,CAAC,KAAK,EAAE,mCAAyB,CAAC,CAAC;IACtE,CAAC;IAED;;;OAGG;IACI,aAAa,CAAC,KAA6F;QACjH,OAAO,IAAI,CAAC,sBAAsB,CAAC,KAAK,EAAE,6BAAsB,CAAC,CAAC;IACnE,CAAC;IAED;;;OAGG;IACI,oBAAoB,CAC1B,KAAkH;QAElH,OAAO,IAAI,CAAC,sBAAsB,CAAC,KAAK,EAAE,2CAA6B,CAAC,CAAC;IAC1E,CAAC;IAED;;;OAGG;IACI,eAAe,CACrB,KAAmG;QAEnG,OAAO,IAAI,CAAC,sBAAsB,CAAC,KAAK,EAAE,iCAAwB,CAAC,CAAC;IACrE,CAAC;IAED;;;OAGG;IACI,gBAAgB,CACtB,KAAsG;QAEtG,OAAO,IAAI,CAAC,sBAAsB,CAAC,KAAK,EAAE,mCAAyB,CAAC,CAAC;IACtE,CAAC;IAED;;;OAGG;IACI,eAAe,CACrB,KAAmG;QAEnG,OAAO,IAAI,CAAC,sBAAsB,CAAC,KAAK,EAAE,iCAAwB,CAAC,CAAC;IACrE,CAAC;IAEO,sBAAsB,CAC7B,KAA8B,EAC9B,QAAqB;QAErB,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;QAEzB,yEAAyE;QACzE,qCAAwB,CAAC,OAAO,CAAC,CAAC;QAElC,uBAAuB;QACvB,MAAM,MAAM,GAAG,OAAO,KAAK,KAAK,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,QAAQ,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;QAE3E,kCAAqB,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QAExC,UAAU;QACV,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAErB,OAAO,IAAI,CAAC;IACb,CAAC;CACD;AAlGD,8DAkGC","sourcesContent":["import { assertReturnOfBuilder, validateMaxOptionsLength } from '../Assertions';\nimport type { SlashCommandOptionBase } from './CommandOptionBase';\nimport { SlashCommandBooleanOption } from '../options/boolean';\nimport { SlashCommandChannelOption } from '../options/channel';\nimport { SlashCommandIntegerOption } from '../options/integer';\nimport { SlashCommandMentionableOption } from '../options/mentionable';\nimport { SlashCommandNumberOption } from '../options/number';\nimport { SlashCommandRoleOption } from '../options/role';\nimport { SlashCommandStringOption } from '../options/string';\nimport { SlashCommandUserOption } from '../options/user';\nimport type { ToAPIApplicationCommandOptions } from '../SlashCommandBuilder';\n\nexport class SharedSlashCommandOptions {\n\tpublic readonly options!: ToAPIApplicationCommandOptions[];\n\n\t/**\n\t * Adds a boolean option\n\t * @param input A function that returns an option builder, or an already built builder\n\t */\n\tpublic addBooleanOption(\n\t\tinput: SlashCommandBooleanOption | ((builder: SlashCommandBooleanOption) => SlashCommandBooleanOption),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandBooleanOption);\n\t}\n\n\t/**\n\t * Adds a user option\n\t * @param input A function that returns an option builder, or an already built builder\n\t */\n\tpublic addUserOption(input: SlashCommandUserOption | ((builder: SlashCommandUserOption) => SlashCommandUserOption)) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandUserOption);\n\t}\n\n\t/**\n\t * Adds a channel option\n\t * @param input A function that returns an option builder, or an already built builder\n\t */\n\tpublic addChannelOption(\n\t\tinput: SlashCommandChannelOption | ((builder: SlashCommandChannelOption) => SlashCommandChannelOption),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandChannelOption);\n\t}\n\n\t/**\n\t * Adds a role option\n\t * @param input A function that returns an option builder, or an already built builder\n\t */\n\tpublic addRoleOption(input: SlashCommandRoleOption | ((builder: SlashCommandRoleOption) => SlashCommandRoleOption)) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandRoleOption);\n\t}\n\n\t/**\n\t * Adds a mentionable option\n\t * @param input A function that returns an option builder, or an already built builder\n\t */\n\tpublic addMentionableOption(\n\t\tinput: SlashCommandMentionableOption | ((builder: SlashCommandMentionableOption) => SlashCommandMentionableOption),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandMentionableOption);\n\t}\n\n\t/**\n\t * Adds a string option\n\t * @param input A function that returns an option builder, or an already built builder\n\t */\n\tpublic addStringOption(\n\t\tinput: SlashCommandStringOption | ((builder: SlashCommandStringOption) => SlashCommandStringOption),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandStringOption);\n\t}\n\n\t/**\n\t * Adds an integer option\n\t * @param input A function that returns an option builder, or an already built builder\n\t */\n\tpublic addIntegerOption(\n\t\tinput: SlashCommandIntegerOption | ((builder: SlashCommandIntegerOption) => SlashCommandIntegerOption),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandIntegerOption);\n\t}\n\n\t/**\n\t * Adds a number option\n\t * @param input A function that returns an option builder, or an already built builder\n\t */\n\tpublic addNumberOption(\n\t\tinput: SlashCommandNumberOption | ((builder: SlashCommandNumberOption) => SlashCommandNumberOption),\n\t) {\n\t\treturn this._sharedAddOptionMethod(input, SlashCommandNumberOption);\n\t}\n\n\tprivate _sharedAddOptionMethod(\n\t\tinput: T | ((builder: T) => T),\n\t\tInstance: new () => T,\n\t): ShouldOmitSubcommandFunctions extends true ? Omit : this {\n\t\tconst { options } = this;\n\n\t\t// First, assert options conditions - we cannot have more than 25 options\n\t\tvalidateMaxOptionsLength(options);\n\n\t\t// Get the final result\n\t\tconst result = typeof input === 'function' ? input(new Instance()) : input;\n\n\t\tassertReturnOfBuilder(result, Instance);\n\n\t\t// Push it\n\t\toptions.push(result);\n\n\t\treturn this;\n\t}\n}\n"]} \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/interactions/slashCommands/mixins/NameAndDescription.d.ts b/node_modules/@discordjs/builders/dist/interactions/slashCommands/mixins/NameAndDescription.d.ts new file mode 100644 index 0000000..a7a5695 --- /dev/null +++ b/node_modules/@discordjs/builders/dist/interactions/slashCommands/mixins/NameAndDescription.d.ts @@ -0,0 +1,15 @@ +export declare class SharedNameAndDescription { + readonly name: string; + readonly description: string; + /** + * Sets the name + * @param name The name + */ + setName(name: string): this; + /** + * Sets the description + * @param description The description + */ + setDescription(description: string): this; +} +//# sourceMappingURL=NameAndDescription.d.ts.map \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/interactions/slashCommands/mixins/NameAndDescription.d.ts.map b/node_modules/@discordjs/builders/dist/interactions/slashCommands/mixins/NameAndDescription.d.ts.map new file mode 100644 index 0000000..868dc88 --- /dev/null +++ b/node_modules/@discordjs/builders/dist/interactions/slashCommands/mixins/NameAndDescription.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"NameAndDescription.d.ts","sourceRoot":"/","sources":["interactions/slashCommands/mixins/NameAndDescription.ts"],"names":[],"mappings":"AAEA,qBAAa,wBAAwB;IACpC,SAAgB,IAAI,EAAG,MAAM,CAAC;IAC9B,SAAgB,WAAW,EAAG,MAAM,CAAC;IAErC;;;OAGG;IACI,OAAO,CAAC,IAAI,EAAE,MAAM;IAS3B;;;OAGG;IACI,cAAc,CAAC,WAAW,EAAE,MAAM;CAQzC"} \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/interactions/slashCommands/mixins/NameAndDescription.js b/node_modules/@discordjs/builders/dist/interactions/slashCommands/mixins/NameAndDescription.js new file mode 100644 index 0000000..bb6031d --- /dev/null +++ b/node_modules/@discordjs/builders/dist/interactions/slashCommands/mixins/NameAndDescription.js @@ -0,0 +1,42 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SharedNameAndDescription = void 0; +const Assertions_1 = require("../Assertions"); +class SharedNameAndDescription { + constructor() { + Object.defineProperty(this, "name", { + enumerable: true, + configurable: true, + writable: true, + value: void 0 + }); + Object.defineProperty(this, "description", { + enumerable: true, + configurable: true, + writable: true, + value: void 0 + }); + } + /** + * Sets the name + * @param name The name + */ + setName(name) { + // Assert the name matches the conditions + Assertions_1.validateName(name); + Reflect.set(this, 'name', name); + return this; + } + /** + * Sets the description + * @param description The description + */ + setDescription(description) { + // Assert the description matches the conditions + Assertions_1.validateDescription(description); + Reflect.set(this, 'description', description); + return this; + } +} +exports.SharedNameAndDescription = SharedNameAndDescription; +//# sourceMappingURL=NameAndDescription.js.map \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/interactions/slashCommands/mixins/NameAndDescription.js.map b/node_modules/@discordjs/builders/dist/interactions/slashCommands/mixins/NameAndDescription.js.map new file mode 100644 index 0000000..f4fa197 --- /dev/null +++ b/node_modules/@discordjs/builders/dist/interactions/slashCommands/mixins/NameAndDescription.js.map @@ -0,0 +1 @@ +{"version":3,"file":"NameAndDescription.js","sourceRoot":"/","sources":["interactions/slashCommands/mixins/NameAndDescription.ts"],"names":[],"mappings":";;;AAAA,8CAAkE;AAElE,MAAa,wBAAwB;IAArC;QACC;;;;;WAA8B;QAC9B;;;;;WAAqC;IA2BtC,CAAC;IAzBA;;;OAGG;IACI,OAAO,CAAC,IAAY;QAC1B,yCAAyC;QACzC,yBAAY,CAAC,IAAI,CAAC,CAAC;QAEnB,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;QAEhC,OAAO,IAAI,CAAC;IACb,CAAC;IAED;;;OAGG;IACI,cAAc,CAAC,WAAmB;QACxC,gDAAgD;QAChD,gCAAmB,CAAC,WAAW,CAAC,CAAC;QAEjC,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,aAAa,EAAE,WAAW,CAAC,CAAC;QAE9C,OAAO,IAAI,CAAC;IACb,CAAC;CACD;AA7BD,4DA6BC","sourcesContent":["import { validateDescription, validateName } from '../Assertions';\n\nexport class SharedNameAndDescription {\n\tpublic readonly name!: string;\n\tpublic readonly description!: string;\n\n\t/**\n\t * Sets the name\n\t * @param name The name\n\t */\n\tpublic setName(name: string) {\n\t\t// Assert the name matches the conditions\n\t\tvalidateName(name);\n\n\t\tReflect.set(this, 'name', name);\n\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the description\n\t * @param description The description\n\t */\n\tpublic setDescription(description: string) {\n\t\t// Assert the description matches the conditions\n\t\tvalidateDescription(description);\n\n\t\tReflect.set(this, 'description', description);\n\n\t\treturn this;\n\t}\n}\n"]} \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/boolean.d.ts b/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/boolean.d.ts new file mode 100644 index 0000000..a0cda36 --- /dev/null +++ b/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/boolean.d.ts @@ -0,0 +1,7 @@ +import { ApplicationCommandOptionType } from 'discord-api-types/v9'; +import { SlashCommandOptionBase } from '../mixins/CommandOptionBase'; +export declare class SlashCommandBooleanOption extends SlashCommandOptionBase { + readonly type: ApplicationCommandOptionType.Boolean; + constructor(); +} +//# sourceMappingURL=boolean.d.ts.map \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/boolean.d.ts.map b/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/boolean.d.ts.map new file mode 100644 index 0000000..d4d1596 --- /dev/null +++ b/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/boolean.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"boolean.d.ts","sourceRoot":"/","sources":["interactions/slashCommands/options/boolean.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAErE,qBAAa,yBAA0B,SAAQ,sBAAsB;IACpE,SAAyB,IAAI,uCAAiD;;CAK9E"} \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/boolean.js b/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/boolean.js new file mode 100644 index 0000000..c54342d --- /dev/null +++ b/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/boolean.js @@ -0,0 +1,18 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SlashCommandBooleanOption = void 0; +require("discord-api-types/v9"); +const CommandOptionBase_1 = require("../mixins/CommandOptionBase"); +class SlashCommandBooleanOption extends CommandOptionBase_1.SlashCommandOptionBase { + constructor() { + super(5 /* Boolean */); + Object.defineProperty(this, "type", { + enumerable: true, + configurable: true, + writable: true, + value: 5 /* Boolean */ + }); + } +} +exports.SlashCommandBooleanOption = SlashCommandBooleanOption; +//# sourceMappingURL=boolean.js.map \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/boolean.js.map b/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/boolean.js.map new file mode 100644 index 0000000..94e0554 --- /dev/null +++ b/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/boolean.js.map @@ -0,0 +1 @@ +{"version":3,"file":"boolean.js","sourceRoot":"/","sources":["interactions/slashCommands/options/boolean.ts"],"names":[],"mappings":";;;AAAA,gCAAoE;AACpE,mEAAqE;AAErE,MAAa,yBAA0B,SAAQ,0CAAsB;IAGpE;QACC,KAAK,iBAAsC,CAAC;QAH7C;;;;mBAAgC,eAA6C;WAAC;IAI9E,CAAC;CACD;AAND,8DAMC","sourcesContent":["import { ApplicationCommandOptionType } from 'discord-api-types/v9';\nimport { SlashCommandOptionBase } from '../mixins/CommandOptionBase';\n\nexport class SlashCommandBooleanOption extends SlashCommandOptionBase {\n\tpublic override readonly type = ApplicationCommandOptionType.Boolean as const;\n\n\tpublic constructor() {\n\t\tsuper(ApplicationCommandOptionType.Boolean);\n\t}\n}\n"]} \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/channel.d.ts b/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/channel.d.ts new file mode 100644 index 0000000..2b6d03a --- /dev/null +++ b/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/channel.d.ts @@ -0,0 +1,7 @@ +import { ApplicationCommandOptionType } from 'discord-api-types/v9'; +import { SlashCommandOptionBase } from '../mixins/CommandOptionBase'; +export declare class SlashCommandChannelOption extends SlashCommandOptionBase { + readonly type: ApplicationCommandOptionType.Channel; + constructor(); +} +//# sourceMappingURL=channel.d.ts.map \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/channel.d.ts.map b/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/channel.d.ts.map new file mode 100644 index 0000000..5e55e53 --- /dev/null +++ b/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/channel.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"channel.d.ts","sourceRoot":"/","sources":["interactions/slashCommands/options/channel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAErE,qBAAa,yBAA0B,SAAQ,sBAAsB;IACpE,SAAyB,IAAI,uCAAiD;;CAK9E"} \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/channel.js b/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/channel.js new file mode 100644 index 0000000..87e22b4 --- /dev/null +++ b/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/channel.js @@ -0,0 +1,18 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SlashCommandChannelOption = void 0; +require("discord-api-types/v9"); +const CommandOptionBase_1 = require("../mixins/CommandOptionBase"); +class SlashCommandChannelOption extends CommandOptionBase_1.SlashCommandOptionBase { + constructor() { + super(7 /* Channel */); + Object.defineProperty(this, "type", { + enumerable: true, + configurable: true, + writable: true, + value: 7 /* Channel */ + }); + } +} +exports.SlashCommandChannelOption = SlashCommandChannelOption; +//# sourceMappingURL=channel.js.map \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/channel.js.map b/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/channel.js.map new file mode 100644 index 0000000..1424a39 --- /dev/null +++ b/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/channel.js.map @@ -0,0 +1 @@ +{"version":3,"file":"channel.js","sourceRoot":"/","sources":["interactions/slashCommands/options/channel.ts"],"names":[],"mappings":";;;AAAA,gCAAoE;AACpE,mEAAqE;AAErE,MAAa,yBAA0B,SAAQ,0CAAsB;IAGpE;QACC,KAAK,iBAAsC,CAAC;QAH7C;;;;mBAAgC,eAA6C;WAAC;IAI9E,CAAC;CACD;AAND,8DAMC","sourcesContent":["import { ApplicationCommandOptionType } from 'discord-api-types/v9';\nimport { SlashCommandOptionBase } from '../mixins/CommandOptionBase';\n\nexport class SlashCommandChannelOption extends SlashCommandOptionBase {\n\tpublic override readonly type = ApplicationCommandOptionType.Channel as const;\n\n\tpublic constructor() {\n\t\tsuper(ApplicationCommandOptionType.Channel);\n\t}\n}\n"]} \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/integer.d.ts b/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/integer.d.ts new file mode 100644 index 0000000..3faefe0 --- /dev/null +++ b/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/integer.d.ts @@ -0,0 +1,7 @@ +import { ApplicationCommandOptionType } from 'discord-api-types/v9'; +import { ApplicationCommandOptionWithChoicesBase } from '../mixins/CommandOptionWithChoices'; +export declare class SlashCommandIntegerOption extends ApplicationCommandOptionWithChoicesBase { + readonly type: ApplicationCommandOptionType.Integer; + constructor(); +} +//# sourceMappingURL=integer.d.ts.map \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/integer.d.ts.map b/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/integer.d.ts.map new file mode 100644 index 0000000..e991150 --- /dev/null +++ b/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/integer.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"integer.d.ts","sourceRoot":"/","sources":["interactions/slashCommands/options/integer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,uCAAuC,EAAE,MAAM,oCAAoC,CAAC;AAE7F,qBAAa,yBAA0B,SAAQ,uCAAuC,CAAC,MAAM,CAAC;IAC7F,SAAyB,IAAI,uCAAiD;;CAK9E"} \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/integer.js b/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/integer.js new file mode 100644 index 0000000..73ace64 --- /dev/null +++ b/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/integer.js @@ -0,0 +1,18 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SlashCommandIntegerOption = void 0; +require("discord-api-types/v9"); +const CommandOptionWithChoices_1 = require("../mixins/CommandOptionWithChoices"); +class SlashCommandIntegerOption extends CommandOptionWithChoices_1.ApplicationCommandOptionWithChoicesBase { + constructor() { + super(4 /* Integer */); + Object.defineProperty(this, "type", { + enumerable: true, + configurable: true, + writable: true, + value: 4 /* Integer */ + }); + } +} +exports.SlashCommandIntegerOption = SlashCommandIntegerOption; +//# sourceMappingURL=integer.js.map \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/integer.js.map b/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/integer.js.map new file mode 100644 index 0000000..8bb13b6 --- /dev/null +++ b/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/integer.js.map @@ -0,0 +1 @@ +{"version":3,"file":"integer.js","sourceRoot":"/","sources":["interactions/slashCommands/options/integer.ts"],"names":[],"mappings":";;;AAAA,gCAAoE;AACpE,iFAA6F;AAE7F,MAAa,yBAA0B,SAAQ,kEAA+C;IAG7F;QACC,KAAK,iBAAsC,CAAC;QAH7C;;;;mBAAgC,eAA6C;WAAC;IAI9E,CAAC;CACD;AAND,8DAMC","sourcesContent":["import { ApplicationCommandOptionType } from 'discord-api-types/v9';\nimport { ApplicationCommandOptionWithChoicesBase } from '../mixins/CommandOptionWithChoices';\n\nexport class SlashCommandIntegerOption extends ApplicationCommandOptionWithChoicesBase {\n\tpublic override readonly type = ApplicationCommandOptionType.Integer as const;\n\n\tpublic constructor() {\n\t\tsuper(ApplicationCommandOptionType.Integer);\n\t}\n}\n"]} \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/mentionable.d.ts b/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/mentionable.d.ts new file mode 100644 index 0000000..ff98caf --- /dev/null +++ b/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/mentionable.d.ts @@ -0,0 +1,7 @@ +import { ApplicationCommandOptionType } from 'discord-api-types/v9'; +import { SlashCommandOptionBase } from '../mixins/CommandOptionBase'; +export declare class SlashCommandMentionableOption extends SlashCommandOptionBase { + readonly type: ApplicationCommandOptionType.Mentionable; + constructor(); +} +//# sourceMappingURL=mentionable.d.ts.map \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/mentionable.d.ts.map b/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/mentionable.d.ts.map new file mode 100644 index 0000000..2099899 --- /dev/null +++ b/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/mentionable.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"mentionable.d.ts","sourceRoot":"/","sources":["interactions/slashCommands/options/mentionable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAErE,qBAAa,6BAA8B,SAAQ,sBAAsB;IACxE,SAAyB,IAAI,2CAAqD;;CAKlF"} \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/mentionable.js b/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/mentionable.js new file mode 100644 index 0000000..a6167b3 --- /dev/null +++ b/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/mentionable.js @@ -0,0 +1,18 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SlashCommandMentionableOption = void 0; +require("discord-api-types/v9"); +const CommandOptionBase_1 = require("../mixins/CommandOptionBase"); +class SlashCommandMentionableOption extends CommandOptionBase_1.SlashCommandOptionBase { + constructor() { + super(9 /* Mentionable */); + Object.defineProperty(this, "type", { + enumerable: true, + configurable: true, + writable: true, + value: 9 /* Mentionable */ + }); + } +} +exports.SlashCommandMentionableOption = SlashCommandMentionableOption; +//# sourceMappingURL=mentionable.js.map \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/mentionable.js.map b/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/mentionable.js.map new file mode 100644 index 0000000..96e79cb --- /dev/null +++ b/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/mentionable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"mentionable.js","sourceRoot":"/","sources":["interactions/slashCommands/options/mentionable.ts"],"names":[],"mappings":";;;AAAA,gCAAoE;AACpE,mEAAqE;AAErE,MAAa,6BAA8B,SAAQ,0CAAsB;IAGxE;QACC,KAAK,qBAA0C,CAAC;QAHjD;;;;mBAAgC,mBAAiD;WAAC;IAIlF,CAAC;CACD;AAND,sEAMC","sourcesContent":["import { ApplicationCommandOptionType } from 'discord-api-types/v9';\nimport { SlashCommandOptionBase } from '../mixins/CommandOptionBase';\n\nexport class SlashCommandMentionableOption extends SlashCommandOptionBase {\n\tpublic override readonly type = ApplicationCommandOptionType.Mentionable as const;\n\n\tpublic constructor() {\n\t\tsuper(ApplicationCommandOptionType.Mentionable);\n\t}\n}\n"]} \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/number.d.ts b/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/number.d.ts new file mode 100644 index 0000000..576bd98 --- /dev/null +++ b/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/number.d.ts @@ -0,0 +1,7 @@ +import { ApplicationCommandOptionType } from 'discord-api-types/v9'; +import { ApplicationCommandOptionWithChoicesBase } from '../mixins/CommandOptionWithChoices'; +export declare class SlashCommandNumberOption extends ApplicationCommandOptionWithChoicesBase { + readonly type: ApplicationCommandOptionType.Number; + constructor(); +} +//# sourceMappingURL=number.d.ts.map \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/number.d.ts.map b/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/number.d.ts.map new file mode 100644 index 0000000..09345a2 --- /dev/null +++ b/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/number.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"number.d.ts","sourceRoot":"/","sources":["interactions/slashCommands/options/number.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,uCAAuC,EAAE,MAAM,oCAAoC,CAAC;AAE7F,qBAAa,wBAAyB,SAAQ,uCAAuC,CAAC,MAAM,CAAC;IAC5F,SAAyB,IAAI,sCAAgD;;CAK7E"} \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/number.js b/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/number.js new file mode 100644 index 0000000..d496243 --- /dev/null +++ b/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/number.js @@ -0,0 +1,18 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SlashCommandNumberOption = void 0; +require("discord-api-types/v9"); +const CommandOptionWithChoices_1 = require("../mixins/CommandOptionWithChoices"); +class SlashCommandNumberOption extends CommandOptionWithChoices_1.ApplicationCommandOptionWithChoicesBase { + constructor() { + super(10 /* Number */); + Object.defineProperty(this, "type", { + enumerable: true, + configurable: true, + writable: true, + value: 10 /* Number */ + }); + } +} +exports.SlashCommandNumberOption = SlashCommandNumberOption; +//# sourceMappingURL=number.js.map \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/number.js.map b/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/number.js.map new file mode 100644 index 0000000..861d770 --- /dev/null +++ b/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/number.js.map @@ -0,0 +1 @@ +{"version":3,"file":"number.js","sourceRoot":"/","sources":["interactions/slashCommands/options/number.ts"],"names":[],"mappings":";;;AAAA,gCAAoE;AACpE,iFAA6F;AAE7F,MAAa,wBAAyB,SAAQ,kEAA+C;IAG5F;QACC,KAAK,iBAAqC,CAAC;QAH5C;;;;mBAAgC,eAA4C;WAAC;IAI7E,CAAC;CACD;AAND,4DAMC","sourcesContent":["import { ApplicationCommandOptionType } from 'discord-api-types/v9';\nimport { ApplicationCommandOptionWithChoicesBase } from '../mixins/CommandOptionWithChoices';\n\nexport class SlashCommandNumberOption extends ApplicationCommandOptionWithChoicesBase {\n\tpublic override readonly type = ApplicationCommandOptionType.Number as const;\n\n\tpublic constructor() {\n\t\tsuper(ApplicationCommandOptionType.Number);\n\t}\n}\n"]} \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/role.d.ts b/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/role.d.ts new file mode 100644 index 0000000..3f78471 --- /dev/null +++ b/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/role.d.ts @@ -0,0 +1,7 @@ +import { ApplicationCommandOptionType } from 'discord-api-types/v9'; +import { SlashCommandOptionBase } from '../mixins/CommandOptionBase'; +export declare class SlashCommandRoleOption extends SlashCommandOptionBase { + readonly type: ApplicationCommandOptionType.Role; + constructor(); +} +//# sourceMappingURL=role.d.ts.map \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/role.d.ts.map b/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/role.d.ts.map new file mode 100644 index 0000000..c4efc7a --- /dev/null +++ b/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/role.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"role.d.ts","sourceRoot":"/","sources":["interactions/slashCommands/options/role.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAErE,qBAAa,sBAAuB,SAAQ,sBAAsB;IACjE,SAAyB,IAAI,oCAA8C;;CAK3E"} \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/role.js b/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/role.js new file mode 100644 index 0000000..a01871a --- /dev/null +++ b/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/role.js @@ -0,0 +1,18 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SlashCommandRoleOption = void 0; +require("discord-api-types/v9"); +const CommandOptionBase_1 = require("../mixins/CommandOptionBase"); +class SlashCommandRoleOption extends CommandOptionBase_1.SlashCommandOptionBase { + constructor() { + super(8 /* Role */); + Object.defineProperty(this, "type", { + enumerable: true, + configurable: true, + writable: true, + value: 8 /* Role */ + }); + } +} +exports.SlashCommandRoleOption = SlashCommandRoleOption; +//# sourceMappingURL=role.js.map \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/role.js.map b/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/role.js.map new file mode 100644 index 0000000..d901da3 --- /dev/null +++ b/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/role.js.map @@ -0,0 +1 @@ +{"version":3,"file":"role.js","sourceRoot":"/","sources":["interactions/slashCommands/options/role.ts"],"names":[],"mappings":";;;AAAA,gCAAoE;AACpE,mEAAqE;AAErE,MAAa,sBAAuB,SAAQ,0CAAsB;IAGjE;QACC,KAAK,cAAmC,CAAC;QAH1C;;;;mBAAgC,YAA0C;WAAC;IAI3E,CAAC;CACD;AAND,wDAMC","sourcesContent":["import { ApplicationCommandOptionType } from 'discord-api-types/v9';\nimport { SlashCommandOptionBase } from '../mixins/CommandOptionBase';\n\nexport class SlashCommandRoleOption extends SlashCommandOptionBase {\n\tpublic override readonly type = ApplicationCommandOptionType.Role as const;\n\n\tpublic constructor() {\n\t\tsuper(ApplicationCommandOptionType.Role);\n\t}\n}\n"]} \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/string.d.ts b/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/string.d.ts new file mode 100644 index 0000000..3141ee7 --- /dev/null +++ b/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/string.d.ts @@ -0,0 +1,7 @@ +import { ApplicationCommandOptionType } from 'discord-api-types/v9'; +import { ApplicationCommandOptionWithChoicesBase } from '../mixins/CommandOptionWithChoices'; +export declare class SlashCommandStringOption extends ApplicationCommandOptionWithChoicesBase { + readonly type: ApplicationCommandOptionType.String; + constructor(); +} +//# sourceMappingURL=string.d.ts.map \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/string.d.ts.map b/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/string.d.ts.map new file mode 100644 index 0000000..cce8fc5 --- /dev/null +++ b/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/string.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"string.d.ts","sourceRoot":"/","sources":["interactions/slashCommands/options/string.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,uCAAuC,EAAE,MAAM,oCAAoC,CAAC;AAE7F,qBAAa,wBAAyB,SAAQ,uCAAuC,CAAC,MAAM,CAAC;IAC5F,SAAyB,IAAI,sCAAgD;;CAK7E"} \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/string.js b/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/string.js new file mode 100644 index 0000000..8578f86 --- /dev/null +++ b/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/string.js @@ -0,0 +1,18 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SlashCommandStringOption = void 0; +require("discord-api-types/v9"); +const CommandOptionWithChoices_1 = require("../mixins/CommandOptionWithChoices"); +class SlashCommandStringOption extends CommandOptionWithChoices_1.ApplicationCommandOptionWithChoicesBase { + constructor() { + super(3 /* String */); + Object.defineProperty(this, "type", { + enumerable: true, + configurable: true, + writable: true, + value: 3 /* String */ + }); + } +} +exports.SlashCommandStringOption = SlashCommandStringOption; +//# sourceMappingURL=string.js.map \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/string.js.map b/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/string.js.map new file mode 100644 index 0000000..68eac55 --- /dev/null +++ b/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/string.js.map @@ -0,0 +1 @@ +{"version":3,"file":"string.js","sourceRoot":"/","sources":["interactions/slashCommands/options/string.ts"],"names":[],"mappings":";;;AAAA,gCAAoE;AACpE,iFAA6F;AAE7F,MAAa,wBAAyB,SAAQ,kEAA+C;IAG5F;QACC,KAAK,gBAAqC,CAAC;QAH5C;;;;mBAAgC,cAA4C;WAAC;IAI7E,CAAC;CACD;AAND,4DAMC","sourcesContent":["import { ApplicationCommandOptionType } from 'discord-api-types/v9';\nimport { ApplicationCommandOptionWithChoicesBase } from '../mixins/CommandOptionWithChoices';\n\nexport class SlashCommandStringOption extends ApplicationCommandOptionWithChoicesBase {\n\tpublic override readonly type = ApplicationCommandOptionType.String as const;\n\n\tpublic constructor() {\n\t\tsuper(ApplicationCommandOptionType.String);\n\t}\n}\n"]} \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/user.d.ts b/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/user.d.ts new file mode 100644 index 0000000..341727c --- /dev/null +++ b/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/user.d.ts @@ -0,0 +1,7 @@ +import { ApplicationCommandOptionType } from 'discord-api-types/v9'; +import { SlashCommandOptionBase } from '../mixins/CommandOptionBase'; +export declare class SlashCommandUserOption extends SlashCommandOptionBase { + readonly type: ApplicationCommandOptionType.User; + constructor(); +} +//# sourceMappingURL=user.d.ts.map \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/user.d.ts.map b/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/user.d.ts.map new file mode 100644 index 0000000..9947f56 --- /dev/null +++ b/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/user.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"user.d.ts","sourceRoot":"/","sources":["interactions/slashCommands/options/user.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAErE,qBAAa,sBAAuB,SAAQ,sBAAsB;IACjE,SAAyB,IAAI,oCAA8C;;CAK3E"} \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/user.js b/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/user.js new file mode 100644 index 0000000..d4922ad --- /dev/null +++ b/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/user.js @@ -0,0 +1,18 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SlashCommandUserOption = void 0; +require("discord-api-types/v9"); +const CommandOptionBase_1 = require("../mixins/CommandOptionBase"); +class SlashCommandUserOption extends CommandOptionBase_1.SlashCommandOptionBase { + constructor() { + super(6 /* User */); + Object.defineProperty(this, "type", { + enumerable: true, + configurable: true, + writable: true, + value: 6 /* User */ + }); + } +} +exports.SlashCommandUserOption = SlashCommandUserOption; +//# sourceMappingURL=user.js.map \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/user.js.map b/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/user.js.map new file mode 100644 index 0000000..44bad52 --- /dev/null +++ b/node_modules/@discordjs/builders/dist/interactions/slashCommands/options/user.js.map @@ -0,0 +1 @@ +{"version":3,"file":"user.js","sourceRoot":"/","sources":["interactions/slashCommands/options/user.ts"],"names":[],"mappings":";;;AAAA,gCAAoE;AACpE,mEAAqE;AAErE,MAAa,sBAAuB,SAAQ,0CAAsB;IAGjE;QACC,KAAK,cAAmC,CAAC;QAH1C;;;;mBAAgC,YAA0C;WAAC;IAI3E,CAAC;CACD;AAND,wDAMC","sourcesContent":["import { ApplicationCommandOptionType } from 'discord-api-types/v9';\nimport { SlashCommandOptionBase } from '../mixins/CommandOptionBase';\n\nexport class SlashCommandUserOption extends SlashCommandOptionBase {\n\tpublic override readonly type = ApplicationCommandOptionType.User as const;\n\n\tpublic constructor() {\n\t\tsuper(ApplicationCommandOptionType.User);\n\t}\n}\n"]} \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/messages/embed/Assertions.d.ts b/node_modules/@discordjs/builders/dist/messages/embed/Assertions.d.ts new file mode 100644 index 0000000..7be2bd1 --- /dev/null +++ b/node_modules/@discordjs/builders/dist/messages/embed/Assertions.d.ts @@ -0,0 +1,23 @@ +import type { APIEmbedField } from 'discord-api-types/v9'; +export declare const fieldNamePredicate: import("ow").StringPredicate; +export declare const fieldValuePredicate: import("ow").StringPredicate; +export declare const fieldInlinePredicate: import("ow").BooleanPredicate & import("ow").BasePredicate; +export declare const embedFieldPredicate: import("ow").ObjectPredicate<{ + name: string; + value: string; + inline: boolean | undefined; +}>; +export declare const embedFieldsArrayPredicate: import("ow").ArrayPredicate<{ + name: string; + value: string; + inline: boolean | undefined; +}>; +export declare function validateFieldLength(fields: APIEmbedField[], amountAdding: number): void; +export declare const authorNamePredicate: import("ow").AnyPredicate; +export declare const urlPredicate: import("ow").AnyPredicate; +export declare const colorPredicate: import("ow").AnyPredicate; +export declare const descriptionPredicate: import("ow").AnyPredicate; +export declare const footerTextPredicate: import("ow").AnyPredicate; +export declare const timestampPredicate: import("ow").AnyPredicate; +export declare const titlePredicate: import("ow").AnyPredicate; +//# sourceMappingURL=Assertions.d.ts.map \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/messages/embed/Assertions.d.ts.map b/node_modules/@discordjs/builders/dist/messages/embed/Assertions.d.ts.map new file mode 100644 index 0000000..1c23e62 --- /dev/null +++ b/node_modules/@discordjs/builders/dist/messages/embed/Assertions.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Assertions.d.ts","sourceRoot":"/","sources":["messages/embed/Assertions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAG1D,eAAO,MAAM,kBAAkB,8BAAwC,CAAC;AAExE,eAAO,MAAM,mBAAmB,8BAAyC,CAAC;AAE1E,eAAO,MAAM,oBAAoB,iFAAsB,CAAC;AAExD,eAAO,MAAM,mBAAmB;;;;EAI9B,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;EAAuC,CAAC;AAE9E,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,aAAa,EAAE,EAAE,YAAY,EAAE,MAAM,GAAG,IAAI,CAEvF;AAED,eAAO,MAAM,mBAAmB,0CAAsC,CAAC;AAEvE,eAAO,MAAM,YAAY,sDAA4C,CAAC;AAEtE,eAAO,MAAM,cAAc,0CAA6E,CAAC;AAEzG,eAAO,MAAM,oBAAoB,0CAA0D,CAAC;AAE5F,eAAO,MAAM,mBAAmB,0CAA0D,CAAC;AAE3F,eAAO,MAAM,kBAAkB,iDAAsC,CAAC;AAEtE,eAAO,MAAM,cAAc,0CAAsC,CAAC"} \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/messages/embed/Assertions.js b/node_modules/@discordjs/builders/dist/messages/embed/Assertions.js new file mode 100644 index 0000000..4bed4a9 --- /dev/null +++ b/node_modules/@discordjs/builders/dist/messages/embed/Assertions.js @@ -0,0 +1,26 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.titlePredicate = exports.timestampPredicate = exports.footerTextPredicate = exports.descriptionPredicate = exports.colorPredicate = exports.urlPredicate = exports.authorNamePredicate = exports.validateFieldLength = exports.embedFieldsArrayPredicate = exports.embedFieldPredicate = exports.fieldInlinePredicate = exports.fieldValuePredicate = exports.fieldNamePredicate = void 0; +const tslib_1 = require("tslib"); +const ow_1 = tslib_1.__importDefault(require("ow")); +exports.fieldNamePredicate = ow_1.default.string.minLength(1).maxLength(256); +exports.fieldValuePredicate = ow_1.default.string.minLength(1).maxLength(1024); +exports.fieldInlinePredicate = ow_1.default.optional.boolean; +exports.embedFieldPredicate = ow_1.default.object.exactShape({ + name: exports.fieldNamePredicate, + value: exports.fieldValuePredicate, + inline: exports.fieldInlinePredicate, +}); +exports.embedFieldsArrayPredicate = ow_1.default.array.ofType(exports.embedFieldPredicate); +function validateFieldLength(fields, amountAdding) { + ow_1.default(fields.length + amountAdding, 'field amount', ow_1.default.number.lessThanOrEqual(25)); +} +exports.validateFieldLength = validateFieldLength; +exports.authorNamePredicate = ow_1.default.any(exports.fieldNamePredicate, ow_1.default.null); +exports.urlPredicate = ow_1.default.any(ow_1.default.string.url, ow_1.default.nullOrUndefined); +exports.colorPredicate = ow_1.default.any(ow_1.default.number.greaterThanOrEqual(0).lessThanOrEqual(0xffffff), ow_1.default.null); +exports.descriptionPredicate = ow_1.default.any(ow_1.default.string.minLength(1).maxLength(4096), ow_1.default.null); +exports.footerTextPredicate = ow_1.default.any(ow_1.default.string.minLength(1).maxLength(2048), ow_1.default.null); +exports.timestampPredicate = ow_1.default.any(ow_1.default.number, ow_1.default.date, ow_1.default.null); +exports.titlePredicate = ow_1.default.any(exports.fieldNamePredicate, ow_1.default.null); +//# sourceMappingURL=Assertions.js.map \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/messages/embed/Assertions.js.map b/node_modules/@discordjs/builders/dist/messages/embed/Assertions.js.map new file mode 100644 index 0000000..f5a39b2 --- /dev/null +++ b/node_modules/@discordjs/builders/dist/messages/embed/Assertions.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Assertions.js","sourceRoot":"/","sources":["messages/embed/Assertions.ts"],"names":[],"mappings":";;;;AACA,oDAAoB;AAEP,QAAA,kBAAkB,GAAG,YAAE,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,GA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AC,YAAE,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,YAAE,CAAC,IAAI,CAAC,CAAC;AAE9E,QAAA,kBAAkB,GAAG,YAAE,CAAC,GAAG,CAAC,YAAE,CAAC,MAAM,EAAE,YAAE,CAAC,IAAI,EAAE,YAAE,CAAC,IAAI,CAAC,CAAC;AAEzD,QAAA,cAAc,GAAG,YAAE,CAAC,GAAG,CAAC,0BAAkB,EAAE,YAAE,CAAC,IAAI,CAAC,CAAC","sourcesContent":["import type { APIEmbedField } from 'discord-api-types/v9';\nimport ow from 'ow';\n\nexport const fieldNamePredicate = ow.string.minLength(1).maxLength(256);\n\nexport const fieldValuePredicate = ow.string.minLength(1).maxLength(1024);\n\nexport const fieldInlinePredicate = ow.optional.boolean;\n\nexport const embedFieldPredicate = ow.object.exactShape({\n\tname: fieldNamePredicate,\n\tvalue: fieldValuePredicate,\n\tinline: fieldInlinePredicate,\n});\n\nexport const embedFieldsArrayPredicate = ow.array.ofType(embedFieldPredicate);\n\nexport function validateFieldLength(fields: APIEmbedField[], amountAdding: number): void {\n\tow(fields.length + amountAdding, 'field amount', ow.number.lessThanOrEqual(25));\n}\n\nexport const authorNamePredicate = ow.any(fieldNamePredicate, ow.null);\n\nexport const urlPredicate = ow.any(ow.string.url, ow.nullOrUndefined);\n\nexport const colorPredicate = ow.any(ow.number.greaterThanOrEqual(0).lessThanOrEqual(0xffffff), ow.null);\n\nexport const descriptionPredicate = ow.any(ow.string.minLength(1).maxLength(4096), ow.null);\n\nexport const footerTextPredicate = ow.any(ow.string.minLength(1).maxLength(2048), ow.null);\n\nexport const timestampPredicate = ow.any(ow.number, ow.date, ow.null);\n\nexport const titlePredicate = ow.any(fieldNamePredicate, ow.null);\n"]} \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/messages/embed/Embed.d.ts b/node_modules/@discordjs/builders/dist/messages/embed/Embed.d.ts new file mode 100644 index 0000000..b8ea02a --- /dev/null +++ b/node_modules/@discordjs/builders/dist/messages/embed/Embed.d.ts @@ -0,0 +1,140 @@ +import type { APIEmbed, APIEmbedAuthor, APIEmbedField, APIEmbedFooter, APIEmbedImage, APIEmbedProvider, APIEmbedThumbnail, APIEmbedVideo } from 'discord-api-types/v9'; +export interface AuthorOptions { + name: string; + url?: string; + iconURL?: string; +} +export interface FooterOptions { + text: string; + iconURL?: string; +} +/** + * Represents an embed in a message (image/video preview, rich embed, etc.) + */ +export declare class Embed implements APIEmbed { + /** + * An array of fields of this embed. + */ + fields: APIEmbedField[]; + /** + * The embed title. + */ + title?: string; + /** + * The embed description. + */ + description?: string; + /** + * The embed url. + */ + url?: string; + /** + * The embed color. + */ + color?: number; + /** + * The timestamp of the embed in the ISO format. + */ + timestamp?: string; + /** + * The embed thumbnail data. + */ + thumbnail?: APIEmbedThumbnail; + /** + * The embed image data. + */ + image?: APIEmbedImage; + /** + * Received video data. + */ + video?: APIEmbedVideo; + /** + * The embed author data. + */ + author?: APIEmbedAuthor; + /** + * Received data about the embed provider. + */ + provider?: APIEmbedProvider; + /** + * The embed footer data. + */ + footer?: APIEmbedFooter; + constructor(data?: APIEmbed); + /** + * The accumulated length for the embed title, description, fields, footer text, and author name. + */ + get length(): number; + /** + * Adds a field to the embed (max 25). + * @param field The field to add. + */ + addField(field: APIEmbedField): this; + /** + * Adds fields to the embed (max 25). + * @param fields The fields to add. + */ + addFields(...fields: APIEmbedField[]): this; + /** + * Removes, replaces, or inserts fields in the embed (max 25). + * @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 author of this embed. + * @param options The options for the author. + */ + setAuthor(options: AuthorOptions | null): this; + /** + * Sets the color of this embed. + * @param color The color of the embed. + */ + setColor(color: number | null): this; + /** + * Sets the description of this embed. + * @param description The description. + */ + setDescription(description: string | null): this; + /** + * Sets the footer of this embed. + * @param options The options for the footer. + */ + setFooter(options: FooterOptions | null): this; + /** + * Sets the image of this embed. + * @param url The URL of the image. + */ + setImage(url: string | null): this; + /** + * Sets the thumbnail of this embed. + * @param url The URL of the thumbnail. + */ + setThumbnail(url: string | null): this; + /** + * Sets the timestamp of this embed. + * @param timestamp The timestamp or date. + */ + setTimestamp(timestamp?: number | Date | null): this; + /** + * Sets the title of this embed. + * @param title The title. + */ + setTitle(title: string | null): this; + /** + * Sets the URL of this embed. + * @param url The URL. + */ + setURL(url: string | null): this; + /** + * Transforms the embed to a plain object. + */ + toJSON(): APIEmbed; + /** + * Normalizes field input and resolves strings. + * @param fields Fields to normalize. + */ + static normalizeFields(...fields: APIEmbedField[]): APIEmbedField[]; +} +//# sourceMappingURL=Embed.d.ts.map \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/messages/embed/Embed.d.ts.map b/node_modules/@discordjs/builders/dist/messages/embed/Embed.d.ts.map new file mode 100644 index 0000000..2ede024 --- /dev/null +++ b/node_modules/@discordjs/builders/dist/messages/embed/Embed.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Embed.d.ts","sourceRoot":"/","sources":["messages/embed/Embed.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,QAAQ,EACR,cAAc,EACd,aAAa,EACb,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EACjB,aAAa,EACb,MAAM,sBAAsB,CAAC;AAiB9B,MAAM,WAAW,aAAa;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,aAAa;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,qBAAa,KAAM,YAAW,QAAQ;IACrC;;OAEG;IACI,MAAM,EAAE,aAAa,EAAE,CAAC;IAE/B;;OAEG;IACI,KAAK,CAAC,EAAE,MAAM,CAAC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IACI,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAQ7C;;;OAGG;IACI,YAAY,CAAC,SAAS,GAAE,MAAM,GAAG,IAAI,GAAG,IAAiB,GAAG,IAAI;IAQvE;;;OAGG;IACI,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAQ3C;;;OAGG;IACI,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAQvC;;OAEG;IACI,MAAM,IAAI,QAAQ;IAIzB;;;OAGG;WACW,eAAe,CAAC,GAAG,MAAM,EAAE,aAAa,EAAE,GAAG,aAAa,EAAE;CAS1E"} \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/messages/embed/Embed.js b/node_modules/@discordjs/builders/dist/messages/embed/Embed.js new file mode 100644 index 0000000..0a956b9 --- /dev/null +++ b/node_modules/@discordjs/builders/dist/messages/embed/Embed.js @@ -0,0 +1,300 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Embed = void 0; +const tslib_1 = require("tslib"); +const ow_1 = tslib_1.__importDefault(require("ow")); +const Assertions_1 = require("./Assertions"); +/** + * Represents an embed in a message (image/video preview, rich embed, etc.) + */ +class Embed { + constructor(data = {}) { + /** + * An array of fields of this embed. + */ + Object.defineProperty(this, "fields", { + enumerable: true, + configurable: true, + writable: true, + value: void 0 + }); + /** + * The embed title. + */ + Object.defineProperty(this, "title", { + enumerable: true, + configurable: true, + writable: true, + value: void 0 + }); + /** + * The embed description. + */ + Object.defineProperty(this, "description", { + enumerable: true, + configurable: true, + writable: true, + value: void 0 + }); + /** + * The embed url. + */ + Object.defineProperty(this, "url", { + enumerable: true, + configurable: true, + writable: true, + value: void 0 + }); + /** + * The embed color. + */ + Object.defineProperty(this, "color", { + enumerable: true, + configurable: true, + writable: true, + value: void 0 + }); + /** + * The timestamp of the embed in the ISO format. + */ + Object.defineProperty(this, "timestamp", { + enumerable: true, + configurable: true, + writable: true, + value: void 0 + }); + /** + * The embed thumbnail data. + */ + Object.defineProperty(this, "thumbnail", { + enumerable: true, + configurable: true, + writable: true, + value: void 0 + }); + /** + * The embed image data. + */ + Object.defineProperty(this, "image", { + enumerable: true, + configurable: true, + writable: true, + value: void 0 + }); + /** + * Received video data. + */ + Object.defineProperty(this, "video", { + enumerable: true, + configurable: true, + writable: true, + value: void 0 + }); + /** + * The embed author data. + */ + Object.defineProperty(this, "author", { + enumerable: true, + configurable: true, + writable: true, + value: void 0 + }); + /** + * Received data about the embed provider. + */ + Object.defineProperty(this, "provider", { + enumerable: true, + configurable: true, + writable: true, + value: void 0 + }); + /** + * The embed footer data. + */ + Object.defineProperty(this, "footer", { + enumerable: true, + configurable: true, + writable: true, + value: void 0 + }); + this.title = data.title; + this.description = data.description; + this.url = data.url; + this.color = data.color; + this.thumbnail = data.thumbnail; + this.image = data.image; + this.video = data.video; + this.author = data.author; + this.provider = data.provider; + this.footer = data.footer; + this.fields = data.fields ?? []; + if (data.timestamp) + this.timestamp = new Date(data.timestamp).toISOString(); + } + /** + * The accumulated length for the embed title, description, fields, footer text, and author name. + */ + get length() { + return ((this.title?.length ?? 0) + + (this.description?.length ?? 0) + + this.fields.reduce((prev, curr) => prev + curr.name.length + curr.value.length, 0) + + (this.footer?.text.length ?? 0) + + (this.author?.name?.length ?? 0)); + } + /** + * Adds a field to the embed (max 25). + * @param field The field to add. + */ + addField(field) { + return this.addFields(field); + } + /** + * Adds fields to the embed (max 25). + * @param fields The fields to add. + */ + addFields(...fields) { + // Data assertions + ow_1.default(fields, 'fields', Assertions_1.embedFieldsArrayPredicate); + // Ensure adding these fields won't exceed the 25 field limit + Assertions_1.validateFieldLength(this.fields, fields.length); + this.fields.push(...Embed.normalizeFields(...fields)); + return this; + } + /** + * Removes, replaces, or inserts fields in the embed (max 25). + * @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) { + // Data assertions + ow_1.default(fields, 'fields', Assertions_1.embedFieldsArrayPredicate); + // Ensure adding these fields won't exceed the 25 field limit + Assertions_1.validateFieldLength(this.fields, fields.length - deleteCount); + this.fields.splice(index, deleteCount, ...Embed.normalizeFields(...fields)); + return this; + } + /** + * Sets the author of this embed. + * @param options The options for the author. + */ + setAuthor(options) { + if (options === null) { + this.author = undefined; + return this; + } + const { name, iconURL, url } = options; + // Data assertions + ow_1.default(name, 'name', Assertions_1.authorNamePredicate); + ow_1.default(iconURL, 'iconURL', Assertions_1.urlPredicate); + ow_1.default(url, 'url', Assertions_1.urlPredicate); + this.author = { name, url, icon_url: iconURL }; + return this; + } + /** + * Sets the color of this embed. + * @param color The color of the embed. + */ + setColor(color) { + // Data assertions + ow_1.default(color, 'color', Assertions_1.colorPredicate); + this.color = color ?? undefined; + return this; + } + /** + * Sets the description of this embed. + * @param description The description. + */ + setDescription(description) { + // Data assertions + ow_1.default(description, 'description', Assertions_1.descriptionPredicate); + this.description = description ?? undefined; + return this; + } + /** + * Sets the footer of this embed. + * @param options The options for the footer. + */ + setFooter(options) { + if (options === null) { + this.footer = undefined; + return this; + } + const { text, iconURL } = options; + // Data assertions + ow_1.default(text, 'text', Assertions_1.footerTextPredicate); + ow_1.default(iconURL, 'iconURL', Assertions_1.urlPredicate); + this.footer = { text, icon_url: iconURL }; + return this; + } + /** + * Sets the image of this embed. + * @param url The URL of the image. + */ + setImage(url) { + // Data assertions + ow_1.default(url, 'url', Assertions_1.urlPredicate); + this.image = url ? { url } : undefined; + return this; + } + /** + * Sets the thumbnail of this embed. + * @param url The URL of the thumbnail. + */ + setThumbnail(url) { + // Data assertions + ow_1.default(url, 'url', Assertions_1.urlPredicate); + this.thumbnail = url ? { url } : undefined; + return this; + } + /** + * Sets the timestamp of this embed. + * @param timestamp The timestamp or date. + */ + setTimestamp(timestamp = Date.now()) { + // Data assertions + ow_1.default(timestamp, 'timestamp', Assertions_1.timestampPredicate); + this.timestamp = timestamp ? new Date(timestamp).toISOString() : undefined; + return this; + } + /** + * Sets the title of this embed. + * @param title The title. + */ + setTitle(title) { + // Data assertions + ow_1.default(title, 'title', Assertions_1.titlePredicate); + this.title = title ?? undefined; + return this; + } + /** + * Sets the URL of this embed. + * @param url The URL. + */ + setURL(url) { + // Data assertions + ow_1.default(url, 'url', Assertions_1.urlPredicate); + this.url = url ?? undefined; + return this; + } + /** + * Transforms the embed to a plain object. + */ + toJSON() { + return { ...this }; + } + /** + * Normalizes field input and resolves strings. + * @param fields Fields to normalize. + */ + static normalizeFields(...fields) { + return fields.flat(Infinity).map((field) => { + ow_1.default(field.name, 'field name', Assertions_1.fieldNamePredicate); + ow_1.default(field.value, 'field value', Assertions_1.fieldValuePredicate); + ow_1.default(field.inline, 'field inline', Assertions_1.fieldInlinePredicate); + return { name: field.name, value: field.value, inline: field.inline ?? undefined }; + }); + } +} +exports.Embed = Embed; +//# sourceMappingURL=Embed.js.map \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/messages/embed/Embed.js.map b/node_modules/@discordjs/builders/dist/messages/embed/Embed.js.map new file mode 100644 index 0000000..289693a --- /dev/null +++ b/node_modules/@discordjs/builders/dist/messages/embed/Embed.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Embed.js","sourceRoot":"/","sources":["messages/embed/Embed.ts"],"names":[],"mappings":";;;;AAUA,oDAAoB;AACpB,6CAasB;AAatB;;GAEG;AACH,MAAa,KAAK;IA6DjB,YAAmB,OAAiB,EAAE;QA5DtC;;WAEG;QACH;;;;;WAA+B;QAE/B;;WAEG;QACH;;;;;WAAsB;QAEtB;;WAEG;QACH;;;;;WAA4B;QAE5B;;WAEG;QACH;;;;;WAAoB;QAEpB;;WAEG;QACH;;;;;WAAsB;QAEtB;;WAEG;QACH;;;;;WAA0B;QAE1B;;WAEG;QACH;;;;;WAAqC;QAErC;;WAEG;QACH;;;;;WAA6B;QAE7B;;WAEG;QACH;;;;;WAA6B;QAE7B;;WAEG;QACH;;;;;WAA+B;QAE/B;;WAEG;QACH;;;;;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AAe,CAAC,GAAG,MAAuB;QACvD,OAAO,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;YAC1C,YAAE,CAAC,KAAK,CAAC,IAAI,EAAE,YAAY,EAAE,+BAAkB,CAAC,CAAC;YACjD,YAAE,CAAC,KAAK,CAAC,KAAK,EAAE,aAAa,EAAE,gCAAmB,CAAC,CAAC;YACpD,YAAE,CAAC,KAAK,CAAC,MAAM,EAAE,cAAc,EAAE,iCAAoB,CAAC,CAAC;YAEvD,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,IAAI,SAAS,EAAE,CAAC;QACpF,CAAC,CAAC,CAAC;IACJ,CAAC;CACD;AAjRD,sBAiRC","sourcesContent":["import type {\n\tAPIEmbed,\n\tAPIEmbedAuthor,\n\tAPIEmbedField,\n\tAPIEmbedFooter,\n\tAPIEmbedImage,\n\tAPIEmbedProvider,\n\tAPIEmbedThumbnail,\n\tAPIEmbedVideo,\n} from 'discord-api-types/v9';\nimport ow from 'ow';\nimport {\n\tauthorNamePredicate,\n\tcolorPredicate,\n\tdescriptionPredicate,\n\tembedFieldsArrayPredicate,\n\tfieldInlinePredicate,\n\tfieldNamePredicate,\n\tfieldValuePredicate,\n\tfooterTextPredicate,\n\ttimestampPredicate,\n\ttitlePredicate,\n\turlPredicate,\n\tvalidateFieldLength,\n} from './Assertions';\n\nexport interface AuthorOptions {\n\tname: string;\n\turl?: string;\n\ticonURL?: string;\n}\n\nexport interface FooterOptions {\n\ttext: string;\n\ticonURL?: string;\n}\n\n/**\n * Represents an embed in a message (image/video preview, rich embed, etc.)\n */\nexport class Embed implements APIEmbed {\n\t/**\n\t * An array of fields of this embed.\n\t */\n\tpublic fields: APIEmbedField[];\n\n\t/**\n\t * The embed title.\n\t */\n\tpublic title?: string;\n\n\t/**\n\t * The embed description.\n\t */\n\tpublic description?: string;\n\n\t/**\n\t * The embed url.\n\t */\n\tpublic url?: string;\n\n\t/**\n\t * The embed color.\n\t */\n\tpublic color?: number;\n\n\t/**\n\t * The timestamp of the embed in the ISO format.\n\t */\n\tpublic timestamp?: string;\n\n\t/**\n\t * The embed thumbnail data.\n\t */\n\tpublic thumbnail?: APIEmbedThumbnail;\n\n\t/**\n\t * The embed image data.\n\t */\n\tpublic image?: APIEmbedImage;\n\n\t/**\n\t * Received video data.\n\t */\n\tpublic video?: APIEmbedVideo;\n\n\t/**\n\t * The embed author data.\n\t */\n\tpublic author?: APIEmbedAuthor;\n\n\t/**\n\t * Received data about the embed provider.\n\t */\n\tpublic provider?: APIEmbedProvider;\n\n\t/**\n\t * The embed footer data.\n\t */\n\tpublic footer?: APIEmbedFooter;\n\n\tpublic constructor(data: APIEmbed = {}) {\n\t\tthis.title = data.title;\n\t\tthis.description = data.description;\n\t\tthis.url = data.url;\n\t\tthis.color = data.color;\n\t\tthis.thumbnail = data.thumbnail;\n\t\tthis.image = data.image;\n\t\tthis.video = data.video;\n\t\tthis.author = data.author;\n\t\tthis.provider = data.provider;\n\t\tthis.footer = data.footer;\n\t\tthis.fields = data.fields ?? [];\n\n\t\tif (data.timestamp) this.timestamp = new Date(data.timestamp).toISOString();\n\t}\n\n\t/**\n\t * The accumulated length for the embed title, description, fields, footer text, and author name.\n\t */\n\tpublic get length(): number {\n\t\treturn (\n\t\t\t(this.title?.length ?? 0) +\n\t\t\t(this.description?.length ?? 0) +\n\t\t\tthis.fields.reduce((prev, curr) => prev + curr.name.length + curr.value.length, 0) +\n\t\t\t(this.footer?.text.length ?? 0) +\n\t\t\t(this.author?.name?.length ?? 0)\n\t\t);\n\t}\n\n\t/**\n\t * Adds a field to the embed (max 25).\n\t * @param field The field to add.\n\t */\n\tpublic addField(field: APIEmbedField): this {\n\t\treturn this.addFields(field);\n\t}\n\n\t/**\n\t * Adds fields to the embed (max 25).\n\t * @param fields The fields to add.\n\t */\n\tpublic addFields(...fields: APIEmbedField[]): this {\n\t\t// Data assertions\n\t\tow(fields, 'fields', embedFieldsArrayPredicate);\n\n\t\t// Ensure adding these fields won't exceed the 25 field limit\n\t\tvalidateFieldLength(this.fields, fields.length);\n\n\t\tthis.fields.push(...Embed.normalizeFields(...fields));\n\t\treturn this;\n\t}\n\n\t/**\n\t * Removes, replaces, or inserts fields in the embed (max 25).\n\t * @param index The index to start at.\n\t * @param deleteCount The number of fields to remove.\n\t * @param fields The replacing field objects.\n\t */\n\tpublic spliceFields(index: number, deleteCount: number, ...fields: APIEmbedField[]): this {\n\t\t// Data assertions\n\t\tow(fields, 'fields', embedFieldsArrayPredicate);\n\n\t\t// Ensure adding these fields won't exceed the 25 field limit\n\t\tvalidateFieldLength(this.fields, fields.length - deleteCount);\n\n\t\tthis.fields.splice(index, deleteCount, ...Embed.normalizeFields(...fields));\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the author of this embed.\n\t * @param options The options for the author.\n\t */\n\tpublic setAuthor(options: AuthorOptions | null): this {\n\t\tif (options === null) {\n\t\t\tthis.author = undefined;\n\t\t\treturn this;\n\t\t}\n\n\t\tconst { name, iconURL, url } = options;\n\t\t// Data assertions\n\t\tow(name, 'name', authorNamePredicate);\n\t\tow(iconURL, 'iconURL', urlPredicate);\n\t\tow(url, 'url', urlPredicate);\n\n\t\tthis.author = { name, url, icon_url: iconURL };\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the color of this embed.\n\t * @param color The color of the embed.\n\t */\n\tpublic setColor(color: number | null): this {\n\t\t// Data assertions\n\t\tow(color, 'color', colorPredicate);\n\n\t\tthis.color = color ?? undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the description of this embed.\n\t * @param description The description.\n\t */\n\tpublic setDescription(description: string | null): this {\n\t\t// Data assertions\n\t\tow(description, 'description', descriptionPredicate);\n\n\t\tthis.description = description ?? undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the footer of this embed.\n\t * @param options The options for the footer.\n\t */\n\tpublic setFooter(options: FooterOptions | null): this {\n\t\tif (options === null) {\n\t\t\tthis.footer = undefined;\n\t\t\treturn this;\n\t\t}\n\n\t\tconst { text, iconURL } = options;\n\t\t// Data assertions\n\t\tow(text, 'text', footerTextPredicate);\n\t\tow(iconURL, 'iconURL', urlPredicate);\n\n\t\tthis.footer = { text, icon_url: iconURL };\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the image of this embed.\n\t * @param url The URL of the image.\n\t */\n\tpublic setImage(url: string | null): this {\n\t\t// Data assertions\n\t\tow(url, 'url', urlPredicate);\n\n\t\tthis.image = url ? { url } : undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the thumbnail of this embed.\n\t * @param url The URL of the thumbnail.\n\t */\n\tpublic setThumbnail(url: string | null): this {\n\t\t// Data assertions\n\t\tow(url, 'url', urlPredicate);\n\n\t\tthis.thumbnail = url ? { url } : undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the timestamp of this embed.\n\t * @param timestamp The timestamp or date.\n\t */\n\tpublic setTimestamp(timestamp: number | Date | null = Date.now()): this {\n\t\t// Data assertions\n\t\tow(timestamp, 'timestamp', timestampPredicate);\n\n\t\tthis.timestamp = timestamp ? new Date(timestamp).toISOString() : undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the title of this embed.\n\t * @param title The title.\n\t */\n\tpublic setTitle(title: string | null): this {\n\t\t// Data assertions\n\t\tow(title, 'title', titlePredicate);\n\n\t\tthis.title = title ?? undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Sets the URL of this embed.\n\t * @param url The URL.\n\t */\n\tpublic setURL(url: string | null): this {\n\t\t// Data assertions\n\t\tow(url, 'url', urlPredicate);\n\n\t\tthis.url = url ?? undefined;\n\t\treturn this;\n\t}\n\n\t/**\n\t * Transforms the embed to a plain object.\n\t */\n\tpublic toJSON(): APIEmbed {\n\t\treturn { ...this };\n\t}\n\n\t/**\n\t * Normalizes field input and resolves strings.\n\t * @param fields Fields to normalize.\n\t */\n\tpublic static normalizeFields(...fields: APIEmbedField[]): APIEmbedField[] {\n\t\treturn fields.flat(Infinity).map((field) => {\n\t\t\tow(field.name, 'field name', fieldNamePredicate);\n\t\t\tow(field.value, 'field value', fieldValuePredicate);\n\t\t\tow(field.inline, 'field inline', fieldInlinePredicate);\n\n\t\t\treturn { name: field.name, value: field.value, inline: field.inline ?? undefined };\n\t\t});\n\t}\n}\n"]} \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/messages/formatters.d.ts b/node_modules/@discordjs/builders/dist/messages/formatters.d.ts new file mode 100644 index 0000000..80c8425 --- /dev/null +++ b/node_modules/@discordjs/builders/dist/messages/formatters.d.ts @@ -0,0 +1,198 @@ +/// +import type { Snowflake } from 'discord-api-types/globals'; +import type { URL } from 'url'; +/** + * Wraps the content inside a codeblock with no language. + * @param content The content to wrap. + */ +export declare function codeBlock(content: C): `\`\`\`\n${C}\`\`\``; +/** + * Wraps the content inside a codeblock with the specified language. + * @param language The language for the codeblock. + * @param content The content to wrap. + */ +export declare function codeBlock(language: L, content: C): `\`\`\`${L}\n${C}\`\`\``; +/** + * Wraps the content inside \`backticks\`, which formats it as inline code. + * @param content The content to wrap. + */ +export declare function inlineCode(content: C): `\`${C}\``; +/** + * Formats the content into italic text. + * @param content The content to wrap. + */ +export declare function italic(content: C): `_${C}_`; +/** + * Formats the content into bold text. + * @param content The content to wrap. + */ +export declare function bold(content: C): `**${C}**`; +/** + * Formats the content into underscored text. + * @param content The content to wrap. + */ +export declare function underscore(content: C): `__${C}__`; +/** + * Formats the content into strike-through text. + * @param content The content to wrap. + */ +export declare function strikethrough(content: C): `~~${C}~~`; +/** + * Formats the content into a quote. This needs to be at the start of the line for Discord to format it. + * @param content The content to wrap. + */ +export declare function quote(content: C): `> ${C}`; +/** + * Formats the content into a block quote. This needs to be at the start of the line for Discord to format it. + * @param content The content to wrap. + */ +export declare function blockQuote(content: C): `>>> ${C}`; +/** + * Wraps the URL into `<>`, which stops it from embedding. + * @param url The URL to wrap. + */ +export declare function hideLinkEmbed(url: C): `<${C}>`; +/** + * Wraps the URL into `<>`, which stops it from embedding. + * @param url The URL to wrap. + */ +export declare function hideLinkEmbed(url: URL): `<${string}>`; +/** + * Formats the content and the URL into a masked URL. + * @param content The content to display. + * @param url The URL the content links to. + */ +export declare function hyperlink(content: C, url: URL): `[${C}](${string})`; +/** + * Formats the content and the URL into a masked URL. + * @param content The content to display. + * @param url The URL the content links to. + */ +export declare function hyperlink(content: C, url: U): `[${C}](${U})`; +/** + * Formats the content and the URL into a masked URL. + * @param content The content to display. + * @param url The URL the content links to. + * @param title The title shown when hovering on the masked link. + */ +export declare function hyperlink(content: C, url: URL, title: T): `[${C}](${string} "${T}")`; +/** + * Formats the content and the URL into a masked URL. + * @param content The content to display. + * @param url The URL the content links to. + * @param title The title shown when hovering on the masked link. + */ +export declare function hyperlink(content: C, url: U, title: T): `[${C}](${U} "${T}")`; +/** + * Wraps the content inside spoiler (hidden text). + * @param content The content to wrap. + */ +export declare function spoiler(content: C): `||${C}||`; +/** + * Formats a user ID into a user mention. + * @param userId The user ID to format. + */ +export declare function userMention(userId: C): `<@${C}>`; +/** + * Formats a user ID into a member-nickname mention. + * @param memberId The user ID to format. + */ +export declare function memberNicknameMention(memberId: C): `<@!${C}>`; +/** + * Formats a channel ID into a channel mention. + * @param channelId The channel ID to format. + */ +export declare function channelMention(channelId: C): `<#${C}>`; +/** + * Formats a role ID into a role mention. + * @param roleId The role ID to format. + */ +export declare function roleMention(roleId: C): `<@&${C}>`; +/** + * Formats an emoji ID into a fully qualified emoji identifier + * @param emojiId The emoji ID to format. + */ +export declare function formatEmoji(emojiId: C, animated?: false): `<:_:${C}>`; +/** + * Formats an emoji ID into a fully qualified emoji identifier + * @param emojiId The emoji ID to format. + * @param animated Whether the emoji is animated or not. Defaults to `false` + */ +export declare function formatEmoji(emojiId: C, animated?: true): ``; +/** + * Formats a date into a short date-time string. + * @param date The date to format, defaults to the current time. + */ +export declare function time(date?: Date): ``; +/** + * Formats a date given a format style. + * @param date The date to format. + * @param style The style to use. + */ +export declare function time(date: Date, style: S): ``; +/** + * Formats the given timestamp into a short date-time string. + * @param seconds The time to format, represents an UNIX timestamp in seconds. + */ +export declare function time(seconds: C): ``; +/** + * Formats the given timestamp into a short date-time string. + * @param seconds The time to format, represents an UNIX timestamp in seconds. + * @param style The style to use. + */ +export declare function time(seconds: C, style: S): ``; +/** + * The [message formatting timestamp styles](https://discord.com/developers/docs/reference#message-formatting-timestamp-styles) supported by Discord. + */ +export declare const TimestampStyles: { + /** + * Short time format, consisting of hours and minutes, e.g. 16:20. + */ + readonly ShortTime: "t"; + /** + * Long time format, consisting of hours, minutes, and seconds, e.g. 16:20:30. + */ + readonly LongTime: "T"; + /** + * Short date format, consisting of day, month, and year, e.g. 20/04/2021. + */ + readonly ShortDate: "d"; + /** + * Long date format, consisting of day, month, and year, e.g. 20 April 2021. + */ + readonly LongDate: "D"; + /** + * Short date-time format, consisting of short date and short time formats, e.g. 20 April 2021 16:20. + */ + readonly ShortDateTime: "f"; + /** + * Long date-time format, consisting of long date and short time formats, e.g. Tuesday, 20 April 2021 16:20. + */ + readonly LongDateTime: "F"; + /** + * Relative time format, consisting of a relative duration format, e.g. 2 months ago. + */ + readonly RelativeTime: "R"; +}; +/** + * The possible values, see {@link TimestampStyles} for more information. + */ +export declare type TimestampStylesString = typeof TimestampStyles[keyof typeof TimestampStyles]; +/** + * An enum with all the available faces from Discord's native slash commands + */ +export declare enum Faces { + /** + * ¯\\_(ツ)\\_/¯ + */ + Shrug = "\u00AF\\_(\u30C4)\\_/\u00AF", + /** + * (╯°□°)╯︵ ┻━┻ + */ + Tableflip = "(\u256F\u00B0\u25A1\u00B0\uFF09\u256F\uFE35 \u253B\u2501\u253B", + /** + * ┬─┬ ノ( ゜-゜ノ) + */ + Unflip = "\u252C\u2500\u252C \u30CE( \u309C-\u309C\u30CE)" +} +//# sourceMappingURL=formatters.d.ts.map \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/messages/formatters.d.ts.map b/node_modules/@discordjs/builders/dist/messages/formatters.d.ts.map new file mode 100644 index 0000000..c77e9f2 --- /dev/null +++ b/node_modules/@discordjs/builders/dist/messages/formatters.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"formatters.d.ts","sourceRoot":"/","sources":["messages/formatters.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE/B;;;GAGG;AACH,wBAAgB,SAAS,CAAC,CAAC,SAAS,MAAM,EAAE,OAAO,EAAE,CAAC,GAAG,WAAW,CAAC,QAAQ,CAAC;AAE9E;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,MAAM,EAAE,QAAQ,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC,KAAK,CAAC,QAAQ,CAAC;AAKjH;;;GAGG;AACH,wBAAgB,UAAU,CAAC,CAAC,SAAS,MAAM,EAAE,OAAO,EAAE,CAAC,GAAG,KAAK,CAAC,IAAI,CAEnE;AAED;;;GAGG;AACH,wBAAgB,MAAM,CAAC,CAAC,SAAS,MAAM,EAAE,OAAO,EAAE,CAAC,GAAG,IAAI,CAAC,GAAG,CAE7D;AAED;;;GAGG;AACH,wBAAgB,IAAI,CAAC,CAAC,SAAS,MAAM,EAAE,OAAO,EAAE,CAAC,GAAG,KAAK,CAAC,IAAI,CAE7D;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,CAAC,SAAS,MAAM,EAAE,OAAO,EAAE,CAAC,GAAG,KAAK,CAAC,IAAI,CAEnE;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS,MAAM,EAAE,OAAO,EAAE,CAAC,GAAG,KAAK,CAAC,IAAI,CAEtE;AAED;;;GAGG;AAC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BAAqB,EAAE,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC;AAS/G;;GAEG;AACH,eAAO,MAAM,eAAe;IAC3B;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;CAEM,CAAC;AAEX;;GAEG;AACH,oBAAY,qBAAqB,GAAG,OAAO,eAAe,CAAC,MAAM,OAAO,eAAe,CAAC,CAAC;AAEzF;;GAEG;AACH,oBAAY,KAAK;IAChB;;OAEG;IACH,KAAK,gCAAiB;IAEtB;;OAEG;IACH,SAAS,mEAAiB;IAE1B;;OAEG;IACH,MAAM,oDAAiB;CACvB"} \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/messages/formatters.js b/node_modules/@discordjs/builders/dist/messages/formatters.js new file mode 100644 index 0000000..4794f87 --- /dev/null +++ b/node_modules/@discordjs/builders/dist/messages/formatters.js @@ -0,0 +1,181 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.Faces = exports.TimestampStyles = exports.time = exports.formatEmoji = exports.roleMention = exports.channelMention = exports.memberNicknameMention = exports.userMention = exports.spoiler = exports.hyperlink = exports.hideLinkEmbed = exports.blockQuote = exports.quote = exports.strikethrough = exports.underscore = exports.bold = exports.italic = exports.inlineCode = exports.codeBlock = void 0; +function codeBlock(language, content) { + return typeof content === 'undefined' ? `\`\`\`\n${language}\`\`\`` : `\`\`\`${language}\n${content}\`\`\``; +} +exports.codeBlock = codeBlock; +/** + * Wraps the content inside \`backticks\`, which formats it as inline code. + * @param content The content to wrap. + */ +function inlineCode(content) { + return `\`${content}\``; +} +exports.inlineCode = inlineCode; +/** + * Formats the content into italic text. + * @param content The content to wrap. + */ +function italic(content) { + return `_${content}_`; +} +exports.italic = italic; +/** + * Formats the content into bold text. + * @param content The content to wrap. + */ +function bold(content) { + return `**${content}**`; +} +exports.bold = bold; +/** + * Formats the content into underscored text. + * @param content The content to wrap. + */ +function underscore(content) { + return `__${content}__`; +} +exports.underscore = underscore; +/** + * Formats the content into strike-through text. + * @param content The content to wrap. + */ +function strikethrough(content) { + return `~~${content}~~`; +} +exports.strikethrough = strikethrough; +/** + * Formats the content into a quote. This needs to be at the start of the line for Discord to format it. + * @param content The content to wrap. + */ +function quote(content) { + return `> ${content}`; +} +exports.quote = quote; +/** + * Formats the content into a block quote. This needs to be at the start of the line for Discord to format it. + * @param content The content to wrap. + */ +function blockQuote(content) { + return `>>> ${content}`; +} +exports.blockQuote = blockQuote; +function hideLinkEmbed(url) { + // eslint-disable-next-line @typescript-eslint/restrict-template-expressions + return `<${url}>`; +} +exports.hideLinkEmbed = hideLinkEmbed; +function hyperlink(content, url, title) { + // eslint-disable-next-line @typescript-eslint/restrict-template-expressions + return title ? `[${content}](${url} "${title}")` : `[${content}](${url})`; +} +exports.hyperlink = hyperlink; +/** + * Wraps the content inside spoiler (hidden text). + * @param content The content to wrap. + */ +function spoiler(content) { + return `||${content}||`; +} +exports.spoiler = spoiler; +/** + * Formats a user ID into a user mention. + * @param userId The user ID to format. + */ +function userMention(userId) { + return `<@${userId}>`; +} +exports.userMention = userMention; +/** + * Formats a user ID into a member-nickname mention. + * @param memberId The user ID to format. + */ +function memberNicknameMention(memberId) { + return `<@!${memberId}>`; +} +exports.memberNicknameMention = memberNicknameMention; +/** + * Formats a channel ID into a channel mention. + * @param channelId The channel ID to format. + */ +function channelMention(channelId) { + return `<#${channelId}>`; +} +exports.channelMention = channelMention; +/** + * Formats a role ID into a role mention. + * @param roleId The role ID to format. + */ +function roleMention(roleId) { + return `<@&${roleId}>`; +} +exports.roleMention = roleMention; +/** + * Formats an emoji ID into a fully qualified emoji identifier + * @param emojiId The emoji ID to format. + * @param animated Whether the emoji is animated or not. Defaults to `false` + */ +function formatEmoji(emojiId, animated = false) { + return `<${animated ? 'a' : ''}:_:${emojiId}>`; +} +exports.formatEmoji = formatEmoji; +function time(timeOrSeconds, style) { + if (typeof timeOrSeconds !== 'number') { + timeOrSeconds = Math.floor((timeOrSeconds?.getTime() ?? Date.now()) / 1000); + } + return typeof style === 'string' ? `` : ``; +} +exports.time = time; +/** + * The [message formatting timestamp styles](https://discord.com/developers/docs/reference#message-formatting-timestamp-styles) supported by Discord. + */ +exports.TimestampStyles = { + /** + * Short time format, consisting of hours and minutes, e.g. 16:20. + */ + ShortTime: 't', + /** + * Long time format, consisting of hours, minutes, and seconds, e.g. 16:20:30. + */ + LongTime: 'T', + /** + * Short date format, consisting of day, month, and year, e.g. 20/04/2021. + */ + ShortDate: 'd', + /** + * Long date format, consisting of day, month, and year, e.g. 20 April 2021. + */ + LongDate: 'D', + /** + * Short date-time format, consisting of short date and short time formats, e.g. 20 April 2021 16:20. + */ + ShortDateTime: 'f', + /** + * Long date-time format, consisting of long date and short time formats, e.g. Tuesday, 20 April 2021 16:20. + */ + LongDateTime: 'F', + /** + * Relative time format, consisting of a relative duration format, e.g. 2 months ago. + */ + RelativeTime: 'R', +}; +/** + * An enum with all the available faces from Discord's native slash commands + */ +var Faces; +(function (Faces) { + /** + * ¯\\_(ツ)\\_/¯ + */ + Faces["Shrug"] = "\u00AF\\_(\u30C4)\\_/\u00AF"; + /** + * (╯°□°)╯︵ ┻━┻ + */ + Faces["Tableflip"] = "(\u256F\u00B0\u25A1\u00B0\uFF09\u256F\uFE35 \u253B\u2501\u253B"; + /** + * ┬─┬ ノ( ゜-゜ノ) + */ + Faces["Unflip"] = "\u252C\u2500\u252C \u30CE( \u309C-\u309C\u30CE)"; +})(Faces = exports.Faces || (exports.Faces = {})); +//# sourceMappingURL=formatters.js.map \ No newline at end of file diff --git a/node_modules/@discordjs/builders/dist/messages/formatters.js.map b/node_modules/@discordjs/builders/dist/messages/formatters.js.map new file mode 100644 index 0000000..6515f92 --- /dev/null +++ b/node_modules/@discordjs/builders/dist/messages/formatters.js.map @@ -0,0 +1 @@ +{"version":3,"file":"formatters.js","sourceRoot":"/","sources":["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AG;IAC9B;;OAEG;IACH,SAAS,EAAE,GAAG;IAEd;;OAEG;IACH,QAAQ,EAAE,GAAG;IAEb;;OAEG;IACH,SAAS,EAAE,GAAG;IAEd;;OAEG;IACH,QAAQ,EAAE,GAAG;IAEb;;OAEG;IACH,aAAa,EAAE,GAAG;IAElB;;OAEG;IACH,YAAY,EAAE,GAAG;IAEjB;;OAEG;IACH,YAAY,EAAE,GAAG;CACR,CAAC;AAOX;;GAEG;AACH,IAAY,KAeX;AAfD,WAAY,KAAK;IAChB;;OAEG;IACH,8CAAsB,CAAA;IAEtB;;OAEG;IACH,qFAA0B,CAAA;IAE1B;;OAEG;IACH,mEAAuB,CAAA;AACxB,CAAC,EAfW,KAAK,GAAL,aAAK,KAAL,aAAK,QAehB","sourcesContent":["import type { Snowflake } from 'discord-api-types/globals';\nimport type { URL } from 'url';\n\n/**\n * Wraps the content inside a codeblock with no language.\n * @param content The content to wrap.\n */\nexport function codeBlock(content: C): `\\`\\`\\`\\n${C}\\`\\`\\``;\n\n/**\n * Wraps the content inside a codeblock with the specified language.\n * @param language The language for the codeblock.\n * @param content The content to wrap.\n */\nexport function codeBlock(language: L, content: C): `\\`\\`\\`${L}\\n${C}\\`\\`\\``;\nexport function codeBlock(language: string, content?: string): string {\n\treturn typeof content === 'undefined' ? `\\`\\`\\`\\n${language}\\`\\`\\`` : `\\`\\`\\`${language}\\n${content}\\`\\`\\``;\n}\n\n/**\n * Wraps the content inside \\`backticks\\`, which formats it as inline code.\n * @param content The content to wrap.\n */\nexport function inlineCode(content: C): `\\`${C}\\`` {\n\treturn `\\`${content}\\``;\n}\n\n/**\n * Formats the content into italic text.\n * @param content The content to wrap.\n */\nexport function italic(content: C): `_${C}_` {\n\treturn `_${content}_`;\n}\n\n/**\n * Formats the content into bold text.\n * @param content The content to wrap.\n */\nexport function bold(content: C): `**${C}**` {\n\treturn `**${content}**`;\n}\n\n/**\n * Formats the content into underscored text.\n * @param content The content to wrap.\n */\nexport function underscore(content: C): `__${C}__` {\n\treturn `__${content}__`;\n}\n\n/**\n * Formats the content into strike-through text.\n * @param content The content to wrap.\n */\nexport function strikethrough(content: C): `~~${C}~~` {\n\treturn `~~${content}~~`;\n}\n\n/**\n * Formats the content into a quote. This needs to be at the start of the line for Discord to format it.\n * @param content The content to wrap.\n */\nexport function quote(content: C): `> ${C}` {\n\treturn `> ${content}`;\n}\n\n/**\n * Formats the content into a block quote. This needs to be at the start of the line for Discord to format it.\n * @param content The content to wrap.\n */\nexport function blockQuote(content: C): `>>> ${C}` {\n\treturn `>>> ${content}`;\n}\n\n/**\n * Wraps the URL into `<>`, which stops it from embedding.\n * @param url The URL to wrap.\n */\nexport function hideLinkEmbed(url: C): `<${C}>`;\n\n/**\n * Wraps the URL into `<>`, which stops it from embedding.\n * @param url The URL to wrap.\n */\nexport function hideLinkEmbed(url: URL): `<${string}>`;\nexport function hideLinkEmbed(url: string | URL) {\n\t// eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n\treturn `<${url}>`;\n}\n\n/**\n * Formats the content and the URL into a masked URL.\n * @param content The content to display.\n * @param url The URL the content links to.\n */\nexport function hyperlink(content: C, url: URL): `[${C}](${string})`;\n\n/**\n * Formats the content and the URL into a masked URL.\n * @param content The content to display.\n * @param url The URL the content links to.\n */\nexport function hyperlink(content: C, url: U): `[${C}](${U})`;\n\n/**\n * Formats the content and the URL into a masked URL.\n * @param content The content to display.\n * @param url The URL the content links to.\n * @param title The title shown when hovering on the masked link.\n */\nexport function hyperlink(\n\tcontent: C,\n\turl: URL,\n\ttitle: T,\n): `[${C}](${string} \"${T}\")`;\n\n/**\n * Formats the content and the URL into a masked URL.\n * @param content The content to display.\n * @param url The URL the content links to.\n * @param title The title shown when hovering on the masked link.\n */\nexport function hyperlink(\n\tcontent: C,\n\turl: U,\n\ttitle: T,\n): `[${C}](${U} \"${T}\")`;\nexport function hyperlink(content: string, url: string | URL, title?: string) {\n\t// eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n\treturn title ? `[${content}](${url} \"${title}\")` : `[${content}](${url})`;\n}\n\n/**\n * Wraps the content inside spoiler (hidden text).\n * @param content The content to wrap.\n */\nexport function spoiler(content: C): `||${C}||` {\n\treturn `||${content}||`;\n}\n\n/**\n * Formats a user ID into a user mention.\n * @param userId The user ID to format.\n */\nexport function userMention(userId: C): `<@${C}>` {\n\treturn `<@${userId}>`;\n}\n\n/**\n * Formats a user ID into a member-nickname mention.\n * @param memberId The user ID to format.\n */\nexport function memberNicknameMention(memberId: C): `<@!${C}>` {\n\treturn `<@!${memberId}>`;\n}\n\n/**\n * Formats a channel ID into a channel mention.\n * @param channelId The channel ID to format.\n */\nexport function channelMention(channelId: C): `<#${C}>` {\n\treturn `<#${channelId}>`;\n}\n\n/**\n * Formats a role ID into a role mention.\n * @param roleId The role ID to format.\n */\nexport function roleMention(roleId: C): `<@&${C}>` {\n\treturn `<@&${roleId}>`;\n}\n\n/**\n * Formats an emoji ID into a fully qualified emoji identifier\n * @param emojiId The emoji ID to format.\n */\nexport function formatEmoji(emojiId: C, animated?: false): `<:_:${C}>`;\n\n/**\n * Formats an emoji ID into a fully qualified emoji identifier\n * @param emojiId The emoji ID to format.\n * @param animated Whether the emoji is animated or not. Defaults to `false`\n */\nexport function formatEmoji(emojiId: C, animated?: true): ``;\n\n/**\n * Formats an emoji ID into a fully qualified emoji identifier\n * @param emojiId The emoji ID to format.\n * @param animated Whether the emoji is animated or not. Defaults to `false`\n */\nexport function formatEmoji(emojiId: C, animated = false): `` | `<:_:${C}>` {\n\treturn `<${animated ? 'a' : ''}:_:${emojiId}>`;\n}\n\n/**\n * Formats a date into a short date-time string.\n * @param date The date to format, defaults to the current time.\n */\nexport function time(date?: Date): ``;\n\n/**\n * Formats a date given a format style.\n * @param date The date to format.\n * @param style The style to use.\n */\nexport function time(date: Date, style: S): ``;\n\n/**\n * Formats the given timestamp into a short date-time string.\n * @param seconds The time to format, represents an UNIX timestamp in seconds.\n */\nexport function time(seconds: C): ``;\n\n/**\n * Formats the given timestamp into a short date-time string.\n * @param seconds The time to format, represents an UNIX timestamp in seconds.\n * @param style The style to use.\n */\nexport function time(seconds: C, style: S): ``;\nexport function time(timeOrSeconds?: number | Date, style?: TimestampStylesString): string {\n\tif (typeof timeOrSeconds !== 'number') {\n\t\ttimeOrSeconds = Math.floor((timeOrSeconds?.getTime() ?? Date.now()) / 1000);\n\t}\n\n\treturn typeof style === 'string' ? `` : ``;\n}\n\n/**\n * The [message formatting timestamp styles](https://discord.com/developers/docs/reference#message-formatting-timestamp-styles) supported by Discord.\n */\nexport const TimestampStyles = {\n\t/**\n\t * Short time format, consisting of hours and minutes, e.g. 16:20.\n\t */\n\tShortTime: 't',\n\n\t/**\n\t * Long time format, consisting of hours, minutes, and seconds, e.g. 16:20:30.\n\t */\n\tLongTime: 'T',\n\n\t/**\n\t * Short date format, consisting of day, month, and year, e.g. 20/04/2021.\n\t */\n\tShortDate: 'd',\n\n\t/**\n\t * Long date format, consisting of day, month, and year, e.g. 20 April 2021.\n\t */\n\tLongDate: 'D',\n\n\t/**\n\t * Short date-time format, consisting of short date and short time formats, e.g. 20 April 2021 16:20.\n\t */\n\tShortDateTime: 'f',\n\n\t/**\n\t * Long date-time format, consisting of long date and short time formats, e.g. Tuesday, 20 April 2021 16:20.\n\t */\n\tLongDateTime: 'F',\n\n\t/**\n\t * Relative time format, consisting of a relative duration format, e.g. 2 months ago.\n\t */\n\tRelativeTime: 'R',\n} as const;\n\n/**\n * The possible values, see {@link TimestampStyles} for more information.\n */\nexport type TimestampStylesString = typeof TimestampStyles[keyof typeof TimestampStyles];\n\n/**\n * An enum with all the available faces from Discord's native slash commands\n */\nexport enum Faces {\n\t/**\n\t * ¯\\\\_(ツ)\\\\_/¯\n\t */\n\tShrug = '¯\\\\_(ツ)\\\\_/¯',\n\n\t/**\n\t * (╯°□°)╯︵ ┻━┻\n\t */\n\tTableflip = '(╯°□°)╯︵ ┻━┻',\n\n\t/**\n\t * ┬─┬ ノ( ゜-゜ノ)\n\t */\n\tUnflip = '┬─┬ ノ( ゜-゜ノ)',\n}\n"]} \ No newline at end of file diff --git a/node_modules/@discordjs/builders/node_modules/discord-api-types/LICENSE b/node_modules/@discordjs/builders/node_modules/discord-api-types/LICENSE new file mode 100644 index 0000000..a8b1694 --- /dev/null +++ b/node_modules/@discordjs/builders/node_modules/discord-api-types/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 vladfrangu + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@discordjs/builders/node_modules/discord-api-types/README.md b/node_modules/@discordjs/builders/node_modules/discord-api-types/README.md new file mode 100644 index 0000000..e0ab3b3 --- /dev/null +++ b/node_modules/@discordjs/builders/node_modules/discord-api-types/README.md @@ -0,0 +1,97 @@ +# Discord API Types + +[![GitHub](https://img.shields.io/github/license/discordjs/discord-api-types)](https://github.com/discordjs/discord-api-types/blob/main/LICENSE.md) +[![npm](https://img.shields.io/npm/v/discord-api-types?color=crimson&logo=npm)](https://www.npmjs.com/package/discord-api-types) +[![deno](https://img.shields.io/npm/v/discord-api-types?color=blue&label=deno&logo=deno)](https://deno.land/x/discord_api_types) +[![Patreon Donate](https://img.shields.io/badge/patreon-donate-brightgreen.svg?label=Donate%20with%20Patreon&logo=patreon&colorB=F96854&link=https://www.patreon.com/vladfrangu)](https://www.patreon.com/vladfrangu) +[![Ko-fi Donate](https://img.shields.io/badge/kofi-donate-brightgreen.svg?label=Donate%20with%20Ko-fi&logo=ko-fi&colorB=F16061&link=https://ko-fi.com/wolfgalvlad&logoColor=FFFFFF)](https://ko-fi.com/wolfgalvlad) +[![GitHub Sponsors](https://img.shields.io/badge/patreon-donate-brightgreen.svg?label=Sponsor%20through%20GitHub&logo=github&colorB=F96854&link=https://github.com/sponsors/vladfrangu)](https://github.com/sponsors/vladfrangu) + +Simple type definitions for the [Discord API](https://discord.com/developers/docs/intro). + +## Installation + +Install with [npm](https://www.npmjs.com/) / [yarn](https://yarnpkg.com) / [pnpm](https://pnpm.js.org/): + +```sh +npm install discord-api-types +yarn add discord-api-types +pnpm add discord-api-types +``` + +### Usage + +You can only import this module by specifying the API version you want to target. Append `/v*` to the import path, where the `*` represents the API version. Below are some examples + +```js +const { APIUser } = require('discord-api-types/v9'); +``` + +```ts +// TypeScript/ES Module support +import { APIUser } from 'discord-api-types/v9'; +``` + +You may also import just certain parts of the module that you need. The possible values are: `globals`, `gateway`, `gateway/v*`, `payloads`, `payloads/v*`, `rest`, `rest/v*`, `rpc`, `rpc/v*`, `utils`, `utils/v*`, `voice`, and `voice/v*`. Below are some examples + +```js +const { GatewayVersion } = require('discord-api-types/gateway/v9'); +``` + +```ts +// TypeScript/ES Module support +import { GatewayVersion } from 'discord-api-types/gateway/v9'; +``` + +> _**Note:** The `v*` exports (`discord-api-type/v*`) include the appropriate version of `gateway`, `payloads`, `rest`, `rpc`, and `utils` you specified, alongside the `globals` exports_ + +### Deno + +We also provide typings compatible with the [deno](https://deno.land/) runtime. You have 3 ways you can import them: + +1. Directly from GitHub + +```ts +// Importing a specific API version +import { APIUser } from 'https://raw.githubusercontent.com/discordjs/discord-api-types/main/deno/v9.ts'; +``` + +2. From [deno.land/x](https://deno.land/x) + +```ts +// Importing a specific API version +import { APIUser } from 'https://deno.land/x/discord_api_types/v9.ts'; +``` + +3. From [skypack.dev](https://www.skypack.dev/) + +```ts +// Importing a specific API version +import { APIUser } from 'https://cdn.skypack.dev/discord-api-types/v9?dts'; +``` + +## Project Structure + +The exports of each API version is split into three main parts: + +- Everything exported with the `API` prefix represents a payload you may get from the REST API _or_ the Gateway. + +- Everything exported with the `Gateway` prefix represents data that ONLY comes from or is directly related to the Gateway. + +- Everything exported with the `REST` prefix represents data that ONLY comes from or is directly related to the REST API. + + - For endpoint options, they will follow the following structure: `REST` where the type represents what it will return. + + - For example, `RESTPostAPIChannelMessageJSONBody` or `RESTGetAPIGatewayBotInfoResult`. + + - Some exported types (specifically OAuth2 related ones) may not respect this entire structure due to the nature of the fields. They will start with either `RESTOAuth2` or with something similar to `RESTOAuth2` + + - If a type ends with `Result`, then it represents the expected result by calling its accompanying route. + + - Types that are exported as `never` usually mean the result will be a `204 No Content`, so you can safely ignore it. This does **not** account for errors. + +- Anything else that is miscellaneous will be exported based on what it represents (for example the `REST` route object). + +- There may be types exported that are identical for all versions. These will be exported as is and can be found in the `globals` file. They will still be prefixed accordingly as described above. + +**Warning**: This package documents just KNOWN (and documented) properties. Anything that isn't documented will NOT be added to this package (unless said properties are in an open Pull Request to Discord's [API Documentation repository](https://github.com/discord/discord-api-docs) or known through other means _and have received the green light to be used_). For clarification's sake, this means that properties that are only known through the process of data mining and have not yet been confirmed in a way as described will **NOT** be included. diff --git a/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/common.d.ts b/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/common.d.ts new file mode 100644 index 0000000..c77bc48 --- /dev/null +++ b/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/common.d.ts @@ -0,0 +1,9 @@ +/** + * https://discord.com/developers/docs/topics/gateway#connecting-gateway-url-params + */ +export interface GatewayURLQuery { + v: string; + encoding: 'json' | 'etf'; + compress?: 'zlib-stream'; +} +//# sourceMappingURL=common.d.ts.map \ No newline at end of file diff --git a/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/common.d.ts.map b/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/common.d.ts.map new file mode 100644 index 0000000..59c2f60 --- /dev/null +++ b/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/common.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["common.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,eAAe;IAC/B,CAAC,EAAE,MAAM,CAAC;IACV,QAAQ,EAAE,MAAM,GAAG,KAAK,CAAC;IACzB,QAAQ,CAAC,EAAE,aAAa,CAAC;CACzB"} \ No newline at end of file diff --git a/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/common.js b/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/common.js new file mode 100644 index 0000000..b9529e7 --- /dev/null +++ b/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/common.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=common.js.map \ No newline at end of file diff --git a/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/common.js.map b/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/common.js.map new file mode 100644 index 0000000..d0f541d --- /dev/null +++ b/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/common.js.map @@ -0,0 +1 @@ +{"version":3,"file":"common.js","sourceRoot":"","sources":["common.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/index.d.ts b/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/index.d.ts new file mode 100644 index 0000000..f63d200 --- /dev/null +++ b/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/index.d.ts @@ -0,0 +1,2 @@ +export * from './v9'; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/index.d.ts.map b/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/index.d.ts.map new file mode 100644 index 0000000..c1a119e --- /dev/null +++ b/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAGA,cAAc,MAAM,CAAC"} \ No newline at end of file diff --git a/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/index.js b/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/index.js new file mode 100644 index 0000000..92089f2 --- /dev/null +++ b/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/index.js @@ -0,0 +1,16 @@ +"use strict"; +// This file exports all the types available in the recommended gateway version +// Thereby, things MAY break in the future. Try sticking to imports from a specific version +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +__exportStar(require("./v9"), exports); +//# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/index.js.map b/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/index.js.map new file mode 100644 index 0000000..e8cb276 --- /dev/null +++ b/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAAA,+EAA+E;AAC/E,2FAA2F;;;;;;;;;;;;AAE3F,uCAAqB"} \ No newline at end of file diff --git a/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/index.mjs b/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/index.mjs new file mode 100644 index 0000000..fd4ff25 --- /dev/null +++ b/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/index.mjs @@ -0,0 +1,8 @@ +import mod from "./index.js"; + +export default mod; +export const GatewayCloseCodes = mod.GatewayCloseCodes; +export const GatewayDispatchEvents = mod.GatewayDispatchEvents; +export const GatewayIntentBits = mod.GatewayIntentBits; +export const GatewayOpcodes = mod.GatewayOpcodes; +export const GatewayVersion = mod.GatewayVersion; diff --git a/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/v6.d.ts b/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/v6.d.ts new file mode 100644 index 0000000..949ceee --- /dev/null +++ b/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/v6.d.ts @@ -0,0 +1,608 @@ +/** + * Types extracted from https://discord.com/developers/docs/topics/gateway + */ +import type { APIChannel, APIEmoji, APIGuild, APIGuildMember, APIMessage, APIRole, APIUnavailableGuild, APIUser, GatewayActivity, GatewayPresenceUpdate as RawGatewayPresenceUpdate, GatewayVoiceState, InviteTargetUserType, PresenceUpdateStatus } from '../payloads/v6/index'; +export * from './common'; +/** + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +export declare const GatewayVersion = "6"; +/** + * https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-opcodes + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +export declare enum GatewayOPCodes { + Dispatch = 0, + Heartbeat = 1, + Identify = 2, + PresenceUpdate = 3, + VoiceStateUpdate = 4, + Resume = 6, + Reconnect = 7, + RequestGuildMembers = 8, + InvalidSession = 9, + Hello = 10, + HeartbeatAck = 11 +} +/** + * https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-close-event-codes + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +export declare enum GatewayCloseCodes { + UnknownError = 4000, + UnknownOpCode = 4001, + DecodeError = 4002, + NotAuthenticated = 4003, + AuthenticationFailed = 4004, + AlreadyAuthenticated = 4005, + InvalidSeq = 4007, + RateLimited = 4008, + SessionTimedOut = 4009, + InvalidShard = 4010, + ShardingRequired = 4011, + InvalidAPIVersion = 4012, + InvalidIntents = 4013, + DisallowedIntents = 4014 +} +/** + * https://discord.com/developers/docs/topics/opcodes-and-status-codes#voice-voice-opcodes + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +export declare enum VoiceOPCodes { + Identify = 0, + SelectProtocol = 1, + Ready = 2, + Heartbeat = 3, + SessionDescription = 4, + Speaking = 5, + HeartbeatAck = 6, + Resume = 7, + Hello = 8, + Resumed = 9, + ClientDisconnect = 13 +} +/** + * https://discord.com/developers/docs/topics/opcodes-and-status-codes#voice-voice-close-event-codes + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +export declare enum VoiceCloseCodes { + UnknownOpCode = 4001, + NotAuthenticated = 4003, + AuthenticationFailed = 4004, + AlreadyAuthenticated = 4005, + SessionNoLongerValid = 4006, + SessionTimeout = 4009, + ServerNotFound = 4011, + UnknownProtocol = 4012, + Disconnected = 4014, + VoiceServerCrashed = 4015, + UnknownEncryptionMode = 4016 +} +/** + * https://discord.com/developers/docs/topics/gateway#list-of-intents + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +export declare enum GatewayIntentBits { + GUILDS = 1, + GUILD_MEMBERS = 2, + GUILD_BANS = 4, + GUILD_EMOJIS = 8, + GUILD_INTEGRATIONS = 16, + GUILD_WEBHOOKS = 32, + GUILD_INVITES = 64, + GUILD_VOICE_STATES = 128, + GUILD_PRESENCES = 256, + GUILD_MESSAGES = 512, + GUILD_MESSAGE_REACTIONS = 1024, + GUILD_MESSAGE_TYPING = 2048, + DIRECT_MESSAGES = 4096, + DIRECT_MESSAGE_REACTIONS = 8192, + DIRECT_MESSAGE_TYPING = 16384 +} +/** + * https://discord.com/developers/docs/topics/gateway#commands-and-events-gateway-events + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +export declare enum GatewayDispatchEvents { + Ready = "READY", + Resumed = "RESUMED", + ChannelCreate = "CHANNEL_CREATE", + ChannelUpdate = "CHANNEL_UPDATE", + ChannelDelete = "CHANNEL_DELETE", + ChannelPinsUpdate = "CHANNEL_PINS_UPDATE", + GuildCreate = "GUILD_CREATE", + GuildUpdate = "GUILD_UPDATE", + GuildDelete = "GUILD_DELETE", + GuildBanAdd = "GUILD_BAN_ADD", + GuildBanRemove = "GUILD_BAN_REMOVE", + GuildEmojisUpdate = "GUILD_EMOJIS_UPDATE", + GuildIntegrationsUpdate = "GUILD_INTEGRATIONS_UPDATE", + GuildMemberAdd = "GUILD_MEMBER_ADD", + GuildMemberRemove = "GUILD_MEMBER_REMOVE", + GuildMemberUpdate = "GUILD_MEMBER_UPDATE", + GuildMembersChunk = "GUILD_MEMBERS_CHUNK", + GuildRoleCreate = "GUILD_ROLE_CREATE", + GuildRoleUpdate = "GUILD_ROLE_UPDATE", + GuildRoleDelete = "GUILD_ROLE_DELETE", + InviteCreate = "INVITE_CREATE", + InviteDelete = "INVITE_DELETE", + MessageCreate = "MESSAGE_CREATE", + MessageUpdate = "MESSAGE_UPDATE", + MessageDelete = "MESSAGE_DELETE", + MessageDeleteBulk = "MESSAGE_DELETE_BULK", + MessageReactionAdd = "MESSAGE_REACTION_ADD", + MessageReactionRemove = "MESSAGE_REACTION_REMOVE", + MessageReactionRemoveAll = "MESSAGE_REACTION_REMOVE_ALL", + MessageReactionRemoveEmoji = "MESSAGE_REACTION_REMOVE_EMOJI", + PresenceUpdate = "PRESENCE_UPDATE", + TypingStart = "TYPING_START", + UserUpdate = "USER_UPDATE", + VoiceStateUpdate = "VOICE_STATE_UPDATE", + VoiceServerUpdate = "VOICE_SERVER_UPDATE", + WebhooksUpdate = "WEBHOOKS_UPDATE" +} +/** + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +export declare type GatewaySendPayload = GatewayHeartbeat | GatewayIdentify | GatewayUpdatePresence | GatewayVoiceStateUpdate | GatewayResume | GatewayRequestGuildMembers; +/** + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +export declare type GatewayReceivePayload = GatewayHello | GatewayHeartbeatRequest | GatewayHeartbeatAck | GatewayInvalidSession | GatewayReconnect | GatewayDispatchPayload; +/** + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +export declare type GatewayDispatchPayload = GatewayReadyDispatch | GatewayResumedDispatch | GatewayChannelModifyDispatch | GatewayChannelPinsUpdateDispatch | GatewayGuildModifyDispatch | GatewayGuildDeleteDispatch | GatewayGuildBanModifyDispatch | GatewayGuildEmojisUpdateDispatch | GatewayGuildIntegrationsUpdateDispatch | GatewayGuildMemberAddDispatch | GatewayGuildMemberRemoveDispatch | GatewayGuildMemberUpdateDispatch | GatewayGuildMembersChunkDispatch | GatewayGuildRoleModifyDispatch | GatewayGuildRoleDeleteDispatch | GatewayInviteCreateDispatch | GatewayInviteDeleteDispatch | GatewayMessageCreateDispatch | GatewayMessageUpdateDispatch | GatewayMessageDeleteDispatch | GatewayMessageDeleteBulkDispatch | GatewayMessageReactionAddDispatch | GatewayMessageReactionRemoveDispatch | GatewayMessageReactionRemoveAllDispatch | GatewayMessageReactionRemoveEmojiDispatch | GatewayPresenceUpdateDispatch | GatewayTypingStartDispatch | GatewayUserUpdateDispatch | GatewayVoiceStateUpdateDispatch | GatewayVoiceServerUpdateDispatch | GatewayWebhooksUpdateDispatch; +/** + * https://discord.com/developers/docs/topics/gateway#hello + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +export interface GatewayHello extends NonDispatchPayload { + op: GatewayOPCodes.Hello; + d: { + heartbeat_interval: number; + }; +} +/** + * https://discord.com/developers/docs/topics/gateway#heartbeating + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +export interface GatewayHeartbeatRequest extends NonDispatchPayload { + op: GatewayOPCodes.Heartbeat; + d: never; +} +/** + * https://discord.com/developers/docs/topics/gateway#heartbeating-example-gateway-heartbeat-ack + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +export interface GatewayHeartbeatAck extends NonDispatchPayload { + op: GatewayOPCodes.HeartbeatAck; + d: never; +} +/** + * https://discord.com/developers/docs/topics/gateway#invalid-session + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +export interface GatewayInvalidSession extends NonDispatchPayload { + op: GatewayOPCodes.InvalidSession; + d: boolean; +} +/** + * https://discord.com/developers/docs/topics/gateway#reconnect + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +export interface GatewayReconnect extends NonDispatchPayload { + op: GatewayOPCodes.Reconnect; + d: never; +} +/** + * https://discord.com/developers/docs/topics/gateway#ready + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +export declare type GatewayReadyDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#resumed + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +export declare type GatewayResumedDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#channel-create + * https://discord.com/developers/docs/topics/gateway#channel-update + * https://discord.com/developers/docs/topics/gateway#channel-delete + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +export declare type GatewayChannelModifyDispatch = DataPayload; +/** + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +export declare type GatewayChannelCreateDispatch = GatewayChannelModifyDispatch; +/** + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +export declare type GatewayChannelUpdateDispatch = GatewayChannelModifyDispatch; +/** + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +export declare type GatewayChannelDeleteDispatch = GatewayChannelModifyDispatch; +/** + * https://discord.com/developers/docs/topics/gateway#channel-pins-update + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +export declare type GatewayChannelPinsUpdateDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#guild-create + * https://discord.com/developers/docs/topics/gateway#guild-update + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +export declare type GatewayGuildModifyDispatch = DataPayload; +/** + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +export declare type GatewayGuildCreateDispatch = GatewayGuildModifyDispatch; +/** + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +export declare type GatewayGuildUpdateDispatch = GatewayGuildModifyDispatch; +/** + * https://discord.com/developers/docs/topics/gateway#guild-delete + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +export declare type GatewayGuildDeleteDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#guild-ban-add + * https://discord.com/developers/docs/topics/gateway#guild-ban-remove + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +export declare type GatewayGuildBanModifyDispatch = DataPayload; +/** + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +export declare type GatewayGuildBanAddDispatch = GatewayGuildBanModifyDispatch; +/** + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +export declare type GatewayGuildBanRemoveDispatch = GatewayGuildBanModifyDispatch; +/** + * https://discord.com/developers/docs/topics/gateway#guild-emojis-update + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +export declare type GatewayGuildEmojisUpdateDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#guild-integrations-update + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +export declare type GatewayGuildIntegrationsUpdateDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#guild-member-add + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +export declare type GatewayGuildMemberAddDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#guild-member-remove + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +export declare type GatewayGuildMemberRemoveDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#guild-member-update + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +export declare type GatewayGuildMemberUpdateDispatch = DataPayload & { + guild_id: string; +}>; +/** + * https://discord.com/developers/docs/topics/gateway#guild-members-chunk + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +export declare type GatewayGuildMembersChunkDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#guild-role-create + * https://discord.com/developers/docs/topics/gateway#guild-role-update + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +export declare type GatewayGuildRoleModifyDispatch = DataPayload; +/** + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +export declare type GatewayGuildRoleCreateDispatch = GatewayGuildRoleModifyDispatch; +/** + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +export declare type GatewayGuildRoleUpdateDispatch = GatewayGuildRoleModifyDispatch; +/** + * https://discord.com/developers/docs/topics/gateway#guild-role-delete + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +export declare type GatewayGuildRoleDeleteDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#invite-create + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +export declare type GatewayInviteCreateDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#invite-delete + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +export declare type GatewayInviteDeleteDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#message-create + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +export declare type GatewayMessageCreateDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#message-update + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +export declare type GatewayMessageUpdateDispatch = DataPayload>; +/** + * https://discord.com/developers/docs/topics/gateway#message-delete + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +export declare type GatewayMessageDeleteDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#message-delete-bulk + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +export declare type GatewayMessageDeleteBulkDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#message-reaction-add + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +export declare type GatewayMessageReactionAddDispatch = ReactionData; +/** + * https://discord.com/developers/docs/topics/gateway#message-reaction-remove + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +export declare type GatewayMessageReactionRemoveDispatch = ReactionData; +/** + * https://discord.com/developers/docs/topics/gateway#message-reaction-remove-all + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +export declare type GatewayMessageReactionRemoveAllDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#message-reaction-remove-emoji + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +export declare type GatewayMessageReactionRemoveEmojiDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#presence-update + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +export declare type GatewayPresenceUpdateDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#typing-start + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +export declare type GatewayTypingStartDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#user-update + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +export declare type GatewayUserUpdateDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#voice-state-update + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +export declare type GatewayVoiceStateUpdateDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#voice-server-update + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +export declare type GatewayVoiceServerUpdateDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#webhooks-update + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +export declare type GatewayWebhooksUpdateDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#heartbeating + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +export interface GatewayHeartbeat { + op: GatewayOPCodes.Heartbeat; + d: number; +} +/** + * https://discord.com/developers/docs/topics/gateway#identify-identify-connection-properties + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +export interface GatewayIdentifyProperties { + $os: string; + $browser: string; + $device: string; +} +/** + * https://discord.com/developers/docs/topics/gateway#identify + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +export interface GatewayIdentify { + op: GatewayOPCodes.Identify; + d: { + token: string; + properties: GatewayIdentifyProperties; + compress?: boolean; + large_threshold?: number; + shard?: [shard_id: number, shard_count: number]; + presence?: RawGatewayPresenceUpdate; + guild_subscriptions?: boolean; + intents?: number; + }; +} +/** + * https://discord.com/developers/docs/topics/gateway#resume + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +export interface GatewayResume { + op: GatewayOPCodes.Resume; + d: { + token: string; + session_id: string; + seq: number; + }; +} +/** + * https://discord.com/developers/docs/topics/gateway#request-guild-members + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +export interface GatewayRequestGuildMembers { + op: GatewayOPCodes.RequestGuildMembers; + d: { + guild_id: string | string[]; + query?: string; + limit: number; + presences?: boolean; + user_ids?: string | string[]; + nonce?: string; + }; +} +/** + * https://discord.com/developers/docs/topics/gateway#update-voice-state + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +export interface GatewayVoiceStateUpdate { + op: GatewayOPCodes.VoiceStateUpdate; + d: { + guild_id: string; + channel_id: string | null; + self_mute: boolean; + self_deaf: boolean; + }; +} +/** + * https://discord.com/developers/docs/topics/gateway#update-status + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +export interface GatewayUpdatePresence { + op: GatewayOPCodes.PresenceUpdate; + d: GatewayPresenceUpdateData; +} +/** + * https://discord.com/developers/docs/topics/gateway#update-status-gateway-status-update-structure + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +export interface GatewayPresenceUpdateData { + since: number | null; + game: GatewayActivity | null; + status: PresenceUpdateStatus; + afk: boolean; +} +/** + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +interface BasePayload { + op: GatewayOPCodes; + s: number; + d?: unknown; + t?: string; +} +/** + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +declare type NonDispatchPayload = Omit; +/** + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +interface DataPayload extends BasePayload { + op: GatewayOPCodes.Dispatch; + t: Event; + d: D; +} +/** + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +declare type ReactionData = DataPayload>; +/** + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +interface MessageReactionRemoveData { + channel_id: string; + message_id: string; + guild_id?: string; +} +//# sourceMappingURL=v6.d.ts.map \ No newline at end of file diff --git a/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/v6.d.ts.map b/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/v6.d.ts.map new file mode 100644 index 0000000..30bcd47 --- /dev/null +++ b/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/v6.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"v6.d.ts","sourceRoot":"","sources":["v6.ts"],"names":[],"mappings":"A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AAc,CAAC;IACxB,KAAK,EAAE,QAAQ,CAAC;CAChB,EACD,CAAC,CACD,CACD,CAAC;AAEF;;GAEG;AACH,UAAU,yBAAyB;IAClC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB"} \ No newline at end of file diff --git a/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/v6.js b/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/v6.js new file mode 100644 index 0000000..7e6face --- /dev/null +++ b/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/v6.js @@ -0,0 +1,163 @@ +"use strict"; +/** + * Types extracted from https://discord.com/developers/docs/topics/gateway + */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.GatewayDispatchEvents = exports.GatewayIntentBits = exports.VoiceCloseCodes = exports.VoiceOPCodes = exports.GatewayCloseCodes = exports.GatewayOPCodes = exports.GatewayVersion = void 0; +__exportStar(require("./common"), exports); +/** + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +exports.GatewayVersion = '6'; +/** + * https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-opcodes + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +var GatewayOPCodes; +(function (GatewayOPCodes) { + GatewayOPCodes[GatewayOPCodes["Dispatch"] = 0] = "Dispatch"; + GatewayOPCodes[GatewayOPCodes["Heartbeat"] = 1] = "Heartbeat"; + GatewayOPCodes[GatewayOPCodes["Identify"] = 2] = "Identify"; + GatewayOPCodes[GatewayOPCodes["PresenceUpdate"] = 3] = "PresenceUpdate"; + GatewayOPCodes[GatewayOPCodes["VoiceStateUpdate"] = 4] = "VoiceStateUpdate"; + GatewayOPCodes[GatewayOPCodes["Resume"] = 6] = "Resume"; + GatewayOPCodes[GatewayOPCodes["Reconnect"] = 7] = "Reconnect"; + GatewayOPCodes[GatewayOPCodes["RequestGuildMembers"] = 8] = "RequestGuildMembers"; + GatewayOPCodes[GatewayOPCodes["InvalidSession"] = 9] = "InvalidSession"; + GatewayOPCodes[GatewayOPCodes["Hello"] = 10] = "Hello"; + GatewayOPCodes[GatewayOPCodes["HeartbeatAck"] = 11] = "HeartbeatAck"; +})(GatewayOPCodes = exports.GatewayOPCodes || (exports.GatewayOPCodes = {})); +/** + * https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-close-event-codes + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +var GatewayCloseCodes; +(function (GatewayCloseCodes) { + GatewayCloseCodes[GatewayCloseCodes["UnknownError"] = 4000] = "UnknownError"; + GatewayCloseCodes[GatewayCloseCodes["UnknownOpCode"] = 4001] = "UnknownOpCode"; + GatewayCloseCodes[GatewayCloseCodes["DecodeError"] = 4002] = "DecodeError"; + GatewayCloseCodes[GatewayCloseCodes["NotAuthenticated"] = 4003] = "NotAuthenticated"; + GatewayCloseCodes[GatewayCloseCodes["AuthenticationFailed"] = 4004] = "AuthenticationFailed"; + GatewayCloseCodes[GatewayCloseCodes["AlreadyAuthenticated"] = 4005] = "AlreadyAuthenticated"; + GatewayCloseCodes[GatewayCloseCodes["InvalidSeq"] = 4007] = "InvalidSeq"; + GatewayCloseCodes[GatewayCloseCodes["RateLimited"] = 4008] = "RateLimited"; + GatewayCloseCodes[GatewayCloseCodes["SessionTimedOut"] = 4009] = "SessionTimedOut"; + GatewayCloseCodes[GatewayCloseCodes["InvalidShard"] = 4010] = "InvalidShard"; + GatewayCloseCodes[GatewayCloseCodes["ShardingRequired"] = 4011] = "ShardingRequired"; + GatewayCloseCodes[GatewayCloseCodes["InvalidAPIVersion"] = 4012] = "InvalidAPIVersion"; + GatewayCloseCodes[GatewayCloseCodes["InvalidIntents"] = 4013] = "InvalidIntents"; + GatewayCloseCodes[GatewayCloseCodes["DisallowedIntents"] = 4014] = "DisallowedIntents"; +})(GatewayCloseCodes = exports.GatewayCloseCodes || (exports.GatewayCloseCodes = {})); +/** + * https://discord.com/developers/docs/topics/opcodes-and-status-codes#voice-voice-opcodes + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +var VoiceOPCodes; +(function (VoiceOPCodes) { + VoiceOPCodes[VoiceOPCodes["Identify"] = 0] = "Identify"; + VoiceOPCodes[VoiceOPCodes["SelectProtocol"] = 1] = "SelectProtocol"; + VoiceOPCodes[VoiceOPCodes["Ready"] = 2] = "Ready"; + VoiceOPCodes[VoiceOPCodes["Heartbeat"] = 3] = "Heartbeat"; + VoiceOPCodes[VoiceOPCodes["SessionDescription"] = 4] = "SessionDescription"; + VoiceOPCodes[VoiceOPCodes["Speaking"] = 5] = "Speaking"; + VoiceOPCodes[VoiceOPCodes["HeartbeatAck"] = 6] = "HeartbeatAck"; + VoiceOPCodes[VoiceOPCodes["Resume"] = 7] = "Resume"; + VoiceOPCodes[VoiceOPCodes["Hello"] = 8] = "Hello"; + VoiceOPCodes[VoiceOPCodes["Resumed"] = 9] = "Resumed"; + VoiceOPCodes[VoiceOPCodes["ClientDisconnect"] = 13] = "ClientDisconnect"; +})(VoiceOPCodes = exports.VoiceOPCodes || (exports.VoiceOPCodes = {})); +/** + * https://discord.com/developers/docs/topics/opcodes-and-status-codes#voice-voice-close-event-codes + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +var VoiceCloseCodes; +(function (VoiceCloseCodes) { + VoiceCloseCodes[VoiceCloseCodes["UnknownOpCode"] = 4001] = "UnknownOpCode"; + VoiceCloseCodes[VoiceCloseCodes["NotAuthenticated"] = 4003] = "NotAuthenticated"; + VoiceCloseCodes[VoiceCloseCodes["AuthenticationFailed"] = 4004] = "AuthenticationFailed"; + VoiceCloseCodes[VoiceCloseCodes["AlreadyAuthenticated"] = 4005] = "AlreadyAuthenticated"; + VoiceCloseCodes[VoiceCloseCodes["SessionNoLongerValid"] = 4006] = "SessionNoLongerValid"; + VoiceCloseCodes[VoiceCloseCodes["SessionTimeout"] = 4009] = "SessionTimeout"; + VoiceCloseCodes[VoiceCloseCodes["ServerNotFound"] = 4011] = "ServerNotFound"; + VoiceCloseCodes[VoiceCloseCodes["UnknownProtocol"] = 4012] = "UnknownProtocol"; + VoiceCloseCodes[VoiceCloseCodes["Disconnected"] = 4014] = "Disconnected"; + VoiceCloseCodes[VoiceCloseCodes["VoiceServerCrashed"] = 4015] = "VoiceServerCrashed"; + VoiceCloseCodes[VoiceCloseCodes["UnknownEncryptionMode"] = 4016] = "UnknownEncryptionMode"; +})(VoiceCloseCodes = exports.VoiceCloseCodes || (exports.VoiceCloseCodes = {})); +/** + * https://discord.com/developers/docs/topics/gateway#list-of-intents + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +var GatewayIntentBits; +(function (GatewayIntentBits) { + GatewayIntentBits[GatewayIntentBits["GUILDS"] = 1] = "GUILDS"; + GatewayIntentBits[GatewayIntentBits["GUILD_MEMBERS"] = 2] = "GUILD_MEMBERS"; + GatewayIntentBits[GatewayIntentBits["GUILD_BANS"] = 4] = "GUILD_BANS"; + GatewayIntentBits[GatewayIntentBits["GUILD_EMOJIS"] = 8] = "GUILD_EMOJIS"; + GatewayIntentBits[GatewayIntentBits["GUILD_INTEGRATIONS"] = 16] = "GUILD_INTEGRATIONS"; + GatewayIntentBits[GatewayIntentBits["GUILD_WEBHOOKS"] = 32] = "GUILD_WEBHOOKS"; + GatewayIntentBits[GatewayIntentBits["GUILD_INVITES"] = 64] = "GUILD_INVITES"; + GatewayIntentBits[GatewayIntentBits["GUILD_VOICE_STATES"] = 128] = "GUILD_VOICE_STATES"; + GatewayIntentBits[GatewayIntentBits["GUILD_PRESENCES"] = 256] = "GUILD_PRESENCES"; + GatewayIntentBits[GatewayIntentBits["GUILD_MESSAGES"] = 512] = "GUILD_MESSAGES"; + GatewayIntentBits[GatewayIntentBits["GUILD_MESSAGE_REACTIONS"] = 1024] = "GUILD_MESSAGE_REACTIONS"; + GatewayIntentBits[GatewayIntentBits["GUILD_MESSAGE_TYPING"] = 2048] = "GUILD_MESSAGE_TYPING"; + GatewayIntentBits[GatewayIntentBits["DIRECT_MESSAGES"] = 4096] = "DIRECT_MESSAGES"; + GatewayIntentBits[GatewayIntentBits["DIRECT_MESSAGE_REACTIONS"] = 8192] = "DIRECT_MESSAGE_REACTIONS"; + GatewayIntentBits[GatewayIntentBits["DIRECT_MESSAGE_TYPING"] = 16384] = "DIRECT_MESSAGE_TYPING"; +})(GatewayIntentBits = exports.GatewayIntentBits || (exports.GatewayIntentBits = {})); +/** + * https://discord.com/developers/docs/topics/gateway#commands-and-events-gateway-events + * @deprecated Gateway v6 is deprecated and the types will not receive further updates, please update to v8. + */ +var GatewayDispatchEvents; +(function (GatewayDispatchEvents) { + GatewayDispatchEvents["Ready"] = "READY"; + GatewayDispatchEvents["Resumed"] = "RESUMED"; + GatewayDispatchEvents["ChannelCreate"] = "CHANNEL_CREATE"; + GatewayDispatchEvents["ChannelUpdate"] = "CHANNEL_UPDATE"; + GatewayDispatchEvents["ChannelDelete"] = "CHANNEL_DELETE"; + GatewayDispatchEvents["ChannelPinsUpdate"] = "CHANNEL_PINS_UPDATE"; + GatewayDispatchEvents["GuildCreate"] = "GUILD_CREATE"; + GatewayDispatchEvents["GuildUpdate"] = "GUILD_UPDATE"; + GatewayDispatchEvents["GuildDelete"] = "GUILD_DELETE"; + GatewayDispatchEvents["GuildBanAdd"] = "GUILD_BAN_ADD"; + GatewayDispatchEvents["GuildBanRemove"] = "GUILD_BAN_REMOVE"; + GatewayDispatchEvents["GuildEmojisUpdate"] = "GUILD_EMOJIS_UPDATE"; + GatewayDispatchEvents["GuildIntegrationsUpdate"] = "GUILD_INTEGRATIONS_UPDATE"; + GatewayDispatchEvents["GuildMemberAdd"] = "GUILD_MEMBER_ADD"; + GatewayDispatchEvents["GuildMemberRemove"] = "GUILD_MEMBER_REMOVE"; + GatewayDispatchEvents["GuildMemberUpdate"] = "GUILD_MEMBER_UPDATE"; + GatewayDispatchEvents["GuildMembersChunk"] = "GUILD_MEMBERS_CHUNK"; + GatewayDispatchEvents["GuildRoleCreate"] = "GUILD_ROLE_CREATE"; + GatewayDispatchEvents["GuildRoleUpdate"] = "GUILD_ROLE_UPDATE"; + GatewayDispatchEvents["GuildRoleDelete"] = "GUILD_ROLE_DELETE"; + GatewayDispatchEvents["InviteCreate"] = "INVITE_CREATE"; + GatewayDispatchEvents["InviteDelete"] = "INVITE_DELETE"; + GatewayDispatchEvents["MessageCreate"] = "MESSAGE_CREATE"; + GatewayDispatchEvents["MessageUpdate"] = "MESSAGE_UPDATE"; + GatewayDispatchEvents["MessageDelete"] = "MESSAGE_DELETE"; + GatewayDispatchEvents["MessageDeleteBulk"] = "MESSAGE_DELETE_BULK"; + GatewayDispatchEvents["MessageReactionAdd"] = "MESSAGE_REACTION_ADD"; + GatewayDispatchEvents["MessageReactionRemove"] = "MESSAGE_REACTION_REMOVE"; + GatewayDispatchEvents["MessageReactionRemoveAll"] = "MESSAGE_REACTION_REMOVE_ALL"; + GatewayDispatchEvents["MessageReactionRemoveEmoji"] = "MESSAGE_REACTION_REMOVE_EMOJI"; + GatewayDispatchEvents["PresenceUpdate"] = "PRESENCE_UPDATE"; + GatewayDispatchEvents["TypingStart"] = "TYPING_START"; + GatewayDispatchEvents["UserUpdate"] = "USER_UPDATE"; + GatewayDispatchEvents["VoiceStateUpdate"] = "VOICE_STATE_UPDATE"; + GatewayDispatchEvents["VoiceServerUpdate"] = "VOICE_SERVER_UPDATE"; + GatewayDispatchEvents["WebhooksUpdate"] = "WEBHOOKS_UPDATE"; +})(GatewayDispatchEvents = exports.GatewayDispatchEvents || (exports.GatewayDispatchEvents = {})); +// #endregion Shared +//# sourceMappingURL=v6.js.map \ No newline at end of file diff --git a/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/v6.js.map b/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/v6.js.map new file mode 100644 index 0000000..c52f494 --- /dev/null +++ b/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/v6.js.map @@ -0,0 +1 @@ +{"version":3,"file":"v6.js","sourceRoot":"","sources":["v6.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;AAkBH,2CAAyB;AAEzB;;GAEG;AACU,QAAA,cAAc,GAAG,GAAG,CAAC;AAElC;;;GAGG;AACH,IAAY,cAaX;AAbD,WAAY,cAAc;IACzB,2DAAQ,CAAA;IACR,6DAAS,CAAA;IACT,2DAAQ,CAAA;IACR,uEAAc,CAAA;IACd,2EAAgB,CAAA;IAEhB,uDAAU,CAAA;IACV,6DAAS,CAAA;IACT,iFAAmB,CAAA;IACnB,uEAAc,CAAA;IACd,sDAAK,CAAA;IACL,oEAAY,CAAA;AACb,CAAC,EAbW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAazB;AAED;;;GAGG;AACH,IAAY,iBAgBX;AAhBD,WAAY,iBAAiB;IAC5B,4EAAmB,CAAA;IACnB,8EAAa,CAAA;IACb,0EAAW,CAAA;IACX,oFAAgB,CAAA;IAChB,4FAAoB,CAAA;IACpB,4FAAoB,CAAA;IAEpB,wEAAiB,CAAA;IACjB,0EAAW,CAAA;IACX,kFAAe,CAAA;IACf,4EAAY,CAAA;IACZ,oFAAgB,CAAA;IAChB,sFAAiB,CAAA;IACjB,gFAAc,CAAA;IACd,sFAAiB,CAAA;AAClB,CAAC,EAhBW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAgB5B;AAED;;;GAGG;AACH,IAAY,YAaX;AAbD,WAAY,YAAY;IACvB,uDAAQ,CAAA;IACR,mEAA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A4B,CAAA;IAC5B,sDAA6B,CAAA;IAC7B,4DAAmC,CAAA;IACnC,kEAAyC,CAAA;IACzC,8EAAqD,CAAA;IACrD,4DAAmC,CAAA;IACnC,kEAAyC,CAAA;IACzC,kEAAyC,CAAA;IACzC,kEAAyC,CAAA;IACzC,8DAAqC,CAAA;IACrC,8DAAqC,CAAA;IACrC,8DAAqC,CAAA;IACrC,uDAA8B,CAAA;IAC9B,uDAA8B,CAAA;IAC9B,yDAAgC,CAAA;IAChC,yDAAgC,CAAA;IAChC,yDAAgC,CAAA;IAChC,kEAAyC,CAAA;IACzC,oEAA2C,CAAA;IAC3C,0EAAiD,CAAA;IACjD,iFAAwD,CAAA;IACxD,qFAA4D,CAAA;IAC5D,2DAAkC,CAAA;IAClC,qDAA4B,CAAA;IAC5B,mDAA0B,CAAA;IAC1B,gEAAuC,CAAA;IACvC,kEAAyC,CAAA;IACzC,2DAAkC,CAAA;AACnC,CAAC,EArCW,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QAqChC;AAwoBD,oBAAoB"} \ No newline at end of file diff --git a/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/v6.mjs b/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/v6.mjs new file mode 100644 index 0000000..848edfc --- /dev/null +++ b/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/v6.mjs @@ -0,0 +1,10 @@ +import mod from "./v6.js"; + +export default mod; +export const GatewayCloseCodes = mod.GatewayCloseCodes; +export const GatewayDispatchEvents = mod.GatewayDispatchEvents; +export const GatewayIntentBits = mod.GatewayIntentBits; +export const GatewayOPCodes = mod.GatewayOPCodes; +export const GatewayVersion = mod.GatewayVersion; +export const VoiceCloseCodes = mod.VoiceCloseCodes; +export const VoiceOPCodes = mod.VoiceOPCodes; diff --git a/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/v8.d.ts b/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/v8.d.ts new file mode 100644 index 0000000..79d3ee1 --- /dev/null +++ b/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/v8.d.ts @@ -0,0 +1,1302 @@ +/** + * Types extracted from https://discord.com/developers/docs/topics/gateway + */ +import type { Snowflake } from '../globals'; +import type { APIApplication, APIApplicationCommand, APIApplicationCommandInteraction, APIChannel, APIEmoji, APIGuild, APIGuildIntegration, APIGuildMember, APIMessage, APIMessageComponentInteraction, APIRole, APIStageInstance, APISticker, APIUnavailableGuild, APIUser, GatewayActivity, GatewayPresenceUpdate as RawGatewayPresenceUpdate, GatewayVoiceState, InviteTargetType, PresenceUpdateStatus } from '../payloads/v8/index'; +import type { Nullable } from '../utils/internals'; +export * from './common'; +export declare const GatewayVersion = "8"; +/** + * https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-opcodes + */ +export declare const enum GatewayOpcodes { + /** + * An event was dispatched + */ + Dispatch = 0, + /** + * A bidirectional opcode to maintain an active gateway connection. + * Fired periodically by the client, or fired by the gateway to request an immediate heartbeat from the client. + */ + Heartbeat = 1, + /** + * Starts a new session during the initial handshake + */ + Identify = 2, + /** + * Update the client's presence + */ + PresenceUpdate = 3, + /** + * Used to join/leave or move between voice channels + */ + VoiceStateUpdate = 4, + /** + * Resume a previous session that was disconnected + */ + Resume = 6, + /** + * You should attempt to reconnect and resume immediately + */ + Reconnect = 7, + /** + * Request information about offline guild members in a large guild + */ + RequestGuildMembers = 8, + /** + * The session has been invalidated. You should reconnect and identify/resume accordingly + */ + InvalidSession = 9, + /** + * Sent immediately after connecting, contains the `heartbeat_interval` to use + */ + Hello = 10, + /** + * Sent in response to receiving a heartbeat to acknowledge that it has been received + */ + HeartbeatAck = 11 +} +/** + * https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-close-event-codes + */ +export declare const enum GatewayCloseCodes { + /** + * We're not sure what went wrong. Try reconnecting? + */ + UnknownError = 4000, + /** + * You sent an invalid Gateway opcode or an invalid payload for an opcode. Don't do that! + * + * See https://discord.com/developers/docs/topics/gateway#payloads-and-opcodes + */ + UnknownOpcode = 4001, + /** + * You sent an invalid payload to us. Don't do that! + * + * See https://discord.com/developers/docs/topics/gateway#sending-payloads + */ + DecodeError = 4002, + /** + * You sent us a payload prior to identifying + * + * See https://discord.com/developers/docs/topics/gateway#identify + */ + NotAuthenticated = 4003, + /** + * The account token sent with your identify payload is incorrect + * + * See https://discord.com/developers/docs/topics/gateway#identify + */ + AuthenticationFailed = 4004, + /** + * You sent more than one identify payload. Don't do that! + */ + AlreadyAuthenticated = 4005, + /** + * The sequence sent when resuming the session was invalid. Reconnect and start a new session + * + * See https://discord.com/developers/docs/topics/gateway#resume + */ + InvalidSeq = 4007, + /** + * Woah nelly! You're sending payloads to us too quickly. Slow it down! You will be disconnected on receiving this + */ + RateLimited = 4008, + /** + * Your session timed out. Reconnect and start a new one + */ + SessionTimedOut = 4009, + /** + * You sent us an invalid shard when identifying + * + * See https://discord.com/developers/docs/topics/gateway#sharding + */ + InvalidShard = 4010, + /** + * The session would have handled too many guilds - you are required to shard your connection in order to connect + * + * See https://discord.com/developers/docs/topics/gateway#sharding + */ + ShardingRequired = 4011, + /** + * You sent an invalid version for the gateway + */ + InvalidAPIVersion = 4012, + /** + * You sent an invalid intent for a Gateway Intent. You may have incorrectly calculated the bitwise value + * + * See https://discord.com/developers/docs/topics/gateway#gateway-intents + */ + InvalidIntents = 4013, + /** + * You sent a disallowed intent for a Gateway Intent. You may have tried to specify an intent that you have not + * enabled or are not whitelisted for + * + * See https://discord.com/developers/docs/topics/gateway#gateway-intents + * + * See https://discord.com/developers/docs/topics/gateway#privileged-intents + */ + DisallowedIntents = 4014 +} +/** + * https://discord.com/developers/docs/topics/gateway#list-of-intents + */ +export declare const enum GatewayIntentBits { + Guilds = 1, + GuildMembers = 2, + GuildBans = 4, + GuildEmojisAndStickers = 8, + GuildIntegrations = 16, + GuildWebhooks = 32, + GuildInvites = 64, + GuildVoiceStates = 128, + GuildPresences = 256, + GuildMessages = 512, + GuildMessageReactions = 1024, + GuildMessageTyping = 2048, + DirectMessages = 4096, + DirectMessageReactions = 8192, + DirectMessageTyping = 16384 +} +/** + * https://discord.com/developers/docs/topics/gateway#commands-and-events-gateway-events + */ +export declare const enum GatewayDispatchEvents { + ApplicationCommandCreate = "APPLICATION_COMMAND_CREATE", + ApplicationCommandDelete = "APPLICATION_COMMAND_DELETE", + ApplicationCommandUpdate = "APPLICATION_COMMAND_UPDATE", + ChannelCreate = "CHANNEL_CREATE", + ChannelDelete = "CHANNEL_DELETE", + ChannelPinsUpdate = "CHANNEL_PINS_UPDATE", + ChannelUpdate = "CHANNEL_UPDATE", + GuildBanAdd = "GUILD_BAN_ADD", + GuildBanRemove = "GUILD_BAN_REMOVE", + GuildCreate = "GUILD_CREATE", + GuildDelete = "GUILD_DELETE", + GuildEmojisUpdate = "GUILD_EMOJIS_UPDATE", + GuildIntegrationsUpdate = "GUILD_INTEGRATIONS_UPDATE", + GuildMemberAdd = "GUILD_MEMBER_ADD", + GuildMemberRemove = "GUILD_MEMBER_REMOVE", + GuildMembersChunk = "GUILD_MEMBERS_CHUNK", + GuildMemberUpdate = "GUILD_MEMBER_UPDATE", + GuildRoleCreate = "GUILD_ROLE_CREATE", + GuildRoleDelete = "GUILD_ROLE_DELETE", + GuildRoleUpdate = "GUILD_ROLE_UPDATE", + GuildStickersUpdate = "GUILD_STICKERS_UPDATE", + GuildUpdate = "GUILD_UPDATE", + IntegrationCreate = "INTEGRATION_CREATE", + IntegrationDelete = "INTEGRATION_DELETE", + IntegrationUpdate = "INTEGRATION_UPDATE", + InteractionCreate = "INTERACTION_CREATE", + InviteCreate = "INVITE_CREATE", + InviteDelete = "INVITE_DELETE", + MessageCreate = "MESSAGE_CREATE", + MessageDelete = "MESSAGE_DELETE", + MessageDeleteBulk = "MESSAGE_DELETE_BULK", + MessageReactionAdd = "MESSAGE_REACTION_ADD", + MessageReactionRemove = "MESSAGE_REACTION_REMOVE", + MessageReactionRemoveAll = "MESSAGE_REACTION_REMOVE_ALL", + MessageReactionRemoveEmoji = "MESSAGE_REACTION_REMOVE_EMOJI", + MessageUpdate = "MESSAGE_UPDATE", + PresenceUpdate = "PRESENCE_UPDATE", + StageInstanceCreate = "STAGE_INSTANCE_CREATE", + StageInstanceDelete = "STAGE_INSTANCE_DELETE", + StageInstanceUpdate = "STAGE_INSTANCE_UPDATE", + Ready = "READY", + Resumed = "RESUMED", + TypingStart = "TYPING_START", + UserUpdate = "USER_UPDATE", + VoiceServerUpdate = "VOICE_SERVER_UPDATE", + VoiceStateUpdate = "VOICE_STATE_UPDATE", + WebhooksUpdate = "WEBHOOKS_UPDATE" +} +export declare type GatewaySendPayload = GatewayHeartbeat | GatewayIdentify | GatewayUpdatePresence | GatewayVoiceStateUpdate | GatewayResume | GatewayRequestGuildMembers; +export declare type GatewayReceivePayload = GatewayHello | GatewayHeartbeatRequest | GatewayHeartbeatAck | GatewayInvalidSession | GatewayReconnect | GatewayDispatchPayload; +export declare type GatewayDispatchPayload = GatewayChannelModifyDispatch | GatewayChannelPinsUpdateDispatch | GatewayGuildBanModifyDispatch | GatewayGuildDeleteDispatch | GatewayGuildEmojisUpdateDispatch | GatewayGuildIntegrationsUpdateDispatch | GatewayGuildMemberAddDispatch | GatewayGuildMemberRemoveDispatch | GatewayGuildMembersChunkDispatch | GatewayGuildMemberUpdateDispatch | GatewayGuildModifyDispatch | GatewayGuildRoleDeleteDispatch | GatewayGuildRoleModifyDispatch | GatewayGuildStickersUpdateDispatch | GatewayIntegrationCreateDispatch | GatewayIntegrationDeleteDispatch | GatewayIntegrationUpdateDispatch | GatewayInteractionCreateDispatch | GatewayInviteCreateDispatch | GatewayInviteDeleteDispatch | GatewayMessageCreateDispatch | GatewayMessageDeleteBulkDispatch | GatewayMessageDeleteDispatch | GatewayMessageReactionAddDispatch | GatewayMessageReactionRemoveAllDispatch | GatewayMessageReactionRemoveDispatch | GatewayMessageReactionRemoveEmojiDispatch | GatewayMessageUpdateDispatch | GatewayPresenceUpdateDispatch | GatewayStageInstanceCreateDispatch | GatewayStageInstanceDeleteDispatch | GatewayStageInstanceUpdateDispatch | GatewayReadyDispatch | GatewayResumedDispatch | GatewayTypingStartDispatch | GatewayUserUpdateDispatch | GatewayVoiceServerUpdateDispatch | GatewayVoiceStateUpdateDispatch | GatewayWebhooksUpdateDispatch; +/** + * https://discord.com/developers/docs/topics/gateway#application-command-create + * https://discord.com/developers/docs/topics/gateway#application-command-update + * https://discord.com/developers/docs/topics/gateway#application-command-delete + */ +export declare type GatewayApplicationCommandModifyDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#application-command-create + * https://discord.com/developers/docs/topics/gateway#application-command-update + * https://discord.com/developers/docs/topics/gateway#application-command-delete + */ +export declare type GatewayApplicationCommandModifyDispatchData = APIApplicationCommand; +/** + * https://discord.com/developers/docs/topics/gateway#application-command-create + */ +export declare type GatewayApplicationCommandCreateDispatch = GatewayApplicationCommandModifyDispatch; +/** + * https://discord.com/developers/docs/topics/gateway#application-command-create + */ +export declare type GatewayApplicationCommandCreateDispatchData = GatewayApplicationCommandModifyDispatchData; +/** + * https://discord.com/developers/docs/topics/gateway#application-command-update + */ +export declare type GatewayApplicationCommandUpdateDispatch = GatewayApplicationCommandModifyDispatch; +/** + * https://discord.com/developers/docs/topics/gateway#application-command-update + */ +export declare type GatewayApplicationCommandUpdateDispatchData = GatewayApplicationCommandModifyDispatchData; +/** + * https://discord.com/developers/docs/topics/gateway#application-command-delete + */ +export declare type GatewayApplicationCommandDeleteDispatch = GatewayApplicationCommandModifyDispatch; +/** + * https://discord.com/developers/docs/topics/gateway#application-command-delete + */ +export declare type GatewayApplicationCommandDeleteDispatchData = GatewayApplicationCommandModifyDispatchData; +/** + * https://discord.com/developers/docs/topics/gateway#hello + */ +export interface GatewayHello extends NonDispatchPayload { + op: GatewayOpcodes.Hello; + d: GatewayHelloData; +} +/** + * https://discord.com/developers/docs/topics/gateway#hello + */ +export interface GatewayHelloData { + /** + * The interval (in milliseconds) the client should heartbeat with + */ + heartbeat_interval: number; +} +/** + * https://discord.com/developers/docs/topics/gateway#heartbeating + */ +export interface GatewayHeartbeatRequest extends NonDispatchPayload { + op: GatewayOpcodes.Heartbeat; + d: never; +} +/** + * https://discord.com/developers/docs/topics/gateway#heartbeating-example-gateway-heartbeat-ack + */ +export interface GatewayHeartbeatAck extends NonDispatchPayload { + op: GatewayOpcodes.HeartbeatAck; + d: never; +} +/** + * https://discord.com/developers/docs/topics/gateway#invalid-session + */ +export interface GatewayInvalidSession extends NonDispatchPayload { + op: GatewayOpcodes.InvalidSession; + d: GatewayInvalidSessionData; +} +/** + * https://discord.com/developers/docs/topics/gateway#invalid-session + */ +export declare type GatewayInvalidSessionData = boolean; +/** + * https://discord.com/developers/docs/topics/gateway#reconnect + */ +export interface GatewayReconnect extends NonDispatchPayload { + op: GatewayOpcodes.Reconnect; + d: never; +} +/** + * https://discord.com/developers/docs/topics/gateway#ready + */ +export declare type GatewayReadyDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#ready + */ +export interface GatewayReadyDispatchData { + /** + * Gateway version + * + * See https://discord.com/developers/docs/topics/gateway#gateways-gateway-versions + */ + v: number; + /** + * Information about the user including email + * + * See https://discord.com/developers/docs/resources/user#user-object + */ + user: APIUser; + /** + * The guilds the user is in + * + * See https://discord.com/developers/docs/resources/guild#unavailable-guild-object + */ + guilds: APIUnavailableGuild[]; + /** + * Used for resuming connections + */ + session_id: string; + /** + * The shard information associated with this session, if sent when identifying + * + * See https://discord.com/developers/docs/topics/gateway#sharding + */ + shard?: [shard_id: number, shard_count: number]; + /** + * Contains `id` and `flags` + * + * See https://discord.com/developers/docs/resources/application#application-object + */ + application: Pick; +} +/** + * https://discord.com/developers/docs/topics/gateway#resumed + */ +export declare type GatewayResumedDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#channel-create + * https://discord.com/developers/docs/topics/gateway#channel-update + * https://discord.com/developers/docs/topics/gateway#channel-delete + */ +export declare type GatewayChannelModifyDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#channel-create + * https://discord.com/developers/docs/topics/gateway#channel-update + * https://discord.com/developers/docs/topics/gateway#channel-delete + */ +export declare type GatewayChannelModifyDispatchData = APIChannel; +/** + * https://discord.com/developers/docs/topics/gateway#channel-create + */ +export declare type GatewayChannelCreateDispatch = GatewayChannelModifyDispatch; +/** + * https://discord.com/developers/docs/topics/gateway#channel-create + */ +export declare type GatewayChannelCreateDispatchData = GatewayChannelModifyDispatchData; +/** + * https://discord.com/developers/docs/topics/gateway#channel-update + */ +export declare type GatewayChannelUpdateDispatch = GatewayChannelModifyDispatch; +/** + * https://discord.com/developers/docs/topics/gateway#channel-update + */ +export declare type GatewayChannelUpdateDispatchData = GatewayChannelModifyDispatchData; +/** + * https://discord.com/developers/docs/topics/gateway#channel-delete + */ +export declare type GatewayChannelDeleteDispatch = GatewayChannelModifyDispatch; +/** + * https://discord.com/developers/docs/topics/gateway#channel-delete + */ +export declare type GatewayChannelDeleteDispatchData = GatewayChannelModifyDispatchData; +/** + * https://discord.com/developers/docs/topics/gateway#channel-pins-update + */ +export declare type GatewayChannelPinsUpdateDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#channel-pins-update + */ +export interface GatewayChannelPinsUpdateDispatchData { + /** + * The id of the guild + */ + guild_id?: Snowflake; + /** + * The id of the channel + */ + channel_id: Snowflake; + /** + * The time at which the most recent pinned message was pinned + */ + last_pin_timestamp?: string | null; +} +/** + * https://discord.com/developers/docs/topics/gateway#guild-create + * https://discord.com/developers/docs/topics/gateway#guild-update + */ +export declare type GatewayGuildModifyDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#guild-create + * https://discord.com/developers/docs/topics/gateway#guild-update + */ +export declare type GatewayGuildModifyDispatchData = APIGuild; +/** + * https://discord.com/developers/docs/topics/gateway#guild-create + */ +export declare type GatewayGuildCreateDispatch = GatewayGuildModifyDispatch; +/** + * https://discord.com/developers/docs/topics/gateway#guild-create + */ +export declare type GatewayGuildCreateDispatchData = GatewayGuildModifyDispatchData; +/** + * https://discord.com/developers/docs/topics/gateway#guild-update + */ +export declare type GatewayGuildUpdateDispatch = GatewayGuildModifyDispatch; +/** + * https://discord.com/developers/docs/topics/gateway#guild-update + */ +export declare type GatewayGuildUpdateDispatchData = GatewayGuildModifyDispatchData; +/** + * https://discord.com/developers/docs/topics/gateway#guild-delete + */ +export declare type GatewayGuildDeleteDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#guild-delete + */ +export declare type GatewayGuildDeleteDispatchData = APIUnavailableGuild; +/** + * https://discord.com/developers/docs/topics/gateway#guild-ban-add + * https://discord.com/developers/docs/topics/gateway#guild-ban-remove + */ +export declare type GatewayGuildBanModifyDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#guild-ban-add + * https://discord.com/developers/docs/topics/gateway#guild-ban-remove + */ +export interface GatewayGuildBanModifyDispatchData { + /** + * ID of the guild + */ + guild_id: Snowflake; + /** + * The banned user + * + * See https://discord.com/developers/docs/resources/user#user-object + */ + user: APIUser; +} +/** + * https://discord.com/developers/docs/topics/gateway#guild-ban-add + */ +export declare type GatewayGuildBanAddDispatch = GatewayGuildBanModifyDispatch; +/** + * https://discord.com/developers/docs/topics/gateway#guild-ban-add + */ +export declare type GatewayGuildBanAddDispatchData = GatewayGuildBanModifyDispatchData; +/** + * https://discord.com/developers/docs/topics/gateway#guild-ban-remove + */ +export declare type GatewayGuildBanRemoveDispatch = GatewayGuildBanModifyDispatch; +/** + * https://discord.com/developers/docs/topics/gateway#guild-ban-remove + */ +export declare type GatewayGuildBanRemoveDispatchData = GatewayGuildBanModifyDispatchData; +/** + * https://discord.com/developers/docs/topics/gateway#guild-emojis-update + */ +export declare type GatewayGuildEmojisUpdateDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#guild-emojis-update + */ +export interface GatewayGuildEmojisUpdateDispatchData { + /** + * ID of the guild + */ + guild_id: Snowflake; + /** + * Array of emojis + * + * See https://discord.com/developers/docs/resources/emoji#emoji-object + */ + emojis: APIEmoji[]; +} +/** + * https://discord.com/developers/docs/topics/gateway#guild-stickers-update + */ +export declare type GatewayGuildStickersUpdateDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#guild-stickers-update + */ +export interface GatewayGuildStickersUpdateDispatchData { + /** + * ID of the guild + */ + guild_id: Snowflake; + /** + * Array of stickers + * + * See https://discord.com/developers/docs/resources/sticker#sticker-object + */ + stickers: APISticker[]; +} +/** + * https://discord.com/developers/docs/topics/gateway#guild-integrations-update + */ +export declare type GatewayGuildIntegrationsUpdateDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#guild-integrations-update + */ +export interface GatewayGuildIntegrationsUpdateDispatchData { + /** + * ID of the guild whose integrations were updated + */ + guild_id: Snowflake; +} +/** + * https://discord.com/developers/docs/topics/gateway#guild-member-add + */ +export declare type GatewayGuildMemberAddDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#guild-member-add + */ +export interface GatewayGuildMemberAddDispatchData extends APIGuildMember { + /** + * The id of the guild + */ + guild_id: Snowflake; +} +/** + * https://discord.com/developers/docs/topics/gateway#guild-member-remove + */ +export declare type GatewayGuildMemberRemoveDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#guild-member-remove + */ +export interface GatewayGuildMemberRemoveDispatchData { + /** + * The id of the guild + */ + guild_id: Snowflake; + /** + * The user who was removed + * + * See https://discord.com/developers/docs/resources/user#user-object + */ + user: APIUser; +} +/** + * https://discord.com/developers/docs/topics/gateway#guild-member-update + */ +export declare type GatewayGuildMemberUpdateDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#guild-member-update + */ +export declare type GatewayGuildMemberUpdateDispatchData = Omit & Partial> & Required> & Nullable> & { + /** + * The id of the guild + */ + guild_id: Snowflake; +}; +/** + * https://discord.com/developers/docs/topics/gateway#guild-members-chunk + */ +export declare type GatewayGuildMembersChunkDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#guild-members-chunk + */ +export interface GatewayGuildMembersChunkDispatchData { + /** + * The id of the guild + */ + guild_id: Snowflake; + /** + * Set of guild members + * + * See https://discord.com/developers/docs/resources/guild#guild-member-object + */ + members: APIGuildMember[]; + /** + * The chunk index in the expected chunks for this response (`0 <= chunk_index < chunk_count`) + */ + chunk_index?: number; + /** + * The total number of expected chunks for this response + */ + chunk_count?: number; + /** + * If passing an invalid id to `REQUEST_GUILD_MEMBERS`, it will be returned here + */ + not_found?: unknown[]; + /** + * If passing true to `REQUEST_GUILD_MEMBERS`, presences of the returned members will be here + * + * See https://discord.com/developers/docs/topics/gateway#presence + */ + presences?: RawGatewayPresenceUpdate[]; + /** + * The nonce used in the Guild Members Request + * + * See https://discord.com/developers/docs/topics/gateway#request-guild-members + */ + nonce?: string; +} +/** + * https://discord.com/developers/docs/topics/gateway#guild-role-create + * https://discord.com/developers/docs/topics/gateway#guild-role-update + */ +export declare type GatewayGuildRoleModifyDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#guild-role-create + * https://discord.com/developers/docs/topics/gateway#guild-role-update + */ +export interface GatewayGuildRoleModifyDispatchData { + /** + * The id of the guild + */ + guild_id: Snowflake; + /** + * The role created or updated + * + * See https://discord.com/developers/docs/topics/permissions#role-object + */ + role: APIRole; +} +/** + * https://discord.com/developers/docs/topics/gateway#guild-role-create + */ +export declare type GatewayGuildRoleCreateDispatch = GatewayGuildRoleModifyDispatch; +/** + * https://discord.com/developers/docs/topics/gateway#guild-role-create + */ +export declare type GatewayGuildRoleCreateDispatchData = GatewayGuildRoleModifyDispatchData; +/** + * https://discord.com/developers/docs/topics/gateway#guild-role-update + */ +export declare type GatewayGuildRoleUpdateDispatch = GatewayGuildRoleModifyDispatch; +/** + * https://discord.com/developers/docs/topics/gateway#guild-role-update + */ +export declare type GatewayGuildRoleUpdateDispatchData = GatewayGuildRoleModifyDispatchData; +/** + * https://discord.com/developers/docs/topics/gateway#guild-role-delete + */ +export declare type GatewayGuildRoleDeleteDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#guild-role-delete + */ +export interface GatewayGuildRoleDeleteDispatchData { + /** + * The id of the guild + */ + guild_id: Snowflake; + /** + * The id of the role + */ + role_id: Snowflake; +} +/** + * https://discord.com/developers/docs/topics/gateway#integration-create + */ +export declare type GatewayIntegrationCreateDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#integration-create + */ +export declare type GatewayIntegrationCreateDispatchData = APIGuildIntegration & { + guild_id: Snowflake; +}; +/** + * https://discord.com/developers/docs/topics/gateway#integration-update + */ +export declare type GatewayIntegrationUpdateDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#integration-update + */ +export declare type GatewayIntegrationUpdateDispatchData = APIGuildIntegration & { + guild_id: Snowflake; +}; +/** + * https://discord.com/developers/docs/topics/gateway#integration-update + */ +export declare type GatewayIntegrationDeleteDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#integration-delete + */ +export interface GatewayIntegrationDeleteDispatchData { + /** + * Integration id + */ + id: Snowflake; + /** + * ID of the guild + */ + guild_id: Snowflake; + /** + * ID of the bot/OAuth2 application for this Discord integration + */ + application_id?: Snowflake; +} +/** + * https://discord.com/developers/docs/topics/gateway#interaction-create + */ +export declare type GatewayInteractionCreateDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#interaction-create + */ +export declare type GatewayInteractionCreateDispatchData = APIApplicationCommandInteraction | APIMessageComponentInteraction; +/** + * https://discord.com/developers/docs/topics/gateway#invite-create + */ +export declare type GatewayInviteCreateDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#invite-create + */ +export interface GatewayInviteCreateDispatchData { + /** + * The channel the invite is for + */ + channel_id: Snowflake; + /** + * The unique invite code + * + * See https://discord.com/developers/docs/resources/invite#invite-object + */ + code: string; + /** + * The time at which the invite was created + */ + created_at: number; + /** + * The guild of the invite + */ + guild_id?: Snowflake; + /** + * The user that created the invite + * + * See https://discord.com/developers/docs/resources/user#user-object + */ + inviter?: APIUser; + /** + * How long the invite is valid for (in seconds) + */ + max_age: number; + /** + * The maximum number of times the invite can be used + */ + max_uses: number; + /** + * The type of target for this voice channel invite + * + * See https://discord.com/developers/docs/resources/invite#invite-object-invite-target-types + */ + target_type?: InviteTargetType; + /** + * The user whose stream to display for this voice channel stream invite + * + * See https://discord.com/developers/docs/resources/user#user-object + */ + target_user?: APIUser; + /** + * The embedded application to open for this voice channel embedded application invite + */ + target_application?: Partial; + /** + * Whether or not the invite is temporary (invited users will be kicked on disconnect unless they're assigned a role) + */ + temporary: boolean; + /** + * How many times the invite has been used (always will be `0`) + */ + uses: 0; +} +/** + * https://discord.com/developers/docs/topics/gateway#invite-delete + */ +export declare type GatewayInviteDeleteDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#invite-delete + */ +export interface GatewayInviteDeleteDispatchData { + /** + * The channel of the invite + */ + channel_id: Snowflake; + /** + * The guild of the invite + */ + guild_id?: Snowflake; + /** + * The unique invite code + * + * See https://discord.com/developers/docs/resources/invite#invite-object + */ + code: string; +} +/** + * https://discord.com/developers/docs/topics/gateway#message-create + */ +export declare type GatewayMessageCreateDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#message-create + */ +export declare type GatewayMessageCreateDispatchData = APIMessage; +/** + * https://discord.com/developers/docs/topics/gateway#message-update + */ +export declare type GatewayMessageUpdateDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#message-update + */ +export declare type GatewayMessageUpdateDispatchData = { + id: Snowflake; + channel_id: Snowflake; +} & Partial; +/** + * https://discord.com/developers/docs/topics/gateway#message-delete + */ +export declare type GatewayMessageDeleteDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#message-delete + */ +export interface GatewayMessageDeleteDispatchData { + /** + * The id of the message + */ + id: Snowflake; + /** + * The id of the channel + */ + channel_id: Snowflake; + /** + * The id of the guild + */ + guild_id?: Snowflake; +} +/** + * https://discord.com/developers/docs/topics/gateway#message-delete-bulk + */ +export declare type GatewayMessageDeleteBulkDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#message-delete-bulk + */ +export interface GatewayMessageDeleteBulkDispatchData { + /** + * The ids of the messages + */ + ids: Snowflake[]; + /** + * The id of the channel + */ + channel_id: Snowflake; + /** + * The id of the guild + */ + guild_id?: Snowflake; +} +/** + * https://discord.com/developers/docs/topics/gateway#message-reaction-add + */ +export declare type GatewayMessageReactionAddDispatch = ReactionData; +/** + * https://discord.com/developers/docs/topics/gateway#message-reaction-add + */ +export declare type GatewayMessageReactionAddDispatchData = GatewayMessageReactionAddDispatch['d']; +/** + * https://discord.com/developers/docs/topics/gateway#message-reaction-remove + */ +export declare type GatewayMessageReactionRemoveDispatch = ReactionData; +/** + * https://discord.com/developers/docs/topics/gateway#message-reaction-remove + */ +export declare type GatewayMessageReactionRemoveDispatchData = GatewayMessageReactionRemoveDispatch['d']; +/** + * https://discord.com/developers/docs/topics/gateway#message-reaction-remove-all + */ +export declare type GatewayMessageReactionRemoveAllDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#message-reaction-remove-all + */ +export declare type GatewayMessageReactionRemoveAllDispatchData = MessageReactionRemoveData; +/** + * https://discord.com/developers/docs/topics/gateway#message-reaction-remove-emoji + */ +export declare type GatewayMessageReactionRemoveEmojiDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#message-reaction-remove-emoji + */ +export interface GatewayMessageReactionRemoveEmojiDispatchData extends MessageReactionRemoveData { + /** + * The emoji that was removed + */ + emoji: APIEmoji; +} +/** + * https://discord.com/developers/docs/topics/gateway#presence-update + */ +export declare type GatewayPresenceUpdateDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#presence-update + */ +export declare type GatewayPresenceUpdateDispatchData = RawGatewayPresenceUpdate; +/** + * https://discord.com/developers/docs/topics/gateway#stage-instance-create + */ +export declare type GatewayStageInstanceCreateDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#stage-instance-create + */ +export declare type GatewayStageInstanceCreateDispatchData = APIStageInstance; +/** + * https://discord.com/developers/docs/topics/gateway#stage-instance-delete + */ +export declare type GatewayStageInstanceDeleteDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#stage-instance-delete + */ +export declare type GatewayStageInstanceDeleteDispatchData = APIStageInstance; +/** + * https://discord.com/developers/docs/topics/gateway#stage-instance-update + */ +export declare type GatewayStageInstanceUpdateDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#stage-instance-update + */ +export declare type GatewayStageInstanceUpdateDispatchData = APIStageInstance; +/** + * https://discord.com/developers/docs/topics/gateway#typing-start + */ +export declare type GatewayTypingStartDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#typing-start + */ +export interface GatewayTypingStartDispatchData { + /** + * The id of the channel + */ + channel_id: Snowflake; + /** + * The id of the guild + */ + guild_id?: Snowflake; + /** + * The id of the user + */ + user_id: Snowflake; + /** + * Unix time (in seconds) of when the user started typing + */ + timestamp: number; + /** + * The member who started typing if this happened in a guild + * + * See https://discord.com/developers/docs/resources/guild#guild-member-object + */ + member?: APIGuildMember; +} +/** + * https://discord.com/developers/docs/topics/gateway#user-update + */ +export declare type GatewayUserUpdateDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#user-update + */ +export declare type GatewayUserUpdateDispatchData = APIUser; +/** + * https://discord.com/developers/docs/topics/gateway#voice-state-update + */ +export declare type GatewayVoiceStateUpdateDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#voice-state-update + */ +export declare type GatewayVoiceStateUpdateDispatchData = GatewayVoiceState; +/** + * https://discord.com/developers/docs/topics/gateway#voice-server-update + */ +export declare type GatewayVoiceServerUpdateDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#voice-server-update + */ +export interface GatewayVoiceServerUpdateDispatchData { + /** + * Voice connection token + */ + token: string; + /** + * The guild this voice server update is for + */ + guild_id: Snowflake; + /** + * The voice server host + * + * A `null` endpoint means that the voice server allocated has gone away and is trying to be reallocated. + * You should attempt to disconnect from the currently connected voice server, and not attempt to reconnect + * until a new voice server is allocated + */ + endpoint: string | null; +} +/** + * https://discord.com/developers/docs/topics/gateway#webhooks-update + */ +export declare type GatewayWebhooksUpdateDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#webhooks-update + */ +export interface GatewayWebhooksUpdateDispatchData { + /** + * The id of the guild + */ + guild_id: Snowflake; + /** + * The id of the channel + */ + channel_id: Snowflake; +} +/** + * https://discord.com/developers/docs/topics/gateway#heartbeating + */ +export interface GatewayHeartbeat { + op: GatewayOpcodes.Heartbeat; + d: GatewayHeartbeatData; +} +/** + * https://discord.com/developers/docs/topics/gateway#heartbeating + */ +export declare type GatewayHeartbeatData = number | null; +/** + * https://discord.com/developers/docs/topics/gateway#identify + */ +export interface GatewayIdentify { + op: GatewayOpcodes.Identify; + d: GatewayIdentifyData; +} +/** + * https://discord.com/developers/docs/topics/gateway#identify + */ +export interface GatewayIdentifyData { + /** + * Authentication token + */ + token: string; + /** + * Connection properties + * + * See https://discord.com/developers/docs/topics/gateway#identify-identify-connection-properties + */ + properties: GatewayIdentifyProperties; + /** + * Whether this connection supports compression of packets + * + * @default false + */ + compress?: boolean; + /** + * Value between 50 and 250, total number of members where the gateway will stop sending + * offline members in the guild member list + * + * @default 50 + */ + large_threshold?: number; + /** + * Used for Guild Sharding + * + * See https://discord.com/developers/docs/topics/gateway#sharding + */ + shard?: [shard_id: number, shard_count: number]; + /** + * Presence structure for initial presence information + * + * See https://discord.com/developers/docs/topics/gateway#update-presence + */ + presence?: GatewayPresenceUpdateData; + /** + * The Gateway Intents you wish to receive + * + * See https://discord.com/developers/docs/topics/gateway#gateway-intents + */ + intents: number; +} +/** + * https://discord.com/developers/docs/topics/gateway#identify-identify-connection-properties + */ +export interface GatewayIdentifyProperties { + /** + * Your operating system + */ + $os: string; + /** + * Your library name + */ + $browser: string; + /** + * Your library name + */ + $device: string; +} +/** + * https://discord.com/developers/docs/topics/gateway#resume + */ +export interface GatewayResume { + op: GatewayOpcodes.Resume; + d: GatewayResumeData; +} +/** + * https://discord.com/developers/docs/topics/gateway#resume + */ +export interface GatewayResumeData { + /** + * Session token + */ + token: string; + /** + * Session id + */ + session_id: string; + /** + * Last sequence number received + */ + seq: number; +} +/** + * https://discord.com/developers/docs/topics/gateway#request-guild-members + */ +export interface GatewayRequestGuildMembers { + op: GatewayOpcodes.RequestGuildMembers; + d: GatewayRequestGuildMembersData; +} +/** + * https://discord.com/developers/docs/topics/gateway#request-guild-members + */ +export interface GatewayRequestGuildMembersData { + /** + * ID of the guild to get members for + */ + guild_id: Snowflake; + /** + * String that username starts with, or an empty string to return all members + */ + query?: string; + /** + * Maximum number of members to send matching the `query`; + * a limit of `0` can be used with an empty string `query` to return all members + */ + limit: number; + /** + * Used to specify if we want the presences of the matched members + */ + presences?: boolean; + /** + * Used to specify which users you wish to fetch + */ + user_ids?: Snowflake | Snowflake[]; + /** + * Nonce to identify the Guild Members Chunk response + * + * Nonce can only be up to 32 bytes. If you send an invalid nonce it will be ignored and the reply member_chunk(s) will not have a `nonce` set. + * + * See https://discord.com/developers/docs/topics/gateway#guild-members-chunk + */ + nonce?: string; +} +/** + * https://discord.com/developers/docs/topics/gateway#update-voice-state + */ +export interface GatewayVoiceStateUpdate { + op: GatewayOpcodes.VoiceStateUpdate; + d: GatewayVoiceStateUpdateData; +} +/** + * https://discord.com/developers/docs/topics/gateway#update-voice-state + */ +export interface GatewayVoiceStateUpdateData { + /** + * ID of the guild + */ + guild_id: Snowflake; + /** + * ID of the voice channel client wants to join (`null` if disconnecting) + */ + channel_id: Snowflake | null; + /** + * Is the client muted + */ + self_mute: boolean; + /** + * Is the client deafened + */ + self_deaf: boolean; +} +/** + * https://discord.com/developers/docs/topics/gateway#update-presence + */ +export interface GatewayUpdatePresence { + op: GatewayOpcodes.PresenceUpdate; + d: GatewayPresenceUpdateData; +} +/** + * https://discord.com/developers/docs/topics/gateway#update-presence-gateway-presence-update-structure + */ +export interface GatewayPresenceUpdateData { + /** + * Unix time (in milliseconds) of when the client went idle, or `null` if the client is not idle + */ + since: number | null; + /** + * The user's activities + * + * See https://discord.com/developers/docs/topics/gateway#activity-object + */ + activities: GatewayActivityUpdateData[]; + /** + * The user's new status + * + * See https://discord.com/developers/docs/topics/gateway#update-presence-status-types + */ + status: PresenceUpdateStatus; + /** + * Whether or not the client is afk + */ + afk: boolean; +} +/** + * https://discord.com/developers/docs/topics/gateway#activity-object-activity-structure + */ +export declare type GatewayActivityUpdateData = Pick; +interface BasePayload { + /** + * Opcode for the payload + */ + op: GatewayOpcodes; + /** + * Event data + */ + d?: unknown; + /** + * Sequence number, used for resuming sessions and heartbeats + */ + s: number; + /** + * The event name for this payload + */ + t?: string; +} +declare type NonDispatchPayload = Omit; +interface DataPayload extends BasePayload { + op: GatewayOpcodes.Dispatch; + t: Event; + d: D; +} +declare type ReactionData = DataPayload>; +interface MessageReactionRemoveData { + /** + * The id of the channel + */ + channel_id: Snowflake; + /** + * The id of the message + */ + message_id: Snowflake; + /** + * The id of the guild + */ + guild_id?: Snowflake; +} +//# sourceMappingURL=v8.d.ts.map \ No newline at end of file diff --git a/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/v8.d.ts.map b/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/v8.d.ts.map new file mode 100644 index 0000000..008e526 --- /dev/null +++ b/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/v8.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"v8.d.ts","sourceRoot":"","sources":["v8.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,KAAK,EACX,cAAc,EACd,qBAAqB,EACrB,gCAAgC,EAChC,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,mBAAmB,EACnB,cAAc,EACd,UAAU,EACV,8BAA8B,EAC9B,OAAO,EACP,gBAAgB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S,CAAC;IACtB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;;;OAIG;IACH,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB;;;;OAIG;IACH,KAAK,EAAE,QAAQ,CAAC;CAChB,EACD,CAAC,CACD,CACD,CAAC;AAEF,UAAU,yBAAyB;IAClC;;OAEG;IACH,UAAU,EAAE,SAAS,CAAC;IACtB;;OAEG;IACH,UAAU,EAAE,SAAS,CAAC;IACtB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACrB"} \ No newline at end of file diff --git a/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/v8.js b/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/v8.js new file mode 100644 index 0000000..a40af16 --- /dev/null +++ b/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/v8.js @@ -0,0 +1,228 @@ +"use strict"; +/** + * Types extracted from https://discord.com/developers/docs/topics/gateway + */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.GatewayDispatchEvents = exports.GatewayIntentBits = exports.GatewayCloseCodes = exports.GatewayOpcodes = exports.GatewayVersion = void 0; +__exportStar(require("./common"), exports); +exports.GatewayVersion = '8'; +/** + * https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-opcodes + */ +var GatewayOpcodes; +(function (GatewayOpcodes) { + /** + * An event was dispatched + */ + GatewayOpcodes[GatewayOpcodes["Dispatch"] = 0] = "Dispatch"; + /** + * A bidirectional opcode to maintain an active gateway connection. + * Fired periodically by the client, or fired by the gateway to request an immediate heartbeat from the client. + */ + GatewayOpcodes[GatewayOpcodes["Heartbeat"] = 1] = "Heartbeat"; + /** + * Starts a new session during the initial handshake + */ + GatewayOpcodes[GatewayOpcodes["Identify"] = 2] = "Identify"; + /** + * Update the client's presence + */ + GatewayOpcodes[GatewayOpcodes["PresenceUpdate"] = 3] = "PresenceUpdate"; + /** + * Used to join/leave or move between voice channels + */ + GatewayOpcodes[GatewayOpcodes["VoiceStateUpdate"] = 4] = "VoiceStateUpdate"; + /** + * Resume a previous session that was disconnected + */ + GatewayOpcodes[GatewayOpcodes["Resume"] = 6] = "Resume"; + /** + * You should attempt to reconnect and resume immediately + */ + GatewayOpcodes[GatewayOpcodes["Reconnect"] = 7] = "Reconnect"; + /** + * Request information about offline guild members in a large guild + */ + GatewayOpcodes[GatewayOpcodes["RequestGuildMembers"] = 8] = "RequestGuildMembers"; + /** + * The session has been invalidated. You should reconnect and identify/resume accordingly + */ + GatewayOpcodes[GatewayOpcodes["InvalidSession"] = 9] = "InvalidSession"; + /** + * Sent immediately after connecting, contains the `heartbeat_interval` to use + */ + GatewayOpcodes[GatewayOpcodes["Hello"] = 10] = "Hello"; + /** + * Sent in response to receiving a heartbeat to acknowledge that it has been received + */ + GatewayOpcodes[GatewayOpcodes["HeartbeatAck"] = 11] = "HeartbeatAck"; +})(GatewayOpcodes = exports.GatewayOpcodes || (exports.GatewayOpcodes = {})); +/** + * https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-close-event-codes + */ +var GatewayCloseCodes; +(function (GatewayCloseCodes) { + /** + * We're not sure what went wrong. Try reconnecting? + */ + GatewayCloseCodes[GatewayCloseCodes["UnknownError"] = 4000] = "UnknownError"; + /** + * You sent an invalid Gateway opcode or an invalid payload for an opcode. Don't do that! + * + * See https://discord.com/developers/docs/topics/gateway#payloads-and-opcodes + */ + GatewayCloseCodes[GatewayCloseCodes["UnknownOpcode"] = 4001] = "UnknownOpcode"; + /** + * You sent an invalid payload to us. Don't do that! + * + * See https://discord.com/developers/docs/topics/gateway#sending-payloads + */ + GatewayCloseCodes[GatewayCloseCodes["DecodeError"] = 4002] = "DecodeError"; + /** + * You sent us a payload prior to identifying + * + * See https://discord.com/developers/docs/topics/gateway#identify + */ + GatewayCloseCodes[GatewayCloseCodes["NotAuthenticated"] = 4003] = "NotAuthenticated"; + /** + * The account token sent with your identify payload is incorrect + * + * See https://discord.com/developers/docs/topics/gateway#identify + */ + GatewayCloseCodes[GatewayCloseCodes["AuthenticationFailed"] = 4004] = "AuthenticationFailed"; + /** + * You sent more than one identify payload. Don't do that! + */ + GatewayCloseCodes[GatewayCloseCodes["AlreadyAuthenticated"] = 4005] = "AlreadyAuthenticated"; + /** + * The sequence sent when resuming the session was invalid. Reconnect and start a new session + * + * See https://discord.com/developers/docs/topics/gateway#resume + */ + GatewayCloseCodes[GatewayCloseCodes["InvalidSeq"] = 4007] = "InvalidSeq"; + /** + * Woah nelly! You're sending payloads to us too quickly. Slow it down! You will be disconnected on receiving this + */ + GatewayCloseCodes[GatewayCloseCodes["RateLimited"] = 4008] = "RateLimited"; + /** + * Your session timed out. Reconnect and start a new one + */ + GatewayCloseCodes[GatewayCloseCodes["SessionTimedOut"] = 4009] = "SessionTimedOut"; + /** + * You sent us an invalid shard when identifying + * + * See https://discord.com/developers/docs/topics/gateway#sharding + */ + GatewayCloseCodes[GatewayCloseCodes["InvalidShard"] = 4010] = "InvalidShard"; + /** + * The session would have handled too many guilds - you are required to shard your connection in order to connect + * + * See https://discord.com/developers/docs/topics/gateway#sharding + */ + GatewayCloseCodes[GatewayCloseCodes["ShardingRequired"] = 4011] = "ShardingRequired"; + /** + * You sent an invalid version for the gateway + */ + GatewayCloseCodes[GatewayCloseCodes["InvalidAPIVersion"] = 4012] = "InvalidAPIVersion"; + /** + * You sent an invalid intent for a Gateway Intent. You may have incorrectly calculated the bitwise value + * + * See https://discord.com/developers/docs/topics/gateway#gateway-intents + */ + GatewayCloseCodes[GatewayCloseCodes["InvalidIntents"] = 4013] = "InvalidIntents"; + /** + * You sent a disallowed intent for a Gateway Intent. You may have tried to specify an intent that you have not + * enabled or are not whitelisted for + * + * See https://discord.com/developers/docs/topics/gateway#gateway-intents + * + * See https://discord.com/developers/docs/topics/gateway#privileged-intents + */ + GatewayCloseCodes[GatewayCloseCodes["DisallowedIntents"] = 4014] = "DisallowedIntents"; +})(GatewayCloseCodes = exports.GatewayCloseCodes || (exports.GatewayCloseCodes = {})); +/** + * https://discord.com/developers/docs/topics/gateway#list-of-intents + */ +var GatewayIntentBits; +(function (GatewayIntentBits) { + GatewayIntentBits[GatewayIntentBits["Guilds"] = 1] = "Guilds"; + GatewayIntentBits[GatewayIntentBits["GuildMembers"] = 2] = "GuildMembers"; + GatewayIntentBits[GatewayIntentBits["GuildBans"] = 4] = "GuildBans"; + GatewayIntentBits[GatewayIntentBits["GuildEmojisAndStickers"] = 8] = "GuildEmojisAndStickers"; + GatewayIntentBits[GatewayIntentBits["GuildIntegrations"] = 16] = "GuildIntegrations"; + GatewayIntentBits[GatewayIntentBits["GuildWebhooks"] = 32] = "GuildWebhooks"; + GatewayIntentBits[GatewayIntentBits["GuildInvites"] = 64] = "GuildInvites"; + GatewayIntentBits[GatewayIntentBits["GuildVoiceStates"] = 128] = "GuildVoiceStates"; + GatewayIntentBits[GatewayIntentBits["GuildPresences"] = 256] = "GuildPresences"; + GatewayIntentBits[GatewayIntentBits["GuildMessages"] = 512] = "GuildMessages"; + GatewayIntentBits[GatewayIntentBits["GuildMessageReactions"] = 1024] = "GuildMessageReactions"; + GatewayIntentBits[GatewayIntentBits["GuildMessageTyping"] = 2048] = "GuildMessageTyping"; + GatewayIntentBits[GatewayIntentBits["DirectMessages"] = 4096] = "DirectMessages"; + GatewayIntentBits[GatewayIntentBits["DirectMessageReactions"] = 8192] = "DirectMessageReactions"; + GatewayIntentBits[GatewayIntentBits["DirectMessageTyping"] = 16384] = "DirectMessageTyping"; +})(GatewayIntentBits = exports.GatewayIntentBits || (exports.GatewayIntentBits = {})); +/** + * https://discord.com/developers/docs/topics/gateway#commands-and-events-gateway-events + */ +var GatewayDispatchEvents; +(function (GatewayDispatchEvents) { + GatewayDispatchEvents["ApplicationCommandCreate"] = "APPLICATION_COMMAND_CREATE"; + GatewayDispatchEvents["ApplicationCommandDelete"] = "APPLICATION_COMMAND_DELETE"; + GatewayDispatchEvents["ApplicationCommandUpdate"] = "APPLICATION_COMMAND_UPDATE"; + GatewayDispatchEvents["ChannelCreate"] = "CHANNEL_CREATE"; + GatewayDispatchEvents["ChannelDelete"] = "CHANNEL_DELETE"; + GatewayDispatchEvents["ChannelPinsUpdate"] = "CHANNEL_PINS_UPDATE"; + GatewayDispatchEvents["ChannelUpdate"] = "CHANNEL_UPDATE"; + GatewayDispatchEvents["GuildBanAdd"] = "GUILD_BAN_ADD"; + GatewayDispatchEvents["GuildBanRemove"] = "GUILD_BAN_REMOVE"; + GatewayDispatchEvents["GuildCreate"] = "GUILD_CREATE"; + GatewayDispatchEvents["GuildDelete"] = "GUILD_DELETE"; + GatewayDispatchEvents["GuildEmojisUpdate"] = "GUILD_EMOJIS_UPDATE"; + GatewayDispatchEvents["GuildIntegrationsUpdate"] = "GUILD_INTEGRATIONS_UPDATE"; + GatewayDispatchEvents["GuildMemberAdd"] = "GUILD_MEMBER_ADD"; + GatewayDispatchEvents["GuildMemberRemove"] = "GUILD_MEMBER_REMOVE"; + GatewayDispatchEvents["GuildMembersChunk"] = "GUILD_MEMBERS_CHUNK"; + GatewayDispatchEvents["GuildMemberUpdate"] = "GUILD_MEMBER_UPDATE"; + GatewayDispatchEvents["GuildRoleCreate"] = "GUILD_ROLE_CREATE"; + GatewayDispatchEvents["GuildRoleDelete"] = "GUILD_ROLE_DELETE"; + GatewayDispatchEvents["GuildRoleUpdate"] = "GUILD_ROLE_UPDATE"; + GatewayDispatchEvents["GuildStickersUpdate"] = "GUILD_STICKERS_UPDATE"; + GatewayDispatchEvents["GuildUpdate"] = "GUILD_UPDATE"; + GatewayDispatchEvents["IntegrationCreate"] = "INTEGRATION_CREATE"; + GatewayDispatchEvents["IntegrationDelete"] = "INTEGRATION_DELETE"; + GatewayDispatchEvents["IntegrationUpdate"] = "INTEGRATION_UPDATE"; + GatewayDispatchEvents["InteractionCreate"] = "INTERACTION_CREATE"; + GatewayDispatchEvents["InviteCreate"] = "INVITE_CREATE"; + GatewayDispatchEvents["InviteDelete"] = "INVITE_DELETE"; + GatewayDispatchEvents["MessageCreate"] = "MESSAGE_CREATE"; + GatewayDispatchEvents["MessageDelete"] = "MESSAGE_DELETE"; + GatewayDispatchEvents["MessageDeleteBulk"] = "MESSAGE_DELETE_BULK"; + GatewayDispatchEvents["MessageReactionAdd"] = "MESSAGE_REACTION_ADD"; + GatewayDispatchEvents["MessageReactionRemove"] = "MESSAGE_REACTION_REMOVE"; + GatewayDispatchEvents["MessageReactionRemoveAll"] = "MESSAGE_REACTION_REMOVE_ALL"; + GatewayDispatchEvents["MessageReactionRemoveEmoji"] = "MESSAGE_REACTION_REMOVE_EMOJI"; + GatewayDispatchEvents["MessageUpdate"] = "MESSAGE_UPDATE"; + GatewayDispatchEvents["PresenceUpdate"] = "PRESENCE_UPDATE"; + GatewayDispatchEvents["StageInstanceCreate"] = "STAGE_INSTANCE_CREATE"; + GatewayDispatchEvents["StageInstanceDelete"] = "STAGE_INSTANCE_DELETE"; + GatewayDispatchEvents["StageInstanceUpdate"] = "STAGE_INSTANCE_UPDATE"; + GatewayDispatchEvents["Ready"] = "READY"; + GatewayDispatchEvents["Resumed"] = "RESUMED"; + GatewayDispatchEvents["TypingStart"] = "TYPING_START"; + GatewayDispatchEvents["UserUpdate"] = "USER_UPDATE"; + GatewayDispatchEvents["VoiceServerUpdate"] = "VOICE_SERVER_UPDATE"; + GatewayDispatchEvents["VoiceStateUpdate"] = "VOICE_STATE_UPDATE"; + GatewayDispatchEvents["WebhooksUpdate"] = "WEBHOOKS_UPDATE"; +})(GatewayDispatchEvents = exports.GatewayDispatchEvents || (exports.GatewayDispatchEvents = {})); +// #endregion Shared +//# sourceMappingURL=v8.js.map \ No newline at end of file diff --git a/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/v8.js.map b/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/v8.js.map new file mode 100644 index 0000000..ebdb041 --- /dev/null +++ b/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/v8.js.map @@ -0,0 +1 @@ +{"version":3,"file":"v8.js","sourceRoot":"","sources":["v8.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;AA2BH,2CAAyB;AAEZ,QAAA,cAAc,GAAG,GAAG,CAAC;AAElC;;GAEG;AACH,IAAkB,cA8CjB;AA9CD,WAAkB,cAAc;IAC/B;;OAEG;IACH,2DAAQ,CAAA;IACR;;;OAGG;IACH,6DAAS,CAAA;IACT;;OAEG;IACH,2DAAQ,CAAA;IACR;;OAEG;IACH,uEAAc,CAAA;IACd;;OAEG;IACH,2EAAgB,CAAA;IAChB;;OAEG;IACH,uDAAU,CAAA;IACV;;OAEG;IACH,6DAAS,CAAA;IACT;;OAEG;IACH,iFAAmB,CAAA;IACnB;;OAEG;IACH,uEAAc,CAAA;IACd;;OAEG;IACH,sDAAK,CAAA;IACL;;OAEG;IACH,oEAAY,CAAA;AACb,CAAC,EA9CiB,cAAc,GAAd,sBAAc,KAAd,sBAAc,QA8C/B;AAED;;GAEG;AACH,IAAkB,iBA8EjB;AA9ED,WAAkB,iBAAiB;IAClC;;OAEG;IACH,4EAAmB,CAAA;IACnB;;;;OAIG;IACH,8EAAa,CAAA;IACb;;;;OAIG;IACH,0EAAW,CAAA;IACX;;;;OAIG;IACH,oFAAgB,CAAA;IAChB;;;;OAIG;IACH,4FAAoB,CAAA;IACpB;;OAEG;IACH,4FAAoB,CAAA;IACpB;;;;OAIG;IACH,wEAAiB,CAAA;IACjB;;OAEG;IACH,0EAAW,CAAA;IACX;;OAEG;IACH,kFAAe,CAAA;IACf;;;;OAIG;IACH,4EAAY,CAAA;IACZ;;;;OAIG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A8B,CAAA;IAC9B,uDAA8B,CAAA;IAC9B,yDAAgC,CAAA;IAChC,yDAAgC,CAAA;IAChC,kEAAyC,CAAA;IACzC,oEAA2C,CAAA;IAC3C,0EAAiD,CAAA;IACjD,iFAAwD,CAAA;IACxD,qFAA4D,CAAA;IAC5D,yDAAgC,CAAA;IAChC,2DAAkC,CAAA;IAClC,sEAA6C,CAAA;IAC7C,sEAA6C,CAAA;IAC7C,sEAA6C,CAAA;IAC7C,wCAAe,CAAA;IACf,4CAAmB,CAAA;IACnB,qDAA4B,CAAA;IAC5B,mDAA0B,CAAA;IAC1B,kEAAyC,CAAA;IACzC,gEAAuC,CAAA;IACvC,2DAAkC,CAAA;AACnC,CAAC,EAhDiB,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QAgDtC;AA42CD,oBAAoB"} \ No newline at end of file diff --git a/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/v8.mjs b/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/v8.mjs new file mode 100644 index 0000000..c5cfed1 --- /dev/null +++ b/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/v8.mjs @@ -0,0 +1,8 @@ +import mod from "./v8.js"; + +export default mod; +export const GatewayCloseCodes = mod.GatewayCloseCodes; +export const GatewayDispatchEvents = mod.GatewayDispatchEvents; +export const GatewayIntentBits = mod.GatewayIntentBits; +export const GatewayOpcodes = mod.GatewayOpcodes; +export const GatewayVersion = mod.GatewayVersion; diff --git a/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/v9.d.ts b/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/v9.d.ts new file mode 100644 index 0000000..acad031 --- /dev/null +++ b/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/v9.d.ts @@ -0,0 +1,1362 @@ +/** + * Types extracted from https://discord.com/developers/docs/topics/gateway + */ +import type { Snowflake } from '../globals'; +import type { APIApplication, APIApplicationCommand, APIApplicationCommandInteraction, APIChannel, APIEmoji, APIGuild, APIGuildIntegration, APIGuildMember, APIMessage, APIMessageComponentInteraction, APIRole, APIStageInstance, APISticker, APIThreadMember, APIUnavailableGuild, APIUser, GatewayActivity, GatewayPresenceUpdate as RawGatewayPresenceUpdate, GatewayThreadListSync as RawGatewayThreadListSync, GatewayThreadMembersUpdate as RawGatewayThreadMembersUpdate, GatewayVoiceState, InviteTargetType, PresenceUpdateStatus } from '../payloads/v9/index'; +import type { Nullable } from '../utils/internals'; +export * from './common'; +export declare const GatewayVersion = "9"; +/** + * https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-opcodes + */ +export declare const enum GatewayOpcodes { + /** + * An event was dispatched + */ + Dispatch = 0, + /** + * A bidirectional opcode to maintain an active gateway connection. + * Fired periodically by the client, or fired by the gateway to request an immediate heartbeat from the client. + */ + Heartbeat = 1, + /** + * Starts a new session during the initial handshake + */ + Identify = 2, + /** + * Update the client's presence + */ + PresenceUpdate = 3, + /** + * Used to join/leave or move between voice channels + */ + VoiceStateUpdate = 4, + /** + * Resume a previous session that was disconnected + */ + Resume = 6, + /** + * You should attempt to reconnect and resume immediately + */ + Reconnect = 7, + /** + * Request information about offline guild members in a large guild + */ + RequestGuildMembers = 8, + /** + * The session has been invalidated. You should reconnect and identify/resume accordingly + */ + InvalidSession = 9, + /** + * Sent immediately after connecting, contains the `heartbeat_interval` to use + */ + Hello = 10, + /** + * Sent in response to receiving a heartbeat to acknowledge that it has been received + */ + HeartbeatAck = 11 +} +/** + * https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-close-event-codes + */ +export declare const enum GatewayCloseCodes { + /** + * We're not sure what went wrong. Try reconnecting? + */ + UnknownError = 4000, + /** + * You sent an invalid Gateway opcode or an invalid payload for an opcode. Don't do that! + * + * See https://discord.com/developers/docs/topics/gateway#payloads-and-opcodes + */ + UnknownOpcode = 4001, + /** + * You sent an invalid payload to us. Don't do that! + * + * See https://discord.com/developers/docs/topics/gateway#sending-payloads + */ + DecodeError = 4002, + /** + * You sent us a payload prior to identifying + * + * See https://discord.com/developers/docs/topics/gateway#identify + */ + NotAuthenticated = 4003, + /** + * The account token sent with your identify payload is incorrect + * + * See https://discord.com/developers/docs/topics/gateway#identify + */ + AuthenticationFailed = 4004, + /** + * You sent more than one identify payload. Don't do that! + */ + AlreadyAuthenticated = 4005, + /** + * The sequence sent when resuming the session was invalid. Reconnect and start a new session + * + * See https://discord.com/developers/docs/topics/gateway#resume + */ + InvalidSeq = 4007, + /** + * Woah nelly! You're sending payloads to us too quickly. Slow it down! You will be disconnected on receiving this + */ + RateLimited = 4008, + /** + * Your session timed out. Reconnect and start a new one + */ + SessionTimedOut = 4009, + /** + * You sent us an invalid shard when identifying + * + * See https://discord.com/developers/docs/topics/gateway#sharding + */ + InvalidShard = 4010, + /** + * The session would have handled too many guilds - you are required to shard your connection in order to connect + * + * See https://discord.com/developers/docs/topics/gateway#sharding + */ + ShardingRequired = 4011, + /** + * You sent an invalid version for the gateway + */ + InvalidAPIVersion = 4012, + /** + * You sent an invalid intent for a Gateway Intent. You may have incorrectly calculated the bitwise value + * + * See https://discord.com/developers/docs/topics/gateway#gateway-intents + */ + InvalidIntents = 4013, + /** + * You sent a disallowed intent for a Gateway Intent. You may have tried to specify an intent that you have not + * enabled or are not whitelisted for + * + * See https://discord.com/developers/docs/topics/gateway#gateway-intents + * + * See https://discord.com/developers/docs/topics/gateway#privileged-intents + */ + DisallowedIntents = 4014 +} +/** + * https://discord.com/developers/docs/topics/gateway#list-of-intents + */ +export declare const enum GatewayIntentBits { + Guilds = 1, + GuildMembers = 2, + GuildBans = 4, + GuildEmojisAndStickers = 8, + GuildIntegrations = 16, + GuildWebhooks = 32, + GuildInvites = 64, + GuildVoiceStates = 128, + GuildPresences = 256, + GuildMessages = 512, + GuildMessageReactions = 1024, + GuildMessageTyping = 2048, + DirectMessages = 4096, + DirectMessageReactions = 8192, + DirectMessageTyping = 16384 +} +/** + * https://discord.com/developers/docs/topics/gateway#commands-and-events-gateway-events + */ +export declare const enum GatewayDispatchEvents { + ApplicationCommandCreate = "APPLICATION_COMMAND_CREATE", + ApplicationCommandDelete = "APPLICATION_COMMAND_DELETE", + ApplicationCommandUpdate = "APPLICATION_COMMAND_UPDATE", + ChannelCreate = "CHANNEL_CREATE", + ChannelDelete = "CHANNEL_DELETE", + ChannelPinsUpdate = "CHANNEL_PINS_UPDATE", + ChannelUpdate = "CHANNEL_UPDATE", + GuildBanAdd = "GUILD_BAN_ADD", + GuildBanRemove = "GUILD_BAN_REMOVE", + GuildCreate = "GUILD_CREATE", + GuildDelete = "GUILD_DELETE", + GuildEmojisUpdate = "GUILD_EMOJIS_UPDATE", + GuildIntegrationsUpdate = "GUILD_INTEGRATIONS_UPDATE", + GuildMemberAdd = "GUILD_MEMBER_ADD", + GuildMemberRemove = "GUILD_MEMBER_REMOVE", + GuildMembersChunk = "GUILD_MEMBERS_CHUNK", + GuildMemberUpdate = "GUILD_MEMBER_UPDATE", + GuildRoleCreate = "GUILD_ROLE_CREATE", + GuildRoleDelete = "GUILD_ROLE_DELETE", + GuildRoleUpdate = "GUILD_ROLE_UPDATE", + GuildStickersUpdate = "GUILD_STICKERS_UPDATE", + GuildUpdate = "GUILD_UPDATE", + IntegrationCreate = "INTEGRATION_CREATE", + IntegrationDelete = "INTEGRATION_DELETE", + IntegrationUpdate = "INTEGRATION_UPDATE", + InteractionCreate = "INTERACTION_CREATE", + InviteCreate = "INVITE_CREATE", + InviteDelete = "INVITE_DELETE", + MessageCreate = "MESSAGE_CREATE", + MessageDelete = "MESSAGE_DELETE", + MessageDeleteBulk = "MESSAGE_DELETE_BULK", + MessageReactionAdd = "MESSAGE_REACTION_ADD", + MessageReactionRemove = "MESSAGE_REACTION_REMOVE", + MessageReactionRemoveAll = "MESSAGE_REACTION_REMOVE_ALL", + MessageReactionRemoveEmoji = "MESSAGE_REACTION_REMOVE_EMOJI", + MessageUpdate = "MESSAGE_UPDATE", + PresenceUpdate = "PRESENCE_UPDATE", + StageInstanceCreate = "STAGE_INSTANCE_CREATE", + StageInstanceDelete = "STAGE_INSTANCE_DELETE", + StageInstanceUpdate = "STAGE_INSTANCE_UPDATE", + Ready = "READY", + Resumed = "RESUMED", + ThreadCreate = "THREAD_CREATE", + ThreadDelete = "THREAD_DELETE", + ThreadListSync = "THREAD_LIST_SYNC", + ThreadMembersUpdate = "THREAD_MEMBERS_UPDATE", + ThreadMemberUpdate = "THREAD_MEMBER_UPDATE", + ThreadUpdate = "THREAD_UPDATE", + TypingStart = "TYPING_START", + UserUpdate = "USER_UPDATE", + VoiceServerUpdate = "VOICE_SERVER_UPDATE", + VoiceStateUpdate = "VOICE_STATE_UPDATE", + WebhooksUpdate = "WEBHOOKS_UPDATE" +} +export declare type GatewaySendPayload = GatewayHeartbeat | GatewayIdentify | GatewayUpdatePresence | GatewayVoiceStateUpdate | GatewayResume | GatewayRequestGuildMembers; +export declare type GatewayReceivePayload = GatewayHello | GatewayHeartbeatRequest | GatewayHeartbeatAck | GatewayInvalidSession | GatewayReconnect | GatewayDispatchPayload; +export declare type GatewayDispatchPayload = GatewayChannelModifyDispatch | GatewayChannelPinsUpdateDispatch | GatewayGuildBanModifyDispatch | GatewayGuildDeleteDispatch | GatewayGuildEmojisUpdateDispatch | GatewayGuildIntegrationsUpdateDispatch | GatewayGuildMemberAddDispatch | GatewayGuildMemberRemoveDispatch | GatewayGuildMembersChunkDispatch | GatewayGuildMemberUpdateDispatch | GatewayGuildModifyDispatch | GatewayGuildRoleDeleteDispatch | GatewayGuildRoleModifyDispatch | GatewayGuildStickersUpdateDispatch | GatewayIntegrationCreateDispatch | GatewayIntegrationDeleteDispatch | GatewayIntegrationUpdateDispatch | GatewayInteractionCreateDispatch | GatewayInviteCreateDispatch | GatewayInviteDeleteDispatch | GatewayMessageCreateDispatch | GatewayMessageDeleteBulkDispatch | GatewayMessageDeleteDispatch | GatewayMessageReactionAddDispatch | GatewayMessageReactionRemoveAllDispatch | GatewayMessageReactionRemoveDispatch | GatewayMessageReactionRemoveEmojiDispatch | GatewayMessageUpdateDispatch | GatewayPresenceUpdateDispatch | GatewayReadyDispatch | GatewayResumedDispatch | GatewayThreadListSyncDispatch | GatewayThreadMembersUpdateDispatch | GatewayThreadMemberUpdateDispatch | GatewayThreadModifyDispatch | GatewayTypingStartDispatch | GatewayUserUpdateDispatch | GatewayVoiceServerUpdateDispatch | GatewayVoiceStateUpdateDispatch | GatewayWebhooksUpdateDispatch; +/** + * https://discord.com/developers/docs/topics/gateway#application-command-create + * https://discord.com/developers/docs/topics/gateway#application-command-update + * https://discord.com/developers/docs/topics/gateway#application-command-delete + */ +export declare type GatewayApplicationCommandModifyDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#application-command-create + * https://discord.com/developers/docs/topics/gateway#application-command-update + * https://discord.com/developers/docs/topics/gateway#application-command-delete + */ +export declare type GatewayApplicationCommandModifyDispatchData = APIApplicationCommand; +/** + * https://discord.com/developers/docs/topics/gateway#application-command-create + */ +export declare type GatewayApplicationCommandCreateDispatch = GatewayApplicationCommandModifyDispatch; +/** + * https://discord.com/developers/docs/topics/gateway#application-command-create + */ +export declare type GatewayApplicationCommandCreateDispatchData = GatewayApplicationCommandModifyDispatchData; +/** + * https://discord.com/developers/docs/topics/gateway#application-command-update + */ +export declare type GatewayApplicationCommandUpdateDispatch = GatewayApplicationCommandModifyDispatch; +/** + * https://discord.com/developers/docs/topics/gateway#application-command-update + */ +export declare type GatewayApplicationCommandUpdateDispatchData = GatewayApplicationCommandModifyDispatchData; +/** + * https://discord.com/developers/docs/topics/gateway#application-command-delete + */ +export declare type GatewayApplicationCommandDeleteDispatch = GatewayApplicationCommandModifyDispatch; +/** + * https://discord.com/developers/docs/topics/gateway#application-command-delete + */ +export declare type GatewayApplicationCommandDeleteDispatchData = GatewayApplicationCommandModifyDispatchData; +/** + * https://discord.com/developers/docs/topics/gateway#hello + */ +export interface GatewayHello extends NonDispatchPayload { + op: GatewayOpcodes.Hello; + d: GatewayHelloData; +} +/** + * https://discord.com/developers/docs/topics/gateway#hello + */ +export interface GatewayHelloData { + /** + * The interval (in milliseconds) the client should heartbeat with + */ + heartbeat_interval: number; +} +/** + * https://discord.com/developers/docs/topics/gateway#heartbeating + */ +export interface GatewayHeartbeatRequest extends NonDispatchPayload { + op: GatewayOpcodes.Heartbeat; + d: never; +} +/** + * https://discord.com/developers/docs/topics/gateway#heartbeating-example-gateway-heartbeat-ack + */ +export interface GatewayHeartbeatAck extends NonDispatchPayload { + op: GatewayOpcodes.HeartbeatAck; + d: never; +} +/** + * https://discord.com/developers/docs/topics/gateway#invalid-session + */ +export interface GatewayInvalidSession extends NonDispatchPayload { + op: GatewayOpcodes.InvalidSession; + d: GatewayInvalidSessionData; +} +/** + * https://discord.com/developers/docs/topics/gateway#invalid-session + */ +export declare type GatewayInvalidSessionData = boolean; +/** + * https://discord.com/developers/docs/topics/gateway#reconnect + */ +export interface GatewayReconnect extends NonDispatchPayload { + op: GatewayOpcodes.Reconnect; + d: never; +} +/** + * https://discord.com/developers/docs/topics/gateway#ready + */ +export declare type GatewayReadyDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#ready + */ +export interface GatewayReadyDispatchData { + /** + * Gateway version + * + * See https://discord.com/developers/docs/topics/gateway#gateways-gateway-versions + */ + v: number; + /** + * Information about the user including email + * + * See https://discord.com/developers/docs/resources/user#user-object + */ + user: APIUser; + /** + * The guilds the user is in + * + * See https://discord.com/developers/docs/resources/guild#unavailable-guild-object + */ + guilds: APIUnavailableGuild[]; + /** + * Used for resuming connections + */ + session_id: string; + /** + * The shard information associated with this session, if sent when identifying + * + * See https://discord.com/developers/docs/topics/gateway#sharding + */ + shard?: [shard_id: number, shard_count: number]; + /** + * Contains `id` and `flags` + * + * See https://discord.com/developers/docs/resources/application#application-object + */ + application: Pick; +} +/** + * https://discord.com/developers/docs/topics/gateway#resumed + */ +export declare type GatewayResumedDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#channel-create + * https://discord.com/developers/docs/topics/gateway#channel-update + * https://discord.com/developers/docs/topics/gateway#channel-delete + */ +export declare type GatewayChannelModifyDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#channel-create + * https://discord.com/developers/docs/topics/gateway#channel-update + * https://discord.com/developers/docs/topics/gateway#channel-delete + */ +export declare type GatewayChannelModifyDispatchData = APIChannel; +/** + * https://discord.com/developers/docs/topics/gateway#channel-create + */ +export declare type GatewayChannelCreateDispatch = GatewayChannelModifyDispatch; +/** + * https://discord.com/developers/docs/topics/gateway#channel-create + */ +export declare type GatewayChannelCreateDispatchData = GatewayChannelModifyDispatchData; +/** + * https://discord.com/developers/docs/topics/gateway#channel-update + */ +export declare type GatewayChannelUpdateDispatch = GatewayChannelModifyDispatch; +/** + * https://discord.com/developers/docs/topics/gateway#channel-update + */ +export declare type GatewayChannelUpdateDispatchData = GatewayChannelModifyDispatchData; +/** + * https://discord.com/developers/docs/topics/gateway#channel-delete + */ +export declare type GatewayChannelDeleteDispatch = GatewayChannelModifyDispatch; +/** + * https://discord.com/developers/docs/topics/gateway#channel-delete + */ +export declare type GatewayChannelDeleteDispatchData = GatewayChannelModifyDispatchData; +/** + * https://discord.com/developers/docs/topics/gateway#channel-pins-update + */ +export declare type GatewayChannelPinsUpdateDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#channel-pins-update + */ +export interface GatewayChannelPinsUpdateDispatchData { + /** + * The id of the guild + */ + guild_id?: Snowflake; + /** + * The id of the channel + */ + channel_id: Snowflake; + /** + * The time at which the most recent pinned message was pinned + */ + last_pin_timestamp?: string | null; +} +/** + * https://discord.com/developers/docs/topics/gateway#guild-create + * https://discord.com/developers/docs/topics/gateway#guild-update + */ +export declare type GatewayGuildModifyDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#guild-create + * https://discord.com/developers/docs/topics/gateway#guild-update + */ +export declare type GatewayGuildModifyDispatchData = APIGuild; +/** + * https://discord.com/developers/docs/topics/gateway#guild-create + */ +export declare type GatewayGuildCreateDispatch = GatewayGuildModifyDispatch; +/** + * https://discord.com/developers/docs/topics/gateway#guild-create + */ +export declare type GatewayGuildCreateDispatchData = GatewayGuildModifyDispatchData; +/** + * https://discord.com/developers/docs/topics/gateway#guild-update + */ +export declare type GatewayGuildUpdateDispatch = GatewayGuildModifyDispatch; +/** + * https://discord.com/developers/docs/topics/gateway#guild-update + */ +export declare type GatewayGuildUpdateDispatchData = GatewayGuildModifyDispatchData; +/** + * https://discord.com/developers/docs/topics/gateway#guild-delete + */ +export declare type GatewayGuildDeleteDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#guild-delete + */ +export declare type GatewayGuildDeleteDispatchData = APIUnavailableGuild; +/** + * https://discord.com/developers/docs/topics/gateway#guild-ban-add + * https://discord.com/developers/docs/topics/gateway#guild-ban-remove + */ +export declare type GatewayGuildBanModifyDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#guild-ban-add + * https://discord.com/developers/docs/topics/gateway#guild-ban-remove + */ +export interface GatewayGuildBanModifyDispatchData { + /** + * ID of the guild + */ + guild_id: Snowflake; + /** + * The banned user + * + * See https://discord.com/developers/docs/resources/user#user-object + */ + user: APIUser; +} +/** + * https://discord.com/developers/docs/topics/gateway#guild-ban-add + */ +export declare type GatewayGuildBanAddDispatch = GatewayGuildBanModifyDispatch; +/** + * https://discord.com/developers/docs/topics/gateway#guild-ban-add + */ +export declare type GatewayGuildBanAddDispatchData = GatewayGuildBanModifyDispatchData; +/** + * https://discord.com/developers/docs/topics/gateway#guild-ban-remove + */ +export declare type GatewayGuildBanRemoveDispatch = GatewayGuildBanModifyDispatch; +/** + * https://discord.com/developers/docs/topics/gateway#guild-ban-remove + */ +export declare type GatewayGuildBanRemoveDispatchData = GatewayGuildBanModifyDispatchData; +/** + * https://discord.com/developers/docs/topics/gateway#guild-emojis-update + */ +export declare type GatewayGuildEmojisUpdateDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#guild-emojis-update + */ +export interface GatewayGuildEmojisUpdateDispatchData { + /** + * ID of the guild + */ + guild_id: Snowflake; + /** + * Array of emojis + * + * See https://discord.com/developers/docs/resources/emoji#emoji-object + */ + emojis: APIEmoji[]; +} +/** + * https://discord.com/developers/docs/topics/gateway#guild-stickers-update + */ +export declare type GatewayGuildStickersUpdateDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#guild-stickers-update + */ +export interface GatewayGuildStickersUpdateDispatchData { + /** + * ID of the guild + */ + guild_id: Snowflake; + /** + * Array of stickers + * + * See https://discord.com/developers/docs/resources/sticker#sticker-object + */ + stickers: APISticker[]; +} +/** + * https://discord.com/developers/docs/topics/gateway#guild-integrations-update + */ +export declare type GatewayGuildIntegrationsUpdateDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#guild-integrations-update + */ +export interface GatewayGuildIntegrationsUpdateDispatchData { + /** + * ID of the guild whose integrations were updated + */ + guild_id: Snowflake; +} +/** + * https://discord.com/developers/docs/topics/gateway#guild-member-add + */ +export declare type GatewayGuildMemberAddDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#guild-member-add + */ +export interface GatewayGuildMemberAddDispatchData extends APIGuildMember { + /** + * The id of the guild + */ + guild_id: Snowflake; +} +/** + * https://discord.com/developers/docs/topics/gateway#guild-member-remove + */ +export declare type GatewayGuildMemberRemoveDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#guild-member-remove + */ +export interface GatewayGuildMemberRemoveDispatchData { + /** + * The id of the guild + */ + guild_id: Snowflake; + /** + * The user who was removed + * + * See https://discord.com/developers/docs/resources/user#user-object + */ + user: APIUser; +} +/** + * https://discord.com/developers/docs/topics/gateway#guild-member-update + */ +export declare type GatewayGuildMemberUpdateDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#guild-member-update + */ +export declare type GatewayGuildMemberUpdateDispatchData = Omit & Partial> & Required> & Nullable> & { + /** + * The id of the guild + */ + guild_id: Snowflake; +}; +/** + * https://discord.com/developers/docs/topics/gateway#guild-members-chunk + */ +export declare type GatewayGuildMembersChunkDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#guild-members-chunk + */ +export interface GatewayGuildMembersChunkDispatchData { + /** + * The id of the guild + */ + guild_id: Snowflake; + /** + * Set of guild members + * + * See https://discord.com/developers/docs/resources/guild#guild-member-object + */ + members: APIGuildMember[]; + /** + * The chunk index in the expected chunks for this response (`0 <= chunk_index < chunk_count`) + */ + chunk_index?: number; + /** + * The total number of expected chunks for this response + */ + chunk_count?: number; + /** + * If passing an invalid id to `REQUEST_GUILD_MEMBERS`, it will be returned here + */ + not_found?: unknown[]; + /** + * If passing true to `REQUEST_GUILD_MEMBERS`, presences of the returned members will be here + * + * See https://discord.com/developers/docs/topics/gateway#presence + */ + presences?: RawGatewayPresenceUpdate[]; + /** + * The nonce used in the Guild Members Request + * + * See https://discord.com/developers/docs/topics/gateway#request-guild-members + */ + nonce?: string; +} +/** + * https://discord.com/developers/docs/topics/gateway#guild-role-create + * https://discord.com/developers/docs/topics/gateway#guild-role-update + */ +export declare type GatewayGuildRoleModifyDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#guild-role-create + * https://discord.com/developers/docs/topics/gateway#guild-role-update + */ +export interface GatewayGuildRoleModifyDispatchData { + /** + * The id of the guild + */ + guild_id: Snowflake; + /** + * The role created or updated + * + * See https://discord.com/developers/docs/topics/permissions#role-object + */ + role: APIRole; +} +/** + * https://discord.com/developers/docs/topics/gateway#guild-role-create + */ +export declare type GatewayGuildRoleCreateDispatch = GatewayGuildRoleModifyDispatch; +/** + * https://discord.com/developers/docs/topics/gateway#guild-role-create + */ +export declare type GatewayGuildRoleCreateDispatchData = GatewayGuildRoleModifyDispatchData; +/** + * https://discord.com/developers/docs/topics/gateway#guild-role-update + */ +export declare type GatewayGuildRoleUpdateDispatch = GatewayGuildRoleModifyDispatch; +/** + * https://discord.com/developers/docs/topics/gateway#guild-role-update + */ +export declare type GatewayGuildRoleUpdateDispatchData = GatewayGuildRoleModifyDispatchData; +/** + * https://discord.com/developers/docs/topics/gateway#guild-role-delete + */ +export declare type GatewayGuildRoleDeleteDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#guild-role-delete + */ +export interface GatewayGuildRoleDeleteDispatchData { + /** + * The id of the guild + */ + guild_id: Snowflake; + /** + * The id of the role + */ + role_id: Snowflake; +} +/** + * https://discord.com/developers/docs/topics/gateway#integration-create + */ +export declare type GatewayIntegrationCreateDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#integration-create + */ +export declare type GatewayIntegrationCreateDispatchData = APIGuildIntegration & { + guild_id: Snowflake; +}; +/** + * https://discord.com/developers/docs/topics/gateway#integration-update + */ +export declare type GatewayIntegrationUpdateDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#integration-update + */ +export declare type GatewayIntegrationUpdateDispatchData = APIGuildIntegration & { + guild_id: Snowflake; +}; +/** + * https://discord.com/developers/docs/topics/gateway#integration-update + */ +export declare type GatewayIntegrationDeleteDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#integration-delete + */ +export interface GatewayIntegrationDeleteDispatchData { + /** + * Integration id + */ + id: Snowflake; + /** + * ID of the guild + */ + guild_id: Snowflake; + /** + * ID of the bot/OAuth2 application for this Discord integration + */ + application_id?: Snowflake; +} +/** + * https://discord.com/developers/docs/topics/gateway#interaction-create + */ +export declare type GatewayInteractionCreateDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#interaction-create + */ +export declare type GatewayInteractionCreateDispatchData = APIApplicationCommandInteraction | APIMessageComponentInteraction; +/** + * https://discord.com/developers/docs/topics/gateway#invite-create + */ +export declare type GatewayInviteCreateDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#invite-create + */ +export interface GatewayInviteCreateDispatchData { + /** + * The channel the invite is for + */ + channel_id: Snowflake; + /** + * The unique invite code + * + * See https://discord.com/developers/docs/resources/invite#invite-object + */ + code: string; + /** + * The time at which the invite was created + */ + created_at: number; + /** + * The guild of the invite + */ + guild_id?: Snowflake; + /** + * The user that created the invite + * + * See https://discord.com/developers/docs/resources/user#user-object + */ + inviter?: APIUser; + /** + * How long the invite is valid for (in seconds) + */ + max_age: number; + /** + * The maximum number of times the invite can be used + */ + max_uses: number; + /** + * The type of target for this voice channel invite + * + * See https://discord.com/developers/docs/resources/invite#invite-object-invite-target-types + */ + target_type?: InviteTargetType; + /** + * The user whose stream to display for this voice channel stream invite + * + * See https://discord.com/developers/docs/resources/user#user-object + */ + target_user?: APIUser; + /** + * The embedded application to open for this voice channel embedded application invite + */ + target_application?: Partial; + /** + * Whether or not the invite is temporary (invited users will be kicked on disconnect unless they're assigned a role) + */ + temporary: boolean; + /** + * How many times the invite has been used (always will be `0`) + */ + uses: 0; +} +/** + * https://discord.com/developers/docs/topics/gateway#invite-delete + */ +export declare type GatewayInviteDeleteDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#invite-delete + */ +export interface GatewayInviteDeleteDispatchData { + /** + * The channel of the invite + */ + channel_id: Snowflake; + /** + * The guild of the invite + */ + guild_id?: Snowflake; + /** + * The unique invite code + * + * See https://discord.com/developers/docs/resources/invite#invite-object + */ + code: string; +} +/** + * https://discord.com/developers/docs/topics/gateway#message-create + */ +export declare type GatewayMessageCreateDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#message-create + */ +export declare type GatewayMessageCreateDispatchData = APIMessage; +/** + * https://discord.com/developers/docs/topics/gateway#message-update + */ +export declare type GatewayMessageUpdateDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#message-update + */ +export declare type GatewayMessageUpdateDispatchData = { + id: Snowflake; + channel_id: Snowflake; +} & Partial; +/** + * https://discord.com/developers/docs/topics/gateway#message-delete + */ +export declare type GatewayMessageDeleteDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#message-delete + */ +export interface GatewayMessageDeleteDispatchData { + /** + * The id of the message + */ + id: Snowflake; + /** + * The id of the channel + */ + channel_id: Snowflake; + /** + * The id of the guild + */ + guild_id?: Snowflake; +} +/** + * https://discord.com/developers/docs/topics/gateway#message-delete-bulk + */ +export declare type GatewayMessageDeleteBulkDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#message-delete-bulk + */ +export interface GatewayMessageDeleteBulkDispatchData { + /** + * The ids of the messages + */ + ids: Snowflake[]; + /** + * The id of the channel + */ + channel_id: Snowflake; + /** + * The id of the guild + */ + guild_id?: Snowflake; +} +/** + * https://discord.com/developers/docs/topics/gateway#message-reaction-add + */ +export declare type GatewayMessageReactionAddDispatch = ReactionData; +/** + * https://discord.com/developers/docs/topics/gateway#message-reaction-add + */ +export declare type GatewayMessageReactionAddDispatchData = GatewayMessageReactionAddDispatch['d']; +/** + * https://discord.com/developers/docs/topics/gateway#message-reaction-remove + */ +export declare type GatewayMessageReactionRemoveDispatch = ReactionData; +/** + * https://discord.com/developers/docs/topics/gateway#message-reaction-remove + */ +export declare type GatewayMessageReactionRemoveDispatchData = GatewayMessageReactionRemoveDispatch['d']; +/** + * https://discord.com/developers/docs/topics/gateway#message-reaction-remove-all + */ +export declare type GatewayMessageReactionRemoveAllDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#message-reaction-remove-all + */ +export declare type GatewayMessageReactionRemoveAllDispatchData = MessageReactionRemoveData; +/** + * https://discord.com/developers/docs/topics/gateway#message-reaction-remove-emoji + */ +export declare type GatewayMessageReactionRemoveEmojiDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#message-reaction-remove-emoji + */ +export interface GatewayMessageReactionRemoveEmojiDispatchData extends MessageReactionRemoveData { + /** + * The emoji that was removed + */ + emoji: APIEmoji; +} +/** + * https://discord.com/developers/docs/topics/gateway#presence-update + */ +export declare type GatewayPresenceUpdateDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#presence-update + */ +export declare type GatewayPresenceUpdateDispatchData = RawGatewayPresenceUpdate; +/** + * https://discord.com/developers/docs/topics/gateway#stage-instance-create + */ +export declare type GatewayStageInstanceCreateDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#stage-instance-create + */ +export declare type GatewayStageInstanceCreateDispatchData = APIStageInstance; +/** + * https://discord.com/developers/docs/topics/gateway#stage-instance-delete + */ +export declare type GatewayStageInstanceDeleteDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#stage-instance-delete + */ +export declare type GatewayStageInstanceDeleteDispatchData = APIStageInstance; +/** + * https://discord.com/developers/docs/topics/gateway#stage-instance-update + */ +export declare type GatewayStageInstanceUpdateDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#stage-instance-update + */ +export declare type GatewayStageInstanceUpdateDispatchData = APIStageInstance; +/** + * https://discord.com/developers/docs/topics/gateway#thread-list-sync + */ +export declare type GatewayThreadListSyncDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#thread-list-sync + */ +export declare type GatewayThreadListSyncDispatchData = RawGatewayThreadListSync; +/** + * https://discord.com/developers/docs/topics/gateway#thread-members-update + */ +export declare type GatewayThreadMembersUpdateDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#thread-members-update + */ +export declare type GatewayThreadMembersUpdateDispatchData = RawGatewayThreadMembersUpdate; +/** + * https://discord.com/developers/docs/topics/gateway#thread-member-update + */ +export declare type GatewayThreadMemberUpdateDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#thread-member-update + */ +export declare type GatewayThreadMemberUpdateDispatchData = APIThreadMember; +/** + * https://discord.com/developers/docs/topics/gateway#thread-create + * https://discord.com/developers/docs/topics/gateway#thread-update + * https://discord.com/developers/docs/topics/gateway#thread-delete + */ +export declare type GatewayThreadModifyDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#thread-create + */ +export declare type GatewayThreadCreateDispatch = GatewayChannelModifyDispatch; +/** + * https://discord.com/developers/docs/topics/gateway#thread-create + */ +export declare type GatewayThreadCreateDispatchData = GatewayChannelModifyDispatchData; +/** + * https://discord.com/developers/docs/topics/gateway#thread-update + */ +export declare type GatewayThreadUpdateDispatch = GatewayChannelModifyDispatch; +/** + * https://discord.com/developers/docs/topics/gateway#thread-update + */ +export declare type GatewayThreadUpdateDispatchData = GatewayChannelModifyDispatchData; +/** + * https://discord.com/developers/docs/topics/gateway#thread-delete + */ +export declare type GatewayThreadDeleteDispatch = GatewayChannelModifyDispatch; +/** + * https://discord.com/developers/docs/topics/gateway#thread-delete + */ +export declare type GatewayThreadDeleteDispatchData = GatewayChannelModifyDispatchData; +/** + * https://discord.com/developers/docs/topics/gateway#typing-start + */ +export declare type GatewayTypingStartDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#typing-start + */ +export interface GatewayTypingStartDispatchData { + /** + * The id of the channel + */ + channel_id: Snowflake; + /** + * The id of the guild + */ + guild_id?: Snowflake; + /** + * The id of the user + */ + user_id: Snowflake; + /** + * Unix time (in seconds) of when the user started typing + */ + timestamp: number; + /** + * The member who started typing if this happened in a guild + * + * See https://discord.com/developers/docs/resources/guild#guild-member-object + */ + member?: APIGuildMember; +} +/** + * https://discord.com/developers/docs/topics/gateway#user-update + */ +export declare type GatewayUserUpdateDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#user-update + */ +export declare type GatewayUserUpdateDispatchData = APIUser; +/** + * https://discord.com/developers/docs/topics/gateway#voice-state-update + */ +export declare type GatewayVoiceStateUpdateDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#voice-state-update + */ +export declare type GatewayVoiceStateUpdateDispatchData = GatewayVoiceState; +/** + * https://discord.com/developers/docs/topics/gateway#voice-server-update + */ +export declare type GatewayVoiceServerUpdateDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#voice-server-update + */ +export interface GatewayVoiceServerUpdateDispatchData { + /** + * Voice connection token + */ + token: string; + /** + * The guild this voice server update is for + */ + guild_id: Snowflake; + /** + * The voice server host + * + * A `null` endpoint means that the voice server allocated has gone away and is trying to be reallocated. + * You should attempt to disconnect from the currently connected voice server, and not attempt to reconnect + * until a new voice server is allocated + */ + endpoint: string | null; +} +/** + * https://discord.com/developers/docs/topics/gateway#webhooks-update + */ +export declare type GatewayWebhooksUpdateDispatch = DataPayload; +/** + * https://discord.com/developers/docs/topics/gateway#webhooks-update + */ +export interface GatewayWebhooksUpdateDispatchData { + /** + * The id of the guild + */ + guild_id: Snowflake; + /** + * The id of the channel + */ + channel_id: Snowflake; +} +/** + * https://discord.com/developers/docs/topics/gateway#heartbeating + */ +export interface GatewayHeartbeat { + op: GatewayOpcodes.Heartbeat; + d: GatewayHeartbeatData; +} +/** + * https://discord.com/developers/docs/topics/gateway#heartbeating + */ +export declare type GatewayHeartbeatData = number | null; +/** + * https://discord.com/developers/docs/topics/gateway#identify + */ +export interface GatewayIdentify { + op: GatewayOpcodes.Identify; + d: GatewayIdentifyData; +} +/** + * https://discord.com/developers/docs/topics/gateway#identify + */ +export interface GatewayIdentifyData { + /** + * Authentication token + */ + token: string; + /** + * Connection properties + * + * See https://discord.com/developers/docs/topics/gateway#identify-identify-connection-properties + */ + properties: GatewayIdentifyProperties; + /** + * Whether this connection supports compression of packets + * + * @default false + */ + compress?: boolean; + /** + * Value between 50 and 250, total number of members where the gateway will stop sending + * offline members in the guild member list + * + * @default 50 + */ + large_threshold?: number; + /** + * Used for Guild Sharding + * + * See https://discord.com/developers/docs/topics/gateway#sharding + */ + shard?: [shard_id: number, shard_count: number]; + /** + * Presence structure for initial presence information + * + * See https://discord.com/developers/docs/topics/gateway#update-presence + */ + presence?: GatewayPresenceUpdateData; + /** + * The Gateway Intents you wish to receive + * + * See https://discord.com/developers/docs/topics/gateway#gateway-intents + */ + intents: number; +} +/** + * https://discord.com/developers/docs/topics/gateway#identify-identify-connection-properties + */ +export interface GatewayIdentifyProperties { + /** + * Your operating system + */ + $os: string; + /** + * Your library name + */ + $browser: string; + /** + * Your library name + */ + $device: string; +} +/** + * https://discord.com/developers/docs/topics/gateway#resume + */ +export interface GatewayResume { + op: GatewayOpcodes.Resume; + d: GatewayResumeData; +} +/** + * https://discord.com/developers/docs/topics/gateway#resume + */ +export interface GatewayResumeData { + /** + * Session token + */ + token: string; + /** + * Session id + */ + session_id: string; + /** + * Last sequence number received + */ + seq: number; +} +/** + * https://discord.com/developers/docs/topics/gateway#request-guild-members + */ +export interface GatewayRequestGuildMembers { + op: GatewayOpcodes.RequestGuildMembers; + d: GatewayRequestGuildMembersData; +} +/** + * https://discord.com/developers/docs/topics/gateway#request-guild-members + */ +export interface GatewayRequestGuildMembersData { + /** + * ID of the guild to get members for + */ + guild_id: Snowflake; + /** + * String that username starts with, or an empty string to return all members + */ + query?: string; + /** + * Maximum number of members to send matching the `query`; + * a limit of `0` can be used with an empty string `query` to return all members + */ + limit: number; + /** + * Used to specify if we want the presences of the matched members + */ + presences?: boolean; + /** + * Used to specify which users you wish to fetch + */ + user_ids?: Snowflake | Snowflake[]; + /** + * Nonce to identify the Guild Members Chunk response + * + * Nonce can only be up to 32 bytes. If you send an invalid nonce it will be ignored and the reply member_chunk(s) will not have a `nonce` set. + * + * See https://discord.com/developers/docs/topics/gateway#guild-members-chunk + */ + nonce?: string; +} +/** + * https://discord.com/developers/docs/topics/gateway#update-voice-state + */ +export interface GatewayVoiceStateUpdate { + op: GatewayOpcodes.VoiceStateUpdate; + d: GatewayVoiceStateUpdateData; +} +/** + * https://discord.com/developers/docs/topics/gateway#update-voice-state + */ +export interface GatewayVoiceStateUpdateData { + /** + * ID of the guild + */ + guild_id: Snowflake; + /** + * ID of the voice channel client wants to join (`null` if disconnecting) + */ + channel_id: Snowflake | null; + /** + * Is the client muted + */ + self_mute: boolean; + /** + * Is the client deafened + */ + self_deaf: boolean; +} +/** + * https://discord.com/developers/docs/topics/gateway#update-status + */ +export interface GatewayUpdatePresence { + op: GatewayOpcodes.PresenceUpdate; + d: GatewayPresenceUpdateData; +} +/** + * https://discord.com/developers/docs/topics/gateway#update-presence-gateway-presence-update-structure + */ +export interface GatewayPresenceUpdateData { + /** + * Unix time (in milliseconds) of when the client went idle, or `null` if the client is not idle + */ + since: number | null; + /** + * The user's activities + * + * See https://discord.com/developers/docs/topics/gateway#activity-object + */ + activities: GatewayActivityUpdateData[]; + /** + * The user's new status + * + * See https://discord.com/developers/docs/topics/gateway#update-presence-status-types + */ + status: PresenceUpdateStatus; + /** + * Whether or not the client is afk + */ + afk: boolean; +} +/** + * https://discord.com/developers/docs/topics/gateway#activity-object-activity-structure + */ +export declare type GatewayActivityUpdateData = Pick; +interface BasePayload { + /** + * Opcode for the payload + */ + op: GatewayOpcodes; + /** + * Event data + */ + d?: unknown; + /** + * Sequence number, used for resuming sessions and heartbeats + */ + s: number; + /** + * The event name for this payload + */ + t?: string; +} +declare type NonDispatchPayload = Omit; +interface DataPayload extends BasePayload { + op: GatewayOpcodes.Dispatch; + t: Event; + d: D; +} +declare type ReactionData = DataPayload>; +interface MessageReactionRemoveData { + /** + * The id of the channel + */ + channel_id: Snowflake; + /** + * The id of the message + */ + message_id: Snowflake; + /** + * The id of the guild + */ + guild_id?: Snowflake; +} +//# sourceMappingURL=v9.d.ts.map \ No newline at end of file diff --git a/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/v9.d.ts.map b/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/v9.d.ts.map new file mode 100644 index 0000000..bc6289b --- /dev/null +++ b/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/v9.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"v9.d.ts","sourceRoot":"","sources":["v9.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,KAAK,EACX,cAAc,EACd,qBAAqB,EACrB,gCAAgC,EAChC,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,mBAAmB,EACnB,cAAc,EACd,UAAU,EACV,8BAA8B,EAC9B,OAAO,EACP,gBAAgB,EAChB,UAAU,EACV,eAAe,EACf,mBAAmB,EACnB,OAAO,E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IACxB;;;;OAIG;IACH,KAAK,EAAE,QAAQ,CAAC;CAChB,EACD,CAAC,CACD,CACD,CAAC;AAEF,UAAU,yBAAyB;IAClC;;OAEG;IACH,UAAU,EAAE,SAAS,CAAC;IACtB;;OAEG;IACH,UAAU,EAAE,SAAS,CAAC;IACtB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACrB"} \ No newline at end of file diff --git a/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/v9.js b/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/v9.js new file mode 100644 index 0000000..a677a51 --- /dev/null +++ b/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/v9.js @@ -0,0 +1,234 @@ +"use strict"; +/** + * Types extracted from https://discord.com/developers/docs/topics/gateway + */ +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.GatewayDispatchEvents = exports.GatewayIntentBits = exports.GatewayCloseCodes = exports.GatewayOpcodes = exports.GatewayVersion = void 0; +__exportStar(require("./common"), exports); +exports.GatewayVersion = '9'; +/** + * https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-opcodes + */ +var GatewayOpcodes; +(function (GatewayOpcodes) { + /** + * An event was dispatched + */ + GatewayOpcodes[GatewayOpcodes["Dispatch"] = 0] = "Dispatch"; + /** + * A bidirectional opcode to maintain an active gateway connection. + * Fired periodically by the client, or fired by the gateway to request an immediate heartbeat from the client. + */ + GatewayOpcodes[GatewayOpcodes["Heartbeat"] = 1] = "Heartbeat"; + /** + * Starts a new session during the initial handshake + */ + GatewayOpcodes[GatewayOpcodes["Identify"] = 2] = "Identify"; + /** + * Update the client's presence + */ + GatewayOpcodes[GatewayOpcodes["PresenceUpdate"] = 3] = "PresenceUpdate"; + /** + * Used to join/leave or move between voice channels + */ + GatewayOpcodes[GatewayOpcodes["VoiceStateUpdate"] = 4] = "VoiceStateUpdate"; + /** + * Resume a previous session that was disconnected + */ + GatewayOpcodes[GatewayOpcodes["Resume"] = 6] = "Resume"; + /** + * You should attempt to reconnect and resume immediately + */ + GatewayOpcodes[GatewayOpcodes["Reconnect"] = 7] = "Reconnect"; + /** + * Request information about offline guild members in a large guild + */ + GatewayOpcodes[GatewayOpcodes["RequestGuildMembers"] = 8] = "RequestGuildMembers"; + /** + * The session has been invalidated. You should reconnect and identify/resume accordingly + */ + GatewayOpcodes[GatewayOpcodes["InvalidSession"] = 9] = "InvalidSession"; + /** + * Sent immediately after connecting, contains the `heartbeat_interval` to use + */ + GatewayOpcodes[GatewayOpcodes["Hello"] = 10] = "Hello"; + /** + * Sent in response to receiving a heartbeat to acknowledge that it has been received + */ + GatewayOpcodes[GatewayOpcodes["HeartbeatAck"] = 11] = "HeartbeatAck"; +})(GatewayOpcodes = exports.GatewayOpcodes || (exports.GatewayOpcodes = {})); +/** + * https://discord.com/developers/docs/topics/opcodes-and-status-codes#gateway-gateway-close-event-codes + */ +var GatewayCloseCodes; +(function (GatewayCloseCodes) { + /** + * We're not sure what went wrong. Try reconnecting? + */ + GatewayCloseCodes[GatewayCloseCodes["UnknownError"] = 4000] = "UnknownError"; + /** + * You sent an invalid Gateway opcode or an invalid payload for an opcode. Don't do that! + * + * See https://discord.com/developers/docs/topics/gateway#payloads-and-opcodes + */ + GatewayCloseCodes[GatewayCloseCodes["UnknownOpcode"] = 4001] = "UnknownOpcode"; + /** + * You sent an invalid payload to us. Don't do that! + * + * See https://discord.com/developers/docs/topics/gateway#sending-payloads + */ + GatewayCloseCodes[GatewayCloseCodes["DecodeError"] = 4002] = "DecodeError"; + /** + * You sent us a payload prior to identifying + * + * See https://discord.com/developers/docs/topics/gateway#identify + */ + GatewayCloseCodes[GatewayCloseCodes["NotAuthenticated"] = 4003] = "NotAuthenticated"; + /** + * The account token sent with your identify payload is incorrect + * + * See https://discord.com/developers/docs/topics/gateway#identify + */ + GatewayCloseCodes[GatewayCloseCodes["AuthenticationFailed"] = 4004] = "AuthenticationFailed"; + /** + * You sent more than one identify payload. Don't do that! + */ + GatewayCloseCodes[GatewayCloseCodes["AlreadyAuthenticated"] = 4005] = "AlreadyAuthenticated"; + /** + * The sequence sent when resuming the session was invalid. Reconnect and start a new session + * + * See https://discord.com/developers/docs/topics/gateway#resume + */ + GatewayCloseCodes[GatewayCloseCodes["InvalidSeq"] = 4007] = "InvalidSeq"; + /** + * Woah nelly! You're sending payloads to us too quickly. Slow it down! You will be disconnected on receiving this + */ + GatewayCloseCodes[GatewayCloseCodes["RateLimited"] = 4008] = "RateLimited"; + /** + * Your session timed out. Reconnect and start a new one + */ + GatewayCloseCodes[GatewayCloseCodes["SessionTimedOut"] = 4009] = "SessionTimedOut"; + /** + * You sent us an invalid shard when identifying + * + * See https://discord.com/developers/docs/topics/gateway#sharding + */ + GatewayCloseCodes[GatewayCloseCodes["InvalidShard"] = 4010] = "InvalidShard"; + /** + * The session would have handled too many guilds - you are required to shard your connection in order to connect + * + * See https://discord.com/developers/docs/topics/gateway#sharding + */ + GatewayCloseCodes[GatewayCloseCodes["ShardingRequired"] = 4011] = "ShardingRequired"; + /** + * You sent an invalid version for the gateway + */ + GatewayCloseCodes[GatewayCloseCodes["InvalidAPIVersion"] = 4012] = "InvalidAPIVersion"; + /** + * You sent an invalid intent for a Gateway Intent. You may have incorrectly calculated the bitwise value + * + * See https://discord.com/developers/docs/topics/gateway#gateway-intents + */ + GatewayCloseCodes[GatewayCloseCodes["InvalidIntents"] = 4013] = "InvalidIntents"; + /** + * You sent a disallowed intent for a Gateway Intent. You may have tried to specify an intent that you have not + * enabled or are not whitelisted for + * + * See https://discord.com/developers/docs/topics/gateway#gateway-intents + * + * See https://discord.com/developers/docs/topics/gateway#privileged-intents + */ + GatewayCloseCodes[GatewayCloseCodes["DisallowedIntents"] = 4014] = "DisallowedIntents"; +})(GatewayCloseCodes = exports.GatewayCloseCodes || (exports.GatewayCloseCodes = {})); +/** + * https://discord.com/developers/docs/topics/gateway#list-of-intents + */ +var GatewayIntentBits; +(function (GatewayIntentBits) { + GatewayIntentBits[GatewayIntentBits["Guilds"] = 1] = "Guilds"; + GatewayIntentBits[GatewayIntentBits["GuildMembers"] = 2] = "GuildMembers"; + GatewayIntentBits[GatewayIntentBits["GuildBans"] = 4] = "GuildBans"; + GatewayIntentBits[GatewayIntentBits["GuildEmojisAndStickers"] = 8] = "GuildEmojisAndStickers"; + GatewayIntentBits[GatewayIntentBits["GuildIntegrations"] = 16] = "GuildIntegrations"; + GatewayIntentBits[GatewayIntentBits["GuildWebhooks"] = 32] = "GuildWebhooks"; + GatewayIntentBits[GatewayIntentBits["GuildInvites"] = 64] = "GuildInvites"; + GatewayIntentBits[GatewayIntentBits["GuildVoiceStates"] = 128] = "GuildVoiceStates"; + GatewayIntentBits[GatewayIntentBits["GuildPresences"] = 256] = "GuildPresences"; + GatewayIntentBits[GatewayIntentBits["GuildMessages"] = 512] = "GuildMessages"; + GatewayIntentBits[GatewayIntentBits["GuildMessageReactions"] = 1024] = "GuildMessageReactions"; + GatewayIntentBits[GatewayIntentBits["GuildMessageTyping"] = 2048] = "GuildMessageTyping"; + GatewayIntentBits[GatewayIntentBits["DirectMessages"] = 4096] = "DirectMessages"; + GatewayIntentBits[GatewayIntentBits["DirectMessageReactions"] = 8192] = "DirectMessageReactions"; + GatewayIntentBits[GatewayIntentBits["DirectMessageTyping"] = 16384] = "DirectMessageTyping"; +})(GatewayIntentBits = exports.GatewayIntentBits || (exports.GatewayIntentBits = {})); +/** + * https://discord.com/developers/docs/topics/gateway#commands-and-events-gateway-events + */ +var GatewayDispatchEvents; +(function (GatewayDispatchEvents) { + GatewayDispatchEvents["ApplicationCommandCreate"] = "APPLICATION_COMMAND_CREATE"; + GatewayDispatchEvents["ApplicationCommandDelete"] = "APPLICATION_COMMAND_DELETE"; + GatewayDispatchEvents["ApplicationCommandUpdate"] = "APPLICATION_COMMAND_UPDATE"; + GatewayDispatchEvents["ChannelCreate"] = "CHANNEL_CREATE"; + GatewayDispatchEvents["ChannelDelete"] = "CHANNEL_DELETE"; + GatewayDispatchEvents["ChannelPinsUpdate"] = "CHANNEL_PINS_UPDATE"; + GatewayDispatchEvents["ChannelUpdate"] = "CHANNEL_UPDATE"; + GatewayDispatchEvents["GuildBanAdd"] = "GUILD_BAN_ADD"; + GatewayDispatchEvents["GuildBanRemove"] = "GUILD_BAN_REMOVE"; + GatewayDispatchEvents["GuildCreate"] = "GUILD_CREATE"; + GatewayDispatchEvents["GuildDelete"] = "GUILD_DELETE"; + GatewayDispatchEvents["GuildEmojisUpdate"] = "GUILD_EMOJIS_UPDATE"; + GatewayDispatchEvents["GuildIntegrationsUpdate"] = "GUILD_INTEGRATIONS_UPDATE"; + GatewayDispatchEvents["GuildMemberAdd"] = "GUILD_MEMBER_ADD"; + GatewayDispatchEvents["GuildMemberRemove"] = "GUILD_MEMBER_REMOVE"; + GatewayDispatchEvents["GuildMembersChunk"] = "GUILD_MEMBERS_CHUNK"; + GatewayDispatchEvents["GuildMemberUpdate"] = "GUILD_MEMBER_UPDATE"; + GatewayDispatchEvents["GuildRoleCreate"] = "GUILD_ROLE_CREATE"; + GatewayDispatchEvents["GuildRoleDelete"] = "GUILD_ROLE_DELETE"; + GatewayDispatchEvents["GuildRoleUpdate"] = "GUILD_ROLE_UPDATE"; + GatewayDispatchEvents["GuildStickersUpdate"] = "GUILD_STICKERS_UPDATE"; + GatewayDispatchEvents["GuildUpdate"] = "GUILD_UPDATE"; + GatewayDispatchEvents["IntegrationCreate"] = "INTEGRATION_CREATE"; + GatewayDispatchEvents["IntegrationDelete"] = "INTEGRATION_DELETE"; + GatewayDispatchEvents["IntegrationUpdate"] = "INTEGRATION_UPDATE"; + GatewayDispatchEvents["InteractionCreate"] = "INTERACTION_CREATE"; + GatewayDispatchEvents["InviteCreate"] = "INVITE_CREATE"; + GatewayDispatchEvents["InviteDelete"] = "INVITE_DELETE"; + GatewayDispatchEvents["MessageCreate"] = "MESSAGE_CREATE"; + GatewayDispatchEvents["MessageDelete"] = "MESSAGE_DELETE"; + GatewayDispatchEvents["MessageDeleteBulk"] = "MESSAGE_DELETE_BULK"; + GatewayDispatchEvents["MessageReactionAdd"] = "MESSAGE_REACTION_ADD"; + GatewayDispatchEvents["MessageReactionRemove"] = "MESSAGE_REACTION_REMOVE"; + GatewayDispatchEvents["MessageReactionRemoveAll"] = "MESSAGE_REACTION_REMOVE_ALL"; + GatewayDispatchEvents["MessageReactionRemoveEmoji"] = "MESSAGE_REACTION_REMOVE_EMOJI"; + GatewayDispatchEvents["MessageUpdate"] = "MESSAGE_UPDATE"; + GatewayDispatchEvents["PresenceUpdate"] = "PRESENCE_UPDATE"; + GatewayDispatchEvents["StageInstanceCreate"] = "STAGE_INSTANCE_CREATE"; + GatewayDispatchEvents["StageInstanceDelete"] = "STAGE_INSTANCE_DELETE"; + GatewayDispatchEvents["StageInstanceUpdate"] = "STAGE_INSTANCE_UPDATE"; + GatewayDispatchEvents["Ready"] = "READY"; + GatewayDispatchEvents["Resumed"] = "RESUMED"; + GatewayDispatchEvents["ThreadCreate"] = "THREAD_CREATE"; + GatewayDispatchEvents["ThreadDelete"] = "THREAD_DELETE"; + GatewayDispatchEvents["ThreadListSync"] = "THREAD_LIST_SYNC"; + GatewayDispatchEvents["ThreadMembersUpdate"] = "THREAD_MEMBERS_UPDATE"; + GatewayDispatchEvents["ThreadMemberUpdate"] = "THREAD_MEMBER_UPDATE"; + GatewayDispatchEvents["ThreadUpdate"] = "THREAD_UPDATE"; + GatewayDispatchEvents["TypingStart"] = "TYPING_START"; + GatewayDispatchEvents["UserUpdate"] = "USER_UPDATE"; + GatewayDispatchEvents["VoiceServerUpdate"] = "VOICE_SERVER_UPDATE"; + GatewayDispatchEvents["VoiceStateUpdate"] = "VOICE_STATE_UPDATE"; + GatewayDispatchEvents["WebhooksUpdate"] = "WEBHOOKS_UPDATE"; +})(GatewayDispatchEvents = exports.GatewayDispatchEvents || (exports.GatewayDispatchEvents = {})); +// #endregion Shared +//# sourceMappingURL=v9.js.map \ No newline at end of file diff --git a/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/v9.js.map b/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/v9.js.map new file mode 100644 index 0000000..ccc7617 --- /dev/null +++ b/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/v9.js.map @@ -0,0 +1 @@ +{"version":3,"file":"v9.js","sourceRoot":"","sources":["v9.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;AA8BH,2CAAyB;AAEZ,QAAA,cAAc,GAAG,GAAG,CAAC;AAElC;;GAEG;AACH,IAAkB,cA8CjB;AA9CD,WAAkB,cAAc;IAC/B;;OAEG;IACH,2DAAQ,CAAA;IACR;;;OAGG;IACH,6DAAS,CAAA;IACT;;OAEG;IACH,2DAAQ,CAAA;IACR;;OAEG;IACH,uEAAc,CAAA;IACd;;OAEG;IACH,2EAAgB,CAAA;IAChB;;OAEG;IACH,uDAAU,CAAA;IACV;;OAEG;IACH,6DAAS,CAAA;IACT;;OAEG;IACH,iFAAmB,CAAA;IACnB;;OAEG;IACH,uEAAc,CAAA;IACd;;OAEG;IACH,sDAAK,CAAA;IACL;;OAEG;IACH,oEAAY,CAAA;AACb,CAAC,EA9CiB,cAAc,GAAd,sBAAc,KAAd,sBAAc,QA8C/B;AAED;;GAEG;AACH,IAAkB,iBA8EjB;AA9ED,WAAkB,iBAAiB;IAClC;;OAEG;IACH,4EAAmB,CAAA;IACnB;;;;OAIG;IACH,8EAAa,CAAA;IACb;;;;OAIG;IACH,0EAAW,CAAA;IACX;;;;OAIG;IACH,oFAAgB,CAAA;IAChB;;;;OAIG;IACH,4FAAoB,CA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AA;IACrC,8DAAqC,CAAA;IACrC,8DAAqC,CAAA;IACrC,sEAA6C,CAAA;IAC7C,qDAA4B,CAAA;IAC5B,iEAAwC,CAAA;IACxC,iEAAwC,CAAA;IACxC,iEAAwC,CAAA;IACxC,iEAAwC,CAAA;IACxC,uDAA8B,CAAA;IAC9B,uDAA8B,CAAA;IAC9B,yDAAgC,CAAA;IAChC,yDAAgC,CAAA;IAChC,kEAAyC,CAAA;IACzC,oEAA2C,CAAA;IAC3C,0EAAiD,CAAA;IACjD,iFAAwD,CAAA;IACxD,qFAA4D,CAAA;IAC5D,yDAAgC,CAAA;IAChC,2DAAkC,CAAA;IAClC,sEAA6C,CAAA;IAC7C,sEAA6C,CAAA;IAC7C,sEAA6C,CAAA;IAC7C,wCAAe,CAAA;IACf,4CAAmB,CAAA;IACnB,uDAA8B,CAAA;IAC9B,uDAA8B,CAAA;IAC9B,4DAAmC,CAAA;IACnC,sEAA6C,CAAA;IAC7C,oEAA2C,CAAA;IAC3C,uDAA8B,CAAA;IAC9B,qDAA4B,CAAA;IAC5B,mDAA0B,CAAA;IAC1B,kEAAyC,CAAA;IACzC,gEAAuC,CAAA;IACvC,2DAAkC,CAAA;AACnC,CAAC,EAtDiB,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QAsDtC;AA47CD,oBAAoB"} \ No newline at end of file diff --git a/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/v9.mjs b/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/v9.mjs new file mode 100644 index 0000000..27b1baf --- /dev/null +++ b/node_modules/@discordjs/builders/node_modules/discord-api-types/gateway/v9.mjs @@ -0,0 +1,8 @@ +import mod from "./v9.js"; + +export default mod; +export const GatewayCloseCodes = mod.GatewayCloseCodes; +export const GatewayDispatchEvents = mod.GatewayDispatchEvents; +export const GatewayIntentBits = mod.GatewayIntentBits; +export const GatewayOpcodes = mod.GatewayOpcodes; +export const GatewayVersion = mod.GatewayVersion; diff --git a/node_modules/@discordjs/builders/node_modules/discord-api-types/globals.d.ts b/node_modules/@discordjs/builders/node_modules/discord-api-types/globals.d.ts new file mode 100644 index 0000000..d821e73 --- /dev/null +++ b/node_modules/@discordjs/builders/node_modules/discord-api-types/globals.d.ts @@ -0,0 +1,81 @@ +/** + * https://discord.com/developers/docs/reference#snowflakes + */ +export declare type Snowflake = string; +/** + * https://discord.com/developers/docs/topics/permissions + * @internal + */ +export declare type Permissions = string; +/** + * https://discord.com/developers/docs/reference#message-formatting-formats + */ +export declare const FormattingPatterns: { + /** + * Regular expression for matching a user mention, strictly without a nickname + * + * The `id` group property is present on the `exec` result of this expression + */ + readonly User: RegExp; + /** + * Regular expression for matching a user mention, strictly with a nickname + * + * The `id` group property is present on the `exec` result of this expression + */ + readonly UserWithNickname: RegExp; + /** + * Regular expression for matching a user mention, with or without a nickname + * + * The `id` group property is present on the `exec` result of this expression + */ + readonly UserWithOptionalNickname: RegExp; + /** + * Regular expression for matching a channel mention + * + * The `id` group property is present on the `exec` result of this expression + */ + readonly Channel: RegExp; + /** + * Regular expression for matching a role mention + * + * The `id` group property is present on the `exec` result of this expression + */ + readonly Role: RegExp; + /** + * Regular expression for matching a custom emoji, either static or animated + * + * The `animated`, `name` and `id` group properties are present on the `exec` result of this expression + */ + readonly Emoji: RegExp; + /** + * Regular expression for matching strictly an animated custom emoji + * + * The `animated`, `name` and `id` group properties are present on the `exec` result of this expression + */ + readonly AnimatedEmoji: RegExp; + /** + * Regular expression for matching strictly a static custom emoji + * + * The `name` and `id` group properties are present on the `exec` result of this expression + */ + readonly StaticEmoji: RegExp; + /** + * Regular expression for matching a timestamp, either default or custom styled + * + * The `timestamp` and `style` group properties are present on the `exec` result of this expression + */ + readonly Timestamp: RegExp; + /** + * Regular expression for matching strictly default styled timestamps + * + * The `timestamp` group property is present on the `exec` result of this expression + */ + readonly DefaultStyledTimestamp: RegExp; + /** + * Regular expression for matching strictly custom styled timestamps + * + * The `timestamp` and `style` group properties are present on the `exec` result of this expression + */ + readonly StyledTimestamp: RegExp; +}; +//# sourceMappingURL=globals.d.ts.map \ No newline at end of file diff --git a/node_modules/@discordjs/builders/node_modules/discord-api-types/globals.d.ts.map b/node_modules/@discordjs/builders/node_modules/discord-api-types/globals.d.ts.map new file mode 100644 index 0000000..505ffb2 --- /dev/null +++ b/node_modules/@discordjs/builders/node_modules/discord-api-types/globals.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"globals.d.ts","sourceRoot":"","sources":["globals.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,SAAS,GAAG,MAAM,CAAC;AAE/B;;;GAGG;AACH,oBAAY,WAAW,GAAG,MAAM,CAAC;AAEjC;;GAEG;AACH,eAAO,MAAM,kBAAkB;IAC9B;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;CAEM,CAAC"} \ No newline at end of file diff --git a/node_modules/@discordjs/builders/node_modules/discord-api-types/globals.js b/node_modules/@discordjs/builders/node_modules/discord-api-types/globals.js new file mode 100644 index 0000000..3cae1b8 --- /dev/null +++ b/node_modules/@discordjs/builders/node_modules/discord-api-types/globals.js @@ -0,0 +1,80 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.FormattingPatterns = void 0; +/** + * https://discord.com/developers/docs/reference#message-formatting-formats + */ +exports.FormattingPatterns = { + /** + * Regular expression for matching a user mention, strictly without a nickname + * + * The `id` group property is present on the `exec` result of this expression + */ + User: /<@(?\d{17,20})>/, + /** + * Regular expression for matching a user mention, strictly with a nickname + * + * The `id` group property is present on the `exec` result of this expression + */ + UserWithNickname: /<@!(?\d{17,20})>/, + /** + * Regular expression for matching a user mention, with or without a nickname + * + * The `id` group property is present on the `exec` result of this expression + */ + UserWithOptionalNickname: /<@!?(?\d{17,20})>/, + /** + * Regular expression for matching a channel mention + * + * The `id` group property is present on the `exec` result of this expression + */ + Channel: /<#(?\d{17,20})>/, + /** + * Regular expression for matching a role mention + * + * The `id` group property is present on the `exec` result of this expression + */ + Role: /<@&(?\d{17,20})>/, + /** + * Regular expression for matching a custom emoji, either static or animated + * + * The `animated`, `name` and `id` group properties are present on the `exec` result of this expression + */ + Emoji: /<(?a)?:(?\w{2,32}):(?\d{17,20})>/, + /** + * Regular expression for matching strictly an animated custom emoji + * + * The `animated`, `name` and `id` group properties are present on the `exec` result of this expression + */ + AnimatedEmoji: /<(?a):(?\w{2,32}):(?\d{17,20})>/, + /** + * Regular expression for matching strictly a static custom emoji + * + * The `name` and `id` group properties are present on the `exec` result of this expression + */ + StaticEmoji: /<:(?\w{2,32}):(?\d{17,20})>/, + /** + * Regular expression for matching a timestamp, either default or custom styled + * + * The `timestamp` and `style` group properties are present on the `exec` result of this expression + */ + Timestamp: /-?\d{1,13})(:(?