@discordjs/core 0.4.0-dev.1671969841-22e2bbb.0 → 0.4.0-dev.1672661054-be294ea.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +50 -2
- package/dist/index.js +101 -51
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +103 -51
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/api/applicationCommands.ts","../src/api/channel.ts","../src/api/guild.ts","../src/api/interactions.ts","../src/api/invite.ts","../src/api/roleConnections.ts","../src/api/sticker.ts","../src/api/thread.ts","../src/api/user.ts","../src/api/voice.ts","../src/api/webhook.ts","../src/api/index.ts","../src/client.ts","../src/util/files.ts","../src/index.ts"],"sourcesContent":["import { makeURLSearchParams, type REST } from '@discordjs/rest';\nimport {\n\tRoutes,\n\ttype RESTGetAPIApplicationCommandPermissionsResult,\n\ttype RESTGetAPIApplicationCommandResult,\n\ttype RESTGetAPIApplicationCommandsResult,\n\ttype RESTGetAPIGuildApplicationCommandsPermissionsResult,\n\ttype RESTPatchAPIApplicationCommandJSONBody,\n\ttype RESTPatchAPIApplicationCommandResult,\n\ttype RESTPostAPIApplicationCommandsJSONBody,\n\ttype RESTPostAPIApplicationCommandsResult,\n\ttype RESTPutAPIApplicationCommandPermissionsJSONBody,\n\ttype RESTPutAPIApplicationCommandPermissionsResult,\n\ttype RESTPutAPIApplicationCommandsJSONBody,\n\ttype RESTGetAPIApplicationCommandsQuery,\n\ttype RESTPutAPIApplicationCommandsResult,\n\ttype RESTGetAPIApplicationGuildCommandsQuery,\n\ttype Snowflake,\n} from 'discord-api-types/v10';\n\nexport class ApplicationCommandsAPI {\n\tpublic constructor(private readonly rest: REST) {}\n\n\t/**\n\t * Fetches all global commands for a application\n\t *\n\t * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-global-application-commands}\n\t * @param applicationId - The application id to fetch commands for\n\t * @param options - The options to use when fetching commands\n\t */\n\tpublic async getGlobalCommands(applicationId: Snowflake, options: RESTGetAPIApplicationCommandsQuery = {}) {\n\t\treturn this.rest.get(Routes.applicationCommands(applicationId), {\n\t\t\tquery: makeURLSearchParams(options),\n\t\t}) as Promise<RESTGetAPIApplicationCommandsResult>;\n\t}\n\n\t/**\n\t * Creates a new global command\n\t *\n\t * @see {@link https://discord.com/developers/docs/interactions/application-commands#create-global-application-command}\n\t * @param applicationId - The application id to create the command for\n\t * @param data - The data to use when creating the command\n\t */\n\tpublic async createGlobalCommand(applicationId: Snowflake, data: RESTPostAPIApplicationCommandsJSONBody) {\n\t\treturn this.rest.post(Routes.applicationCommands(applicationId), {\n\t\t\tbody: data,\n\t\t}) as Promise<RESTPostAPIApplicationCommandsResult>;\n\t}\n\n\t/**\n\t * Fetches a global command\n\t *\n\t * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-global-application-command}\n\t * @param applicationId - The application id to fetch the command from\n\t * @param commandId - The command id to fetch\n\t */\n\tpublic async getGlobalCommand(applicationId: Snowflake, commandId: Snowflake) {\n\t\treturn this.rest.get(\n\t\t\tRoutes.applicationCommand(applicationId, commandId),\n\t\t) as Promise<RESTGetAPIApplicationCommandResult>;\n\t}\n\n\t/**\n\t * Edits a global command\n\t *\n\t * @see {@link https://discord.com/developers/docs/interactions/application-commands#edit-global-application-command}\n\t * @param applicationId - The application id of the command\n\t * @param commandId - The id of the command to edit\n\t * @param data - The data to use when editing the command\n\t */\n\tpublic async editGlobalCommand(\n\t\tapplicationId: Snowflake,\n\t\tcommandId: Snowflake,\n\t\tdata: RESTPatchAPIApplicationCommandJSONBody,\n\t) {\n\t\treturn this.rest.patch(Routes.applicationCommand(applicationId, commandId), {\n\t\t\tbody: data,\n\t\t}) as Promise<RESTPatchAPIApplicationCommandResult>;\n\t}\n\n\t/**\n\t * Deletes a global command\n\t *\n\t * @see {@link https://discord.com/developers/docs/interactions/application-commands#delete-global-application-command}\n\t * @param applicationId - The application id of the command\n\t * @param commandId - The id of the command to delete\n\t */\n\tpublic async deleteGlobalCommand(applicationId: Snowflake, commandId: Snowflake) {\n\t\tawait this.rest.delete(Routes.applicationCommand(applicationId, commandId));\n\t}\n\n\t/**\n\t * Overwrites global commands\n\t *\n\t * @see {@link https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-global-application-commands}\n\t * @param applicationId - The application id to overwrite commands for\n\t * @param data - The data to use when overwriting commands\n\t */\n\tpublic async bulkOverwriteGlobalCommands(applicationId: Snowflake, data: RESTPutAPIApplicationCommandsJSONBody) {\n\t\treturn this.rest.put(Routes.applicationCommands(applicationId), {\n\t\t\tbody: data,\n\t\t}) as Promise<RESTPutAPIApplicationCommandsResult>;\n\t}\n\n\t/**\n\t * Fetches all commands for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-guild-application-commands}\n\t * @param applicationId - The application id to fetch commands for\n\t * @param guildId - The guild id to fetch commands for\n\t * @param data - The data to use when fetching commands\n\t */\n\tpublic async getGuildCommands(\n\t\tapplicationId: Snowflake,\n\t\tguildId: Snowflake,\n\t\tdata: RESTGetAPIApplicationGuildCommandsQuery = {},\n\t) {\n\t\treturn this.rest.get(Routes.applicationGuildCommands(applicationId, guildId), {\n\t\t\tquery: makeURLSearchParams(data),\n\t\t}) as Promise<RESTGetAPIApplicationCommandsResult>;\n\t}\n\n\t/**\n\t * Creates a new command for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/interactions/application-commands#create-guild-application-command}\n\t * @param applicationId - The application id to create the command for\n\t * @param guildId - The guild id to create the command for\n\t * @param data - The data to use when creating the command\n\t */\n\tpublic async createGuildCommand(\n\t\tapplicationId: Snowflake,\n\t\tguildId: Snowflake,\n\t\tdata: RESTPostAPIApplicationCommandsJSONBody,\n\t) {\n\t\treturn this.rest.post(Routes.applicationGuildCommands(applicationId, guildId), {\n\t\t\tbody: data,\n\t\t}) as Promise<RESTPostAPIApplicationCommandsResult>;\n\t}\n\n\t/**\n\t * Fetches a guild command\n\t *\n\t * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-guild-application-command}\n\t * @param applicationId - The application id to fetch the command from\n\t * @param guildId - The guild id to fetch the command from\n\t * @param commandId - The command id to fetch\n\t */\n\tpublic async getGuildCommand(applicationId: Snowflake, guildId: Snowflake, commandId: Snowflake) {\n\t\treturn this.rest.get(\n\t\t\tRoutes.applicationGuildCommand(applicationId, guildId, commandId),\n\t\t) as Promise<RESTGetAPIApplicationCommandResult>;\n\t}\n\n\t/**\n\t * Edits a guild command\n\t *\n\t * @see {@link https://discord.com/developers/docs/interactions/application-commands#edit-guild-application-command}\n\t * @param applicationId - The application id of the command\n\t * @param guildId - The guild id of the command\n\t * @param commandId - The command id to edit\n\t * @param data - The data to use when editing the command\n\t */\n\tpublic async editGuildCommand(\n\t\tapplicationId: Snowflake,\n\t\tguildId: Snowflake,\n\t\tcommandId: Snowflake,\n\t\tdata: RESTPatchAPIApplicationCommandJSONBody,\n\t) {\n\t\treturn this.rest.patch(Routes.applicationGuildCommand(applicationId, guildId, commandId), {\n\t\t\tbody: data,\n\t\t}) as Promise<RESTPatchAPIApplicationCommandResult>;\n\t}\n\n\t/**\n\t * Deletes a guild command\n\t *\n\t * @see {@link https://discord.com/developers/docs/interactions/application-commands#delete-guild-application-command}\n\t * @param applicationId - The application id of the command\n\t * @param guildId - The guild id of the command\n\t * @param commandId - The id of the command to delete\n\t */\n\tpublic async deleteGuildCommand(applicationId: Snowflake, guildId: Snowflake, commandId: Snowflake) {\n\t\tawait this.rest.delete(Routes.applicationGuildCommand(applicationId, guildId, commandId));\n\t}\n\n\t/**\n\t * Bulk overwrites guild commands\n\t *\n\t * @see {@link https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-guild-application-commands}\n\t * @param applicationId - The application id to overwrite commands for\n\t * @param guildId - The guild id to overwrite commands for\n\t * @param data - The data to use when overwriting commands\n\t */\n\tpublic async bulkOverwriteGuildCommands(\n\t\tapplicationId: Snowflake,\n\t\tguildId: Snowflake,\n\t\tdata: RESTPutAPIApplicationCommandsJSONBody,\n\t) {\n\t\treturn this.rest.put(Routes.applicationGuildCommands(applicationId, guildId), {\n\t\t\tbody: data,\n\t\t}) as Promise<RESTPutAPIApplicationCommandsResult>;\n\t}\n\n\t/**\n\t * Fetches the permissions for a guild command\n\t *\n\t * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-guild-application-command-permissions}\n\t * @param applicationId - The application id to get the permissions for\n\t * @param guildId - The guild id of the command\n\t * @param commandId - The command id to get the permissions for\n\t */\n\tpublic async getGuildCommandPermissions(applicationId: Snowflake, guildId: Snowflake, commandId: Snowflake) {\n\t\treturn this.rest.get(\n\t\t\tRoutes.applicationCommandPermissions(applicationId, guildId, commandId),\n\t\t) as Promise<RESTGetAPIApplicationCommandPermissionsResult>;\n\t}\n\n\t/**\n\t * Fetches all permissions for all commands in a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-application-command-permissions}\n\t * @param applicationId - The application id to get the permissions for\n\t * @param guildId - The guild id to get the permissions for\n\t */\n\tpublic async getGuildCommandsPermissions(applicationId: Snowflake, guildId: Snowflake) {\n\t\treturn this.rest.get(\n\t\t\tRoutes.guildApplicationCommandsPermissions(applicationId, guildId),\n\t\t) as Promise<RESTGetAPIGuildApplicationCommandsPermissionsResult>;\n\t}\n\n\t/**\n\t * Edits the permissions for a guild command\n\t *\n\t * @see {@link https://discord.com/developers/docs/interactions/application-commands#edit-application-command-permissions}\n\t * @param userToken - The token of the user to edit permissions on behalf of\n\t * @param applicationId - The application id to edit the permissions for\n\t * @param guildId - The guild id to edit the permissions for\n\t * @param commandId - The id of the command to edit the permissions for\n\t * @param data - The data to use when editing the permissions\n\t */\n\tpublic async editGuildCommandPermissions(\n\t\tuserToken: string,\n\t\tapplicationId: Snowflake,\n\t\tguildId: Snowflake,\n\t\tcommandId: Snowflake,\n\t\tdata: RESTPutAPIApplicationCommandPermissionsJSONBody,\n\t) {\n\t\treturn this.rest.put(Routes.applicationCommandPermissions(applicationId, guildId, commandId), {\n\t\t\theaders: { Authorization: `Bearer ${userToken.replace('Bearer ', '')}` },\n\t\t\tauth: false,\n\t\t\tbody: data,\n\t\t}) as Promise<RESTPutAPIApplicationCommandPermissionsResult>;\n\t}\n}\n","import { makeURLSearchParams, type RawFile, type REST } from '@discordjs/rest';\nimport {\n\tRoutes,\n\ttype RESTDeleteAPIChannelResult,\n\ttype RESTGetAPIChannelInvitesResult,\n\ttype RESTGetAPIChannelMessageReactionUsersQuery,\n\ttype RESTGetAPIChannelMessageReactionUsersResult,\n\ttype RESTGetAPIChannelMessageResult,\n\ttype RESTGetAPIChannelMessagesQuery,\n\ttype RESTGetAPIChannelMessagesResult,\n\ttype RESTGetAPIChannelPinsResult,\n\ttype RESTGetAPIChannelResult,\n\ttype RESTGetAPIChannelThreadsArchivedQuery,\n\ttype RESTGetAPIChannelUsersThreadsArchivedResult,\n\ttype RESTPatchAPIChannelJSONBody,\n\ttype RESTPatchAPIChannelMessageResult,\n\ttype RESTPatchAPIChannelResult,\n\ttype RESTPostAPIChannelFollowersResult,\n\ttype RESTPostAPIChannelInviteJSONBody,\n\ttype RESTPostAPIChannelInviteResult,\n\ttype RESTPostAPIChannelMessageCrosspostResult,\n\ttype RESTPostAPIChannelMessageJSONBody,\n\ttype RESTPostAPIChannelMessageResult,\n\ttype Snowflake,\n} from 'discord-api-types/v10';\n\nexport class ChannelsAPI {\n\tpublic constructor(private readonly rest: REST) {}\n\n\t/**\n\t * Sends a message in a channel\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/channel#create-message}\n\t * @param channelId - The id of the channel to send the message in\n\t * @param data - The data to use when sending the message\n\t */\n\tpublic async createMessage(\n\t\tchannelId: Snowflake,\n\t\t{ files, ...body }: RESTPostAPIChannelMessageJSONBody & { files?: RawFile[] },\n\t) {\n\t\treturn this.rest.post(Routes.channelMessages(channelId), {\n\t\t\tfiles,\n\t\t\tbody,\n\t\t}) as Promise<RESTPostAPIChannelMessageResult>;\n\t}\n\n\t/**\n\t * Edits a message\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/channel#edit-message}\n\t * @param channelId - The id of the channel the message is in\n\t * @param messageId - The id of the message to edit\n\t * @param data - The data to use when editing the message\n\t */\n\tpublic async editMessage(\n\t\tchannelId: Snowflake,\n\t\tmessageId: Snowflake,\n\t\t{ files, ...body }: RESTPostAPIChannelMessageJSONBody & { files?: RawFile[] },\n\t) {\n\t\treturn this.rest.patch(Routes.channelMessage(channelId, messageId), {\n\t\t\tfiles,\n\t\t\tbody,\n\t\t}) as Promise<RESTPatchAPIChannelMessageResult>;\n\t}\n\n\t/**\n\t * Fetches the reactions for a message\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/channel#get-reactions}\n\t * @param channelId - The id of the channel the message is in\n\t * @param messageId - The id of the message to get the reactions for\n\t * @param emoji - The emoji to get the reactions for\n\t * @param options - The options to use when fetching the reactions\n\t */\n\tpublic async getMessageReactions(\n\t\tchannelId: Snowflake,\n\t\tmessageId: Snowflake,\n\t\temoji: string,\n\t\toptions: RESTGetAPIChannelMessageReactionUsersQuery = {},\n\t) {\n\t\treturn this.rest.get(Routes.channelMessageReaction(channelId, messageId, encodeURIComponent(emoji)), {\n\t\t\tquery: makeURLSearchParams(options),\n\t\t}) as Promise<RESTGetAPIChannelMessageReactionUsersResult>;\n\t}\n\n\t/**\n\t * Deletes a reaction for the current user\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/channel#delete-own-reaction}\n\t * @param channelId - The id of the channel the message is in\n\t * @param messageId - The id of the message to delete the reaction for\n\t * @param emoji - The emoji to delete the reaction for\n\t */\n\tpublic async deleteOwnMessageReaction(channelId: Snowflake, messageId: Snowflake, emoji: string) {\n\t\tawait this.rest.delete(Routes.channelMessageOwnReaction(channelId, messageId, encodeURIComponent(emoji)));\n\t}\n\n\t/**\n\t * Deletes a reaction for a user\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/channel#delete-user-reaction}\n\t * @param channelId - The id of the channel the message is in\n\t * @param messageId - The id of the message to delete the reaction for\n\t * @param emoji - The emoji to delete the reaction for\n\t * @param userId - The id of the user to delete the reaction for\n\t */\n\tpublic async deleteUserMessageReaction(channelId: Snowflake, messageId: Snowflake, emoji: string, userId: Snowflake) {\n\t\tawait this.rest.delete(Routes.channelMessageUserReaction(channelId, messageId, encodeURIComponent(emoji), userId));\n\t}\n\n\t/**\n\t * Deletes all reactions for a message\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/channel#delete-all-reactions}\n\t * @param channelId - The id of the channel the message is in\n\t * @param messageId - The id of the message to delete the reactions for\n\t */\n\tpublic async deleteAllMessageReactions(channelId: Snowflake, messageId: Snowflake) {\n\t\tawait this.rest.delete(Routes.channelMessageAllReactions(channelId, messageId));\n\t}\n\n\t/**\n\t * Deletes all reactions of an emoji for a message\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/channel#delete-all-reactions-for-emoji}\n\t * @param channelId - The id of the channel the message is in\n\t * @param messageId - The id of the message to delete the reactions for\n\t * @param emoji - The emoji to delete the reactions for\n\t */\n\tpublic async deleteAllMessageReactionsForEmoji(channelId: Snowflake, messageId: Snowflake, emoji: string) {\n\t\tawait this.rest.delete(Routes.channelMessageReaction(channelId, messageId, encodeURIComponent(emoji)));\n\t}\n\n\t/**\n\t * Adds a reaction to a message\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/channel#create-reaction}\n\t * @param channelId - The id of the channel the message is in\n\t * @param messageId - The id of the message to add the reaction to\n\t * @param emoji - The emoji to add the reaction with\n\t */\n\tpublic async addMessageReaction(channelId: Snowflake, messageId: Snowflake, emoji: string) {\n\t\tawait this.rest.put(Routes.channelMessageOwnReaction(channelId, messageId, encodeURIComponent(emoji)));\n\t}\n\n\t/**\n\t * Fetches a channel\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/channel#get-channel}\n\t * @param channelId - The id of the channel\n\t */\n\tpublic async get(channelId: Snowflake) {\n\t\treturn this.rest.get(Routes.channel(channelId)) as Promise<RESTGetAPIChannelResult>;\n\t}\n\n\t/**\n\t * Edits a channel\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/channel#modify-channel}\n\t * @param channelId - The id of the channel to edit\n\t * @param data - The new channel data\n\t */\n\tpublic async edit(channelId: Snowflake, data: RESTPatchAPIChannelJSONBody) {\n\t\treturn this.rest.patch(Routes.channel(channelId), { body: data }) as Promise<RESTPatchAPIChannelResult>;\n\t}\n\n\t/**\n\t * Deletes a channel\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/channel#deleteclose-channel}\n\t * @param channelId - The id of the channel to delete\n\t */\n\tpublic async delete(channelId: Snowflake) {\n\t\treturn this.rest.delete(Routes.channel(channelId)) as Promise<RESTDeleteAPIChannelResult>;\n\t}\n\n\t/**\n\t * Fetches the messages of a channel\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/channel#get-channel-messages}\n\t * @param channelId - The id of the channel to fetch messages from\n\t * @param options - The options to use when fetching messages\n\t */\n\tpublic async getMessages(channelId: Snowflake, options: RESTGetAPIChannelMessagesQuery = {}) {\n\t\treturn this.rest.get(Routes.channelMessages(channelId), {\n\t\t\tquery: makeURLSearchParams(options),\n\t\t}) as Promise<RESTGetAPIChannelMessagesResult>;\n\t}\n\n\t/**\n\t * Shows a typing indicator in a channel\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/channel#trigger-typing-indicator}\n\t * @param channelId - The id of the channel to show the typing indicator in\n\t */\n\tpublic async showTyping(channelId: Snowflake) {\n\t\tawait this.rest.post(Routes.channelTyping(channelId));\n\t}\n\n\t/**\n\t * Fetches the pinned messages of a channel\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/channel#get-pinned-messages}\n\t * @param channelId - The id of the channel to fetch pinned messages from\n\t */\n\tpublic async getPins(channelId: Snowflake) {\n\t\treturn this.rest.get(Routes.channelPins(channelId)) as Promise<RESTGetAPIChannelPinsResult>;\n\t}\n\n\t/**\n\t * Pins a message in a channel\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/channel#pin-message}\n\t * @param channelId - The id of the channel to pin the message in\n\t * @param messageId - The id of the message to pin\n\t * @param reason - The reason for pinning the message\n\t */\n\tpublic async pinMessage(channelId: Snowflake, messageId: Snowflake, reason?: string) {\n\t\tawait this.rest.put(Routes.channelPin(channelId, messageId), { reason });\n\t}\n\n\t/**\n\t * Deletes a message\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/channel#delete-message}\n\t * @param channelId - The id of the channel the message is in\n\t * @param messageId - The id of the message to delete\n\t * @param reason - The reason for deleting the message\n\t */\n\tpublic async deleteMessage(channelId: Snowflake, messageId: Snowflake, reason?: string) {\n\t\tawait this.rest.delete(Routes.channelMessage(channelId, messageId), { reason });\n\t}\n\n\t/**\n\t * Bulk deletes messages\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/channel#bulk-delete-messages}\n\t * @param channelId - The id of the channel the messages are in\n\t * @param messageIds - The ids of the messages to delete\n\t */\n\tpublic async bulkDeleteMessages(channelId: Snowflake, messageIds: Snowflake[], reason?: string): Promise<void> {\n\t\tawait this.rest.post(Routes.channelBulkDelete(channelId), { reason, body: { messages: messageIds } });\n\t}\n\n\t/**\n\t * Fetches a message\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/channel#get-channel-message}\n\t * @param channelId - The id of the channel the message is in\n\t * @param messageId - The id of the message to fetch\n\t */\n\tpublic async getMessage(channelId: Snowflake, messageId: Snowflake) {\n\t\treturn this.rest.get(Routes.channelMessage(channelId, messageId)) as Promise<RESTGetAPIChannelMessageResult>;\n\t}\n\n\t/**\n\t * Crossposts a message\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/channel#crosspost-message}\n\t * @param channelId - The id of the channel the message is in\n\t * @param messageId - The id of the message to crosspost\n\t */\n\tpublic async crosspostMessage(channelId: Snowflake, messageId: Snowflake) {\n\t\treturn this.rest.post(\n\t\t\tRoutes.channelMessageCrosspost(channelId, messageId),\n\t\t) as Promise<RESTPostAPIChannelMessageCrosspostResult>;\n\t}\n\n\t/**\n\t * Unpins a message in a channel\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/channel#unpin-message}\n\t * @param channelId - The id of the channel to unpin the message in\n\t * @param messageId - The id of the message to unpin\n\t * @param reason - The reason for unpinning the message\n\t */\n\tpublic async unpinMessage(channelId: Snowflake, messageId: Snowflake, reason?: string) {\n\t\tawait this.rest.delete(Routes.channelPin(channelId, messageId), { reason });\n\t}\n\n\t/**\n\t * Follows an announcement channel\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/channel#follow-announcement-channel}\n\t * @param channelId - The id of the announcement channel to follow\n\t * @param webhookChannelId - The id of the webhook channel to follow the announcements in\n\t */\n\tpublic async followAnnouncements(channelId: Snowflake, webhookChannelId: Snowflake) {\n\t\treturn this.rest.post(Routes.channelFollowers(channelId), {\n\t\t\tbody: { webhook_channel_id: webhookChannelId },\n\t\t}) as Promise<RESTPostAPIChannelFollowersResult>;\n\t}\n\n\t/**\n\t * Creates a new invite for a channel\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/channel#create-channel-invite}\n\t * @param channelId - The id of the channel to create an invite for\n\t * @param data - The data to use when creating the invite\n\t */\n\tpublic async createInvite(channelId: Snowflake, data: RESTPostAPIChannelInviteJSONBody, reason?: string) {\n\t\treturn this.rest.post(Routes.channelInvites(channelId), {\n\t\t\treason,\n\t\t\tbody: data,\n\t\t}) as Promise<RESTPostAPIChannelInviteResult>;\n\t}\n\n\t/**\n\t * Fetches the invites of a channel\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/channel#get-channel-invites}\n\t * @param channelId - The id of the channel to fetch invites from\n\t */\n\tpublic async getInvites(channelId: Snowflake) {\n\t\treturn this.rest.get(Routes.channelInvites(channelId)) as Promise<RESTGetAPIChannelInvitesResult>;\n\t}\n\n\t/**\n\t * Fetches the archived threads of a channel\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/channel#list-public-archived-threads}\n\t * @see {@link https://discord.com/developers/docs/resources/channel#list-private-archived-threads}\n\t * @param channelId - The id of the channel to fetch archived threads from\n\t * @param archivedStatus - The archived status of the threads to fetch\n\t * @param options - The options to use when fetching archived threads\n\t */\n\tpublic async getArchivedThreads(\n\t\tchannelId: Snowflake,\n\t\tarchivedStatus: 'private' | 'public',\n\t\toptions: RESTGetAPIChannelThreadsArchivedQuery = {},\n\t) {\n\t\treturn this.rest.get(Routes.channelThreads(channelId, archivedStatus), {\n\t\t\tquery: makeURLSearchParams(options),\n\t\t}) as Promise<RESTGetAPIChannelUsersThreadsArchivedResult>;\n\t}\n\n\t/**\n\t * Fetches the private joined archived threads of a channel\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/channel#list-joined-private-archived-threads}\n\t * @param channelId - The id of the channel to fetch joined archived threads from\n\t * @param options - The options to use when fetching joined archived threads\n\t */\n\tpublic async getJoinedPrivateArchivedThreads(\n\t\tchannelId: Snowflake,\n\t\toptions: RESTGetAPIChannelThreadsArchivedQuery = {},\n\t) {\n\t\treturn this.rest.get(Routes.channelJoinedArchivedThreads(channelId), {\n\t\t\tquery: makeURLSearchParams(options),\n\t\t}) as Promise<RESTGetAPIChannelUsersThreadsArchivedResult>;\n\t}\n}\n","import type { RawFile } from '@discordjs/rest';\nimport { makeURLSearchParams, type REST } from '@discordjs/rest';\nimport {\n\tRoutes,\n\ttype GuildMFALevel,\n\ttype GuildWidgetStyle,\n\ttype RESTGetAPIAuditLogQuery,\n\ttype RESTGetAPIAuditLogResult,\n\ttype RESTGetAPIAutoModerationRuleResult,\n\ttype RESTGetAPIAutoModerationRulesResult,\n\ttype RESTGetAPIGuildBansResult,\n\ttype RESTGetAPIGuildChannelsResult,\n\ttype RESTGetAPIGuildEmojiResult,\n\ttype RESTGetAPIGuildEmojisResult,\n\ttype RESTGetAPIGuildIntegrationsResult,\n\ttype RESTGetAPIGuildInvitesResult,\n\ttype RESTGetAPIGuildMemberResult,\n\ttype RESTGetAPIGuildMembersQuery,\n\ttype RESTGetAPIGuildMembersSearchResult,\n\ttype RESTGetAPIGuildPreviewResult,\n\ttype RESTGetAPIGuildPruneCountResult,\n\ttype RESTGetAPIGuildResult,\n\ttype RESTGetAPIGuildRolesResult,\n\ttype RESTGetAPIGuildScheduledEventQuery,\n\ttype RESTGetAPIGuildScheduledEventResult,\n\ttype RESTGetAPIGuildScheduledEventsQuery,\n\ttype RESTGetAPIGuildScheduledEventsResult,\n\ttype RESTGetAPIGuildScheduledEventUsersQuery,\n\ttype RESTGetAPIGuildScheduledEventUsersResult,\n\ttype RESTGetAPIGuildStickerResult,\n\ttype RESTGetAPIGuildStickersResult,\n\ttype RESTGetAPIGuildTemplatesResult,\n\ttype RESTGetAPIGuildThreadsResult,\n\ttype RESTGetAPIGuildVanityUrlResult,\n\ttype RESTGetAPIGuildVoiceRegionsResult,\n\ttype RESTGetAPIGuildPruneCountQuery,\n\ttype RESTPostAPIGuildStickerFormDataBody,\n\ttype RESTPostAPIGuildStickerResult,\n\ttype RESTGetAPIGuildMembersSearchQuery,\n\ttype RESTGetAPIGuildWelcomeScreenResult,\n\ttype RESTGetAPIGuildWidgetImageResult,\n\ttype RESTGetAPIGuildWidgetJSONResult,\n\ttype RESTGetAPITemplateResult,\n\ttype RESTPatchAPIAutoModerationRuleJSONBody,\n\ttype RESTPatchAPIGuildChannelPositionsJSONBody,\n\ttype RESTPatchAPIGuildEmojiJSONBody,\n\ttype RESTPatchAPIGuildEmojiResult,\n\ttype RESTPatchAPIGuildJSONBody,\n\ttype RESTPatchAPIGuildMemberJSONBody,\n\ttype RESTPatchAPIGuildMemberResult,\n\ttype RESTPatchAPIGuildResult,\n\ttype RESTPatchAPIGuildRoleJSONBody,\n\ttype RESTPatchAPIGuildRolePositionsJSONBody,\n\ttype RESTPatchAPIGuildRolePositionsResult,\n\ttype RESTPatchAPIGuildRoleResult,\n\ttype RESTPatchAPIGuildScheduledEventJSONBody,\n\ttype RESTPatchAPIGuildScheduledEventResult,\n\ttype RESTPatchAPIGuildStickerJSONBody,\n\ttype RESTPatchAPIGuildStickerResult,\n\ttype RESTPatchAPIGuildTemplateJSONBody,\n\ttype RESTPatchAPIGuildTemplateResult,\n\ttype RESTPatchAPIGuildVoiceStateUserJSONBody,\n\ttype RESTPatchAPIGuildWelcomeScreenJSONBody,\n\ttype RESTPatchAPIGuildWelcomeScreenResult,\n\ttype RESTPatchAPIGuildWidgetSettingsJSONBody,\n\ttype RESTPatchAPIGuildWidgetSettingsResult,\n\ttype RESTPostAPIAutoModerationRuleJSONBody,\n\ttype RESTPostAPIAutoModerationRuleResult,\n\ttype RESTPostAPIGuildChannelJSONBody,\n\ttype RESTPostAPIGuildChannelResult,\n\ttype RESTPostAPIGuildEmojiJSONBody,\n\ttype RESTPostAPIGuildEmojiResult,\n\ttype RESTPostAPIGuildPruneJSONBody,\n\ttype RESTPostAPIGuildRoleJSONBody,\n\ttype RESTPostAPIGuildRoleResult,\n\ttype RESTPostAPIGuildScheduledEventJSONBody,\n\ttype RESTPostAPIGuildScheduledEventResult,\n\ttype RESTPostAPIGuildsJSONBody,\n\ttype RESTPostAPIGuildsMFAResult,\n\ttype RESTPostAPIGuildsResult,\n\ttype RESTPostAPIGuildTemplatesResult,\n\ttype RESTPostAPITemplateCreateGuildJSONBody,\n\ttype RESTPutAPIGuildBanJSONBody,\n\ttype RESTPutAPIGuildTemplateSyncResult,\n\ttype Snowflake,\n} from 'discord-api-types/v10';\n\nexport class GuildsAPI {\n\tpublic constructor(private readonly rest: REST) {}\n\n\t/**\n\t * Fetches a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#get-guild}\n\t * @param guildId - The id of the guild\n\t */\n\tpublic async get(guildId: string) {\n\t\treturn this.rest.get(Routes.guild(guildId)) as Promise<RESTGetAPIGuildResult>;\n\t}\n\n\t/**\n\t * Fetches a guild preview\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-preview}\n\t * @param guildId - The id of the guild to fetch the preview from\n\t */\n\tpublic async getPreview(guildId: Snowflake) {\n\t\treturn this.rest.get(Routes.guildPreview(guildId)) as Promise<RESTGetAPIGuildPreviewResult>;\n\t}\n\n\t/**\n\t * Creates a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#create-guild}\n\t * @param data - The guild to create\n\t */\n\tpublic async create(data: RESTPostAPIGuildsJSONBody) {\n\t\treturn this.rest.post(Routes.guilds(), { body: data }) as Promise<RESTPostAPIGuildsResult>;\n\t}\n\n\t/**\n\t * Edits a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild}\n\t * @param guildId - The id of the guild to edit\n\t * @param data - The new guild data\n\t * @param reason - The reason for editing this guild\n\t */\n\tpublic async edit(guildId: Snowflake, data: RESTPatchAPIGuildJSONBody, reason?: string) {\n\t\treturn this.rest.patch(Routes.guild(guildId), { reason, body: data }) as Promise<RESTPatchAPIGuildResult>;\n\t}\n\n\t/**\n\t * Deletes a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#delete-guild}\n\t * @param guildId - The id of the guild to delete\n\t * @param reason - The reason for deleting this guild\n\t */\n\tpublic async delete(guildId: Snowflake, reason?: string) {\n\t\tawait this.rest.delete(Routes.guild(guildId), { reason });\n\t}\n\n\t/**\n\t * Fetches all the members of a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#list-guild-members}\n\t * @param guildId - The id of the guild\n\t * @param options - The options to use when fetching the guild members\n\t */\n\tpublic async getMembers(guildId: Snowflake, options: RESTGetAPIGuildMembersQuery = {}) {\n\t\treturn this.rest.get(Routes.guildMembers(guildId), {\n\t\t\tquery: makeURLSearchParams(options),\n\t\t}) as Promise<RESTGetAPIGuildMemberResult>;\n\t}\n\n\t/**\n\t * Fetches a guild's channels\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-channels}\n\t * @param guildId - The id of the guild to fetch the channels from\n\t */\n\tpublic async getChannels(guildId: Snowflake) {\n\t\treturn this.rest.get(Routes.guildChannels(guildId)) as Promise<RESTGetAPIGuildChannelsResult>;\n\t}\n\n\t/**\n\t * Creates a guild channel\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#create-guild-channel}\n\t * @param guildId - The id of the guild to create the channel in\n\t * @param data - The data to create the new channel\n\t * @param reason - The reason for creating this channel\n\t */\n\tpublic async createChannel(guildId: Snowflake, data: RESTPostAPIGuildChannelJSONBody, reason?: string) {\n\t\treturn this.rest.post(Routes.guildChannels(guildId), {\n\t\t\treason,\n\t\t\tbody: data,\n\t\t}) as Promise<RESTPostAPIGuildChannelResult>;\n\t}\n\n\t/**\n\t * Edits a guild channel's positions\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-channel-positions}\n\t * @param guildId - The id of the guild to edit the channel positions from\n\t * @param data - The data to edit the channel positions with\n\t * @param reason - The reason for editing the channel positions\n\t */\n\tpublic async setChannelPositions(\n\t\tguildId: Snowflake,\n\t\tdata: RESTPatchAPIGuildChannelPositionsJSONBody,\n\t\treason?: string,\n\t) {\n\t\tawait this.rest.patch(Routes.guildChannels(guildId), { reason, body: data });\n\t}\n\n\t/**\n\t * Fetches the active threads in a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#list-active-guild-threads}\n\t * @param guildId - The id of the guild to fetch the active threads from\n\t */\n\tpublic async getActiveThreads(guildId: Snowflake) {\n\t\treturn this.rest.get(Routes.guildActiveThreads(guildId)) as Promise<RESTGetAPIGuildThreadsResult>;\n\t}\n\n\t/**\n\t * Fetches a guild member ban\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-bans}\n\t * @param guildId - The id of the guild to fetch the ban from\n\t */\n\tpublic async getMemberBans(guildId: Snowflake) {\n\t\treturn this.rest.get(Routes.guildBans(guildId)) as Promise<RESTGetAPIGuildBansResult>;\n\t}\n\n\t/**\n\t * Bans a user from a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#create-guild-ban}\n\t * @param guildId - The id of the guild to ban the member in\n\t * @param userId - The id of the user to ban\n\t * @param options - Options for banning the user\n\t * @param reason - The reason for banning the user\n\t */\n\tpublic async banUser(\n\t\tguildId: Snowflake,\n\t\tuserId: Snowflake,\n\t\toptions: RESTPutAPIGuildBanJSONBody = {},\n\t\treason?: string,\n\t) {\n\t\tawait this.rest.put(Routes.guildBan(guildId, userId), { reason, body: options });\n\t}\n\n\t/**\n\t * Unbans a user from a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#remove-guild-ban}\n\t * @param guildId - The id of the guild to unban the member in\n\t * @param userId - The id of the user to unban\n\t * @param reason - The reason for unbanning the user\n\t */\n\tpublic async unbanUser(guildId: Snowflake, userId: Snowflake, reason?: string) {\n\t\tawait this.rest.delete(Routes.guildBan(guildId, userId), { reason });\n\t}\n\n\t/**\n\t * Gets all the roles in a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-roles}\n\t * @param guildId - The id of the guild to fetch the roles from\n\t */\n\tpublic async getRoles(guildId: Snowflake) {\n\t\treturn this.rest.get(Routes.guildRoles(guildId)) as Promise<RESTGetAPIGuildRolesResult>;\n\t}\n\n\t/**\n\t * Creates a guild role\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#create-guild-role}\n\t * @param guildId - The id of the guild to create the role in\n\t * @param data - The data to create the role with\n\t * @param reason - The reason for creating the role\n\t */\n\tpublic async createRole(guildId: Snowflake, data: RESTPostAPIGuildRoleJSONBody, reason?: string) {\n\t\treturn this.rest.post(Routes.guildRoles(guildId), { reason, body: data }) as Promise<RESTPostAPIGuildRoleResult>;\n\t}\n\n\t/**\n\t * Sets role positions in a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-role-positions}\n\t * @param guildId - The id of the guild to set role positions for\n\t * @param data - The data for setting a role position\n\t * @param reason - The reason for setting the role position\n\t */\n\tpublic async setRolePositions(guildId: Snowflake, data: RESTPatchAPIGuildRolePositionsJSONBody, reason?: string) {\n\t\treturn this.rest.patch(Routes.guildRoles(guildId), {\n\t\t\treason,\n\t\t\tbody: data,\n\t\t}) as Promise<RESTPatchAPIGuildRolePositionsResult>;\n\t}\n\n\t/**\n\t * Edits a guild role\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-role}\n\t * @param guildId - The id of the guild to edit the role in\n\t * @param roleId - The id of the role to edit\n\t * @param data - data for editing the role\n\t * @param reason - The reason for editing the role\n\t */\n\tpublic async editRole(guildId: Snowflake, roleId: Snowflake, data: RESTPatchAPIGuildRoleJSONBody, reason?: string) {\n\t\treturn this.rest.patch(Routes.guildRole(guildId, roleId), {\n\t\t\treason,\n\t\t\tbody: data,\n\t\t}) as Promise<RESTPatchAPIGuildRoleResult>;\n\t}\n\n\t/**\n\t * Deletes a guild role\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#delete-guild-role}\n\t * @param guildId - The id of the guild to delete the role in\n\t * @param roleId - The id of the role to delete\n\t * @param reason - The reason for deleting the role\n\t */\n\tpublic async deleteRole(guildId: Snowflake, roleId: Snowflake, reason?: string) {\n\t\tawait this.rest.delete(Routes.guildRole(guildId, roleId), { reason });\n\t}\n\n\t/**\n\t * Edits the multi-factor-authentication (MFA) level of a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-mfa-level}\n\t * @param guildId - The id of the guild to edit the MFA level for\n\t * @param level - The new MFA level\n\t * @param reason - The reason for editing the MFA level\n\t */\n\tpublic async editMFALevel(guildId: Snowflake, level: GuildMFALevel, reason?: string) {\n\t\treturn this.rest.post(Routes.guildMFA(guildId), {\n\t\t\treason,\n\t\t\tbody: { mfa_level: level },\n\t\t}) as Promise<RESTPostAPIGuildsMFAResult>;\n\t}\n\n\t/**\n\t * Fetch the number of members that can be pruned from a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-prune-count}\n\t * @param guildId - The id of the guild to fetch the number of pruned members from\n\t * @param options - The options for fetching the number of pruned members\n\t */\n\tpublic async getPruneCount(guildId: Snowflake, options: RESTGetAPIGuildPruneCountQuery = {}) {\n\t\treturn this.rest.get(Routes.guildPrune(guildId), {\n\t\t\tquery: makeURLSearchParams(options),\n\t\t}) as Promise<RESTGetAPIGuildPruneCountResult>;\n\t}\n\n\t/**\n\t * Prunes members in a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#begin-guild-prune}\n\t * @param guildId - The id of the guild to prune members in\n\t * @param options - The options for pruning members\n\t * @param reason - The reason for pruning members\n\t */\n\tpublic async beginPrune(guildId: Snowflake, options: RESTPostAPIGuildPruneJSONBody = {}, reason?: string) {\n\t\treturn this.rest.post(Routes.guildPrune(guildId), {\n\t\t\tbody: options,\n\t\t\treason,\n\t\t}) as Promise<RESTGetAPIGuildPruneCountResult>;\n\t}\n\n\t/**\n\t * Fetches voice regions for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-voice-regions}\n\t * @param guildId - The id of the guild to fetch the voice regions from\n\t */\n\tpublic async getVoiceRegions(guildId: Snowflake) {\n\t\treturn this.rest.get(Routes.guildVoiceRegions(guildId)) as Promise<RESTGetAPIGuildVoiceRegionsResult>;\n\t}\n\n\t/**\n\t * Fetches the invites for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-invites}\n\t * @param guildId - The id of the guild to fetch the invites from\n\t */\n\tpublic async getInvites(guildId: Snowflake) {\n\t\treturn this.rest.get(Routes.guildInvites(guildId)) as Promise<RESTGetAPIGuildInvitesResult>;\n\t}\n\n\t/**\n\t * Fetches the integrations for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-integrations}\n\t * @param guildId - The id of the guild to fetch the integrations from\n\t */\n\tpublic async getIntegrations(guildId: Snowflake) {\n\t\treturn this.rest.get(Routes.guildIntegrations(guildId)) as Promise<RESTGetAPIGuildIntegrationsResult>;\n\t}\n\n\t/**\n\t * Deletes an integration from a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#delete-guild-integration}\n\t * @param guildId - The id of the guild to delete the integration from\n\t * @param integrationId - The id of the integration to delete\n\t * @param reason - The reason for deleting the integration\n\t */\n\tpublic async deleteIntegration(guildId: Snowflake, integrationId: Snowflake, reason?: string) {\n\t\tawait this.rest.delete(Routes.guildIntegration(guildId, integrationId), { reason });\n\t}\n\n\t/**\n\t * Fetches the widget settings for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-widget-settings}\n\t * @param guildId - The id of the guild to fetch the widget settings from\n\t */\n\tpublic async getWidgetSettings(guildId: Snowflake) {\n\t\treturn this.rest.get(Routes.guildWidgetSettings(guildId)) as Promise<RESTGetAPIGuildWidgetImageResult>;\n\t}\n\n\t/**\n\t * Edits the widget settings for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-widget}\n\t * @param guildId - The id of the guild to edit the widget settings from\n\t * @param data - The new widget settings data\n\t * @param reason - The reason for editing the widget settings\n\t */\n\tpublic async editWidgetSettings(guildId: Snowflake, data: RESTPatchAPIGuildWidgetSettingsJSONBody, reason?: string) {\n\t\treturn this.rest.patch(Routes.guildWidgetSettings(guildId), {\n\t\t\treason,\n\t\t\tbody: data,\n\t\t}) as Promise<RESTPatchAPIGuildWidgetSettingsResult>;\n\t}\n\n\t/**\n\t * Fetches the widget for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-widget}\n\t * @param guildId - The id of the guild to fetch the widget from\n\t */\n\tpublic async getWidget(guildId: Snowflake) {\n\t\treturn this.rest.get(Routes.guildWidgetJSON(guildId)) as Promise<RESTGetAPIGuildWidgetJSONResult>;\n\t}\n\n\t/**\n\t * Fetches the vanity url for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-vanity-url}\n\t * @param guildId - The id of the guild to fetch the vanity url from\n\t */\n\tpublic async getVanityURL(guildId: Snowflake) {\n\t\treturn this.rest.get(Routes.guildVanityUrl(guildId)) as Promise<RESTGetAPIGuildVanityUrlResult>;\n\t}\n\n\t/**\n\t * Fetches the widget image for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-widget-image}\n\t * @param guildId - The id of the guild to fetch the widget image from\n\t * @param style - The style of the widget image\n\t */\n\tpublic async getWidgetImage(guildId: Snowflake, style?: GuildWidgetStyle) {\n\t\treturn this.rest.get(Routes.guildWidgetImage(guildId), {\n\t\t\tquery: makeURLSearchParams({ style }),\n\t\t}) as Promise<RESTGetAPIGuildWidgetImageResult>;\n\t}\n\n\t/**\n\t * Fetches the welcome screen for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-welcome-screen}\n\t * @param guildId - The id of the guild to fetch the welcome screen from\n\t */\n\tpublic async getWelcomeScreen(guildId: Snowflake) {\n\t\treturn this.rest.get(Routes.guildWelcomeScreen(guildId)) as Promise<RESTGetAPIGuildWelcomeScreenResult>;\n\t}\n\n\t/**\n\t * Edits the welcome screen for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-welcome-screen}\n\t * @param guildId - The id of the guild to edit the welcome screen for\n\t * @param data - The new welcome screen data\n\t * @param reason - The reason for editing the welcome screen\n\t */\n\tpublic async editWelcomeScreen(guildId: Snowflake, data?: RESTPatchAPIGuildWelcomeScreenJSONBody, reason?: string) {\n\t\treturn this.rest.patch(Routes.guildWelcomeScreen(guildId), {\n\t\t\treason,\n\t\t\tbody: data,\n\t\t}) as Promise<RESTPatchAPIGuildWelcomeScreenResult>;\n\t}\n\n\t/**\n\t * Edits a user's voice state in a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#modify-user-voice-state}\n\t * @param guildId - The id of the guild to edit the current user's voice state in\n\t * @param userId - The id of the user to edit the voice state for\n\t * @param data - The data for editing the voice state\n\t * @param reason - The reason for editing the voice state\n\t */\n\tpublic async editUserVoiceState(\n\t\tguildId: Snowflake,\n\t\tuserId: Snowflake,\n\t\tdata: RESTPatchAPIGuildVoiceStateUserJSONBody,\n\t\treason?: string,\n\t) {\n\t\tawait this.rest.patch(Routes.guildVoiceState(guildId, userId), { reason, body: data });\n\t}\n\n\t/**\n\t * Fetches all emojis for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/emoji#list-guild-emojis}\n\t * @param guildId - The id of the guild to fetch the emojis from\n\t */\n\tpublic async getEmojis(guildId: Snowflake) {\n\t\treturn this.rest.get(Routes.guildEmojis(guildId)) as Promise<RESTGetAPIGuildEmojisResult>;\n\t}\n\n\t/**\n\t * Fetches an emoji for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/emoji#get-guild-emoji}\n\t * @param guildId - The id of the guild to fetch the emoji from\n\t * @param emojiId - The id of the emoji to fetch\n\t */\n\tpublic async getEmoji(guildId: Snowflake, emojiId: Snowflake) {\n\t\treturn this.rest.get(Routes.guildEmoji(guildId, emojiId)) as Promise<RESTGetAPIGuildEmojiResult>;\n\t}\n\n\t/**\n\t * Creates a new emoji for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/emoji#create-guild-emoji}\n\t * @param guildId - The id of the guild to create the emoji from\n\t * @param data - The data for creating the emoji\n\t * @param reason - The reason for creating the emoji\n\t */\n\tpublic async createEmoji(guildId: Snowflake, data: RESTPostAPIGuildEmojiJSONBody, reason?: string) {\n\t\treturn this.rest.post(Routes.guildEmojis(guildId), {\n\t\t\treason,\n\t\t\tbody: data,\n\t\t}) as Promise<RESTPostAPIGuildEmojiResult>;\n\t}\n\n\t/**\n\t * Edits an emoji for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/emoji#modify-guild-emoji}\n\t * @param guildId - The id of the guild to edit the emoji from\n\t * @param emojiId - The id of the emoji to edit\n\t * @param data - The data for editing the emoji\n\t * @param reason - The reason for editing the emoji\n\t */\n\tpublic async editEmoji(\n\t\tguildId: Snowflake,\n\t\temojiId: Snowflake,\n\t\tdata: RESTPatchAPIGuildEmojiJSONBody,\n\t\treason?: string,\n\t) {\n\t\treturn this.rest.patch(Routes.guildEmoji(guildId, emojiId), {\n\t\t\treason,\n\t\t\tbody: data,\n\t\t}) as Promise<RESTPatchAPIGuildEmojiResult>;\n\t}\n\n\t/**\n\t * Deletes an emoji for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/emoji#delete-guild-emoji}\n\t * @param guildId - The id of the guild to delete the emoji from\n\t * @param emojiId - The id of the emoji to delete\n\t * @param reason - The reason for deleting the emoji\n\t */\n\tpublic async deleteEmoji(guildId: Snowflake, emojiId: Snowflake, reason?: string) {\n\t\tawait this.rest.delete(Routes.guildEmoji(guildId, emojiId), { reason });\n\t}\n\n\t/**\n\t * Fetches all scheduled events for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#list-scheduled-events-for-guild}\n\t * @param guildId - The id of the guild to fetch the scheduled events from\n\t * @param options - The options for fetching the scheduled events\n\t */\n\tpublic async getScheduledEvents(guildId: Snowflake, options: RESTGetAPIGuildScheduledEventsQuery = {}) {\n\t\treturn this.rest.get(Routes.guildScheduledEvents(guildId), {\n\t\t\tquery: makeURLSearchParams(options),\n\t\t}) as Promise<RESTGetAPIGuildScheduledEventsResult>;\n\t}\n\n\t/**\n\t * Creates a new scheduled event for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#create-guild-scheduled-event}\n\t * @param guildId - The id of the guild to create the scheduled event from\n\t * @param data - The data to create the event with\n\t * @param reason - The reason for creating the scheduled event\n\t */\n\tpublic async createScheduledEvent(guildId: Snowflake, data: RESTPostAPIGuildScheduledEventJSONBody, reason?: string) {\n\t\treturn this.rest.post(Routes.guildScheduledEvents(guildId), {\n\t\t\treason,\n\t\t\tbody: data,\n\t\t}) as Promise<RESTPostAPIGuildScheduledEventResult>;\n\t}\n\n\t/**\n\t * Fetches a scheduled event for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#get-guild-scheduled-event}\n\t * @param guildId - The id of the guild to fetch the scheduled event from\n\t * @param eventId - The id of the scheduled event to fetch\n\t * @param options - The options for fetching the scheduled event\n\t */\n\tpublic async getScheduledEvent(\n\t\tguildId: Snowflake,\n\t\teventId: Snowflake,\n\t\toptions: RESTGetAPIGuildScheduledEventQuery = {},\n\t) {\n\t\treturn this.rest.get(Routes.guildScheduledEvent(guildId, eventId), {\n\t\t\tquery: makeURLSearchParams(options),\n\t\t}) as Promise<RESTGetAPIGuildScheduledEventResult>;\n\t}\n\n\t/**\n\t * Edits a scheduled event for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#modify-guild-scheduled-event}\n\t * @param guildId - The id of the guild to edit the scheduled event from\n\t * @param eventId - The id of the scheduled event to edit\n\t * @param data - The new event data\n\t * @param reason - The reason for editing the scheduled event\n\t */\n\tpublic async editScheduledEvent(\n\t\tguildId: Snowflake,\n\t\teventId: Snowflake,\n\t\tdata: RESTPatchAPIGuildScheduledEventJSONBody,\n\t\treason?: string,\n\t) {\n\t\treturn this.rest.patch(Routes.guildScheduledEvent(guildId, eventId), {\n\t\t\treason,\n\t\t\tbody: data,\n\t\t}) as Promise<RESTPatchAPIGuildScheduledEventResult>;\n\t}\n\n\t/**\n\t * Deletes a scheduled event for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#delete-guild-scheduled-event}\n\t * @param guildId - The id of the guild to delete the scheduled event from\n\t * @param eventId - The id of the scheduled event to delete\n\t * @param reason - The reason for deleting the scheduled event\n\t */\n\tpublic async deleteScheduledEvent(guildId: Snowflake, eventId: Snowflake, reason?: string) {\n\t\tawait this.rest.delete(Routes.guildScheduledEvent(guildId, eventId), { reason });\n\t}\n\n\t/**\n\t * Gets all users that are interested in a scheduled event\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#get-guild-scheduled-event-users}\n\t * @param guildId - The id of the guild to fetch the scheduled event users from\n\t * @param eventId - The id of the scheduled event to fetch the users for\n\t * @param options - The options for fetching the scheduled event users\n\t */\n\tpublic async getScheduledEventUsers(\n\t\tguildId: Snowflake,\n\t\teventId: Snowflake,\n\t\toptions: RESTGetAPIGuildScheduledEventUsersQuery = {},\n\t) {\n\t\treturn this.rest.get(Routes.guildScheduledEventUsers(guildId, eventId), {\n\t\t\tquery: makeURLSearchParams(options),\n\t\t}) as Promise<RESTGetAPIGuildScheduledEventUsersResult>;\n\t}\n\n\t/**\n\t * Fetches all the templates for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild-template#get-guild-templates}\n\t * @param guildId - The id of the guild to fetch the templates from\n\t */\n\tpublic async getTemplates(guildId: Snowflake) {\n\t\treturn this.rest.get(Routes.guildTemplates(guildId)) as Promise<RESTGetAPIGuildTemplatesResult>;\n\t}\n\n\t/**\n\t * Syncs a template for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild-template#sync-guild-template}\n\t * @param guildId - The id of the guild to sync the template from\n\t * @param templateCode - The code of the template to sync\n\t */\n\tpublic async syncTemplate(guildId: Snowflake, templateCode: string) {\n\t\treturn this.rest.put(Routes.guildTemplate(guildId, templateCode)) as Promise<RESTPutAPIGuildTemplateSyncResult>;\n\t}\n\n\t/**\n\t * Edits a template for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild-template#modify-guild-template}\n\t * @param guildId - The id of the guild to edit the template from\n\t * @param templateCode - The code of the template to edit\n\t * @param data - The data for editing the template\n\t */\n\tpublic async editTemplate(guildId: Snowflake, templateCode: string, data: RESTPatchAPIGuildTemplateJSONBody) {\n\t\treturn this.rest.patch(Routes.guildTemplate(guildId, templateCode), {\n\t\t\tbody: data,\n\t\t}) as Promise<RESTPatchAPIGuildTemplateResult>;\n\t}\n\n\t/**\n\t * Deletes a template for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild-template#delete-guild-template}\n\t * @param guildId - The id of the guild to delete the template from\n\t * @param templateCode - The code of the template to delete\n\t */\n\tpublic async deleteTemplate(guildId: Snowflake, templateCode: string) {\n\t\tawait this.rest.delete(Routes.guildTemplate(guildId, templateCode));\n\t}\n\n\t/**\n\t * Fetches all the stickers for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/sticker#list-guild-stickers}\n\t * @param guildId - The id of the guild to fetch the stickers from\n\t */\n\tpublic async getStickers(guildId: Snowflake) {\n\t\treturn this.rest.get(Routes.guildStickers(guildId)) as Promise<RESTGetAPIGuildStickersResult>;\n\t}\n\n\t/**\n\t * Fetches a sticker for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/sticker#get-guild-sticker}\n\t * @param guildId - The id of the guild to fetch the sticker from\n\t * @param stickerId - The id of the sticker to fetch\n\t */\n\tpublic async getSticker(guildId: Snowflake, stickerId: Snowflake) {\n\t\treturn this.rest.get(Routes.guildSticker(guildId, stickerId)) as Promise<RESTGetAPIGuildStickerResult>;\n\t}\n\n\t/**\n\t * Creates a sticker for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/sticker#create-guild-sticker}\n\t * @param guildId - The id of the guild to create the sticker for\n\t * @param data - The data for creating the sticker\n\t * @param reason - The reason for creating the sticker\n\t */\n\tpublic async createSticker(\n\t\tguildId: Snowflake,\n\t\t{ file, ...body }: Omit<RESTPostAPIGuildStickerFormDataBody, 'file'> & { file: RawFile },\n\t\treason?: string,\n\t) {\n\t\tconst fileData = { ...file, key: 'file' };\n\n\t\treturn this.rest.post(Routes.guildStickers(guildId), {\n\t\t\tappendToFormData: true,\n\t\t\tbody,\n\t\t\tfiles: [fileData],\n\t\t\treason,\n\t\t}) as Promise<RESTPostAPIGuildStickerResult>;\n\t}\n\n\t/**\n\t * Edits a sticker for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/sticker#modify-guild-sticker}\n\t * @param guildId - The id of the guild to edit the sticker from\n\t * @param stickerId - The id of the sticker to edit\n\t * @param data - The data for editing the sticker\n\t * @param reason - The reason for editing the sticker\n\t */\n\tpublic async editSticker(\n\t\tguildId: Snowflake,\n\t\tstickerId: Snowflake,\n\t\tdata: RESTPatchAPIGuildStickerJSONBody,\n\t\treason?: string,\n\t) {\n\t\treturn this.rest.patch(Routes.guildSticker(guildId, stickerId), {\n\t\t\treason,\n\t\t\tbody: data,\n\t\t}) as Promise<RESTPatchAPIGuildStickerResult>;\n\t}\n\n\t/**\n\t * Deletes a sticker for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/sticker#delete-guild-sticker}\n\t * @param guildId - The id of the guild to delete the sticker from\n\t * @param stickerId - The id of the sticker to delete\n\t * @param reason - The reason for deleting the sticker\n\t */\n\tpublic async deleteSticker(guildId: Snowflake, stickerId: Snowflake, reason?: string) {\n\t\tawait this.rest.delete(Routes.guildSticker(guildId, stickerId), { reason });\n\t}\n\n\t/**\n\t * Fetches the audit logs for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/audit-log#get-guild-audit-log}\n\t * @param guildId - The id of the guild to fetch the audit logs from\n\t * @param options - The options for fetching the audit logs\n\t */\n\tpublic async getAuditLogs(guildId: Snowflake, options: RESTGetAPIAuditLogQuery = {}) {\n\t\treturn this.rest.get(Routes.guildAuditLog(guildId), {\n\t\t\tquery: makeURLSearchParams(options),\n\t\t}) as Promise<RESTGetAPIAuditLogResult>;\n\t}\n\n\t/**\n\t * Fetches all auto moderation rules for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/auto-moderation#list-auto-moderation-rules-for-guild}\n\t * @param guildId - The id of the guild to fetch the auto moderation rules from\n\t */\n\tpublic async getAutoModerationRules(guildId: Snowflake) {\n\t\treturn this.rest.get(Routes.guildAutoModerationRules(guildId)) as Promise<RESTGetAPIAutoModerationRulesResult>;\n\t}\n\n\t/**\n\t * Fetches an auto moderation rule for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/auto-moderation#get-auto-moderation-rule}\n\t * @param guildId - The id of the guild to fetch the auto moderation rule from\n\t * @param ruleId - The id of the auto moderation rule to fetch\n\t */\n\tpublic async getAutoModerationRule(guildId: Snowflake, ruleId: Snowflake) {\n\t\treturn this.rest.get(\n\t\t\tRoutes.guildAutoModerationRule(guildId, ruleId),\n\t\t) as Promise<RESTGetAPIAutoModerationRuleResult>;\n\t}\n\n\t/**\n\t * Creates a new auto moderation rule for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/auto-moderation#create-auto-moderation-rule}\n\t * @param guildId - The id of the guild to create the auto moderation rule from\n\t * @param data - The data for creating the auto moderation rule\n\t */\n\tpublic async createAutoModerationRule(\n\t\tguildId: Snowflake,\n\t\tdata: RESTPostAPIAutoModerationRuleJSONBody,\n\t\treason?: string,\n\t) {\n\t\treturn this.rest.post(Routes.guildAutoModerationRules(guildId), {\n\t\t\treason,\n\t\t\tbody: data,\n\t\t}) as Promise<RESTPostAPIAutoModerationRuleResult>;\n\t}\n\n\t/**\n\t * Edits an auto moderation rule for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/auto-moderation#modify-auto-moderation-rule}\n\t * @param guildId - The id of the guild to edit the auto moderation rule from\n\t * @param ruleId - The id of the auto moderation rule to edit\n\t * @param data - The data for editing the auto moderation rule\n\t * @param reason - The reason for editing the auto moderation rule\n\t */\n\tpublic async editAutoModerationRule(\n\t\tguildId: Snowflake,\n\t\truleId: Snowflake,\n\t\tdata: RESTPatchAPIAutoModerationRuleJSONBody,\n\t\treason?: string,\n\t) {\n\t\treturn this.rest.patch(Routes.guildAutoModerationRule(guildId, ruleId), {\n\t\t\treason,\n\t\t\tbody: data,\n\t\t}) as Promise<RESTPatchAPIAutoModerationRuleJSONBody>;\n\t}\n\n\t/**\n\t * Deletes an auto moderation rule for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/auto-moderation#delete-auto-moderation-rule}\n\t * @param guildId - The id of the guild to delete the auto moderation rule from\n\t * @param ruleId - The id of the auto moderation rule to delete\n\t * @param reason - The reason for deleting the auto moderation rule\n\t */\n\tpublic async deleteAutoModerationRule(guildId: Snowflake, ruleId: Snowflake, reason?: string) {\n\t\tawait this.rest.delete(Routes.guildAutoModerationRule(guildId, ruleId), { reason });\n\t}\n\n\t/**\n\t * Fetches a guild member\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-member}\n\t * @param guildId - The id of the guild\n\t * @param userId - The id of the user\n\t */\n\tpublic async getMember(guildId: Snowflake, userId: Snowflake) {\n\t\treturn this.rest.get(Routes.guildMember(guildId, userId)) as Promise<RESTGetAPIGuildMemberResult>;\n\t}\n\n\t/**\n\t * Searches for guild members\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#search-guild-members}\n\t * @param guildId - The id of the guild to search in\n\t * @param query - The query to search for\n\t * @param limit - The maximum number of members to return\n\t */\n\tpublic async searchForMembers(guildId: Snowflake, options: RESTGetAPIGuildMembersSearchQuery) {\n\t\treturn this.rest.get(Routes.guildMembersSearch(guildId), {\n\t\t\tquery: makeURLSearchParams(options),\n\t\t}) as Promise<RESTGetAPIGuildMembersSearchResult>;\n\t}\n\n\t/**\n\t * Edits a guild member\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-member}\n\t * @param guildId - The id of the guild\n\t * @param userId - The id of the user\n\t * @param data - The data to use when editing the guild member\n\t * @param reason - The reason for editing this guild member\n\t */\n\tpublic async editMember(\n\t\tguildId: Snowflake,\n\t\tuserId: Snowflake,\n\t\tdata: RESTPatchAPIGuildMemberJSONBody = {},\n\t\treason?: string,\n\t) {\n\t\treturn this.rest.patch(Routes.guildMember(guildId, userId), {\n\t\t\treason,\n\t\t\tbody: data,\n\t\t}) as Promise<RESTPatchAPIGuildMemberResult>;\n\t}\n\n\t/**\n\t * Adds a role to a guild member\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#add-guild-member-role}\n\t * @param guildId - The id of the guild\n\t * @param userId - The id of the user\n\t * @param roleId - The id of the role\n\t * @param reason - The reason for adding this role to the guild member\n\t */\n\tpublic async addRoleToMember(guildId: Snowflake, userId: Snowflake, roleId: Snowflake, reason?: string) {\n\t\tawait this.rest.put(Routes.guildMemberRole(guildId, userId, roleId), { reason });\n\t}\n\n\t/**\n\t * Removes a role from a guild member\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#remove-guild-member-role}\n\t * @param guildId - The id of the guild\n\t * @param userId - The id of the user\n\t * @param roleId - The id of the role\n\t * @param reason - The reason for removing this role from the guild member\n\t */\n\tpublic async removeRoleFromMember(guildId: Snowflake, userId: Snowflake, roleId: Snowflake, reason?: string) {\n\t\tawait this.rest.delete(Routes.guildMemberRole(guildId, userId, roleId), { reason });\n\t}\n\n\t/**\n\t * Fetches a guild template\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild-template#get-guild-template}\n\t * @param templateCode - The code of the template\n\t */\n\tpublic async getTemplate(templateCode: string) {\n\t\treturn this.rest.get(Routes.template(templateCode)) as Promise<RESTGetAPITemplateResult>;\n\t}\n\n\t/**\n\t * Creates a new template\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild-template#create-guild-template}\n\t * @param templateCode - The code of the template\n\t * @param data - The data to use when creating the template\n\t */\n\tpublic async createTemplate(templateCode: string, data: RESTPostAPITemplateCreateGuildJSONBody) {\n\t\treturn this.rest.post(Routes.template(templateCode), { body: data }) as Promise<RESTPostAPIGuildTemplatesResult>;\n\t}\n}\n","import type { RawFile, REST } from '@discordjs/rest';\nimport type { Snowflake } from 'discord-api-types/v10';\nimport {\n\tInteractionResponseType,\n\tRoutes,\n\ttype APICommandAutocompleteInteractionResponseCallbackData,\n\ttype APIInteractionResponseCallbackData,\n\ttype APIModalInteractionResponseCallbackData,\n\ttype RESTGetAPIWebhookWithTokenMessageResult,\n} from 'discord-api-types/v10';\nimport type { WebhooksAPI } from './webhook.js';\n\nexport class InteractionsAPI {\n\tpublic constructor(private readonly rest: REST, private readonly webhooks: WebhooksAPI) {}\n\n\t/**\n\t * Replies to an interaction\n\t *\n\t * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}\n\t * @param interactionId - The id of the interaction\n\t * @param interactionToken - The token of the interaction\n\t * @param data - The data to use when replying\n\t */\n\tpublic async reply(\n\t\tinteractionId: Snowflake,\n\t\tinteractionToken: string,\n\t\t{ files, ...data }: APIInteractionResponseCallbackData & { files?: RawFile[] },\n\t) {\n\t\tawait this.rest.post(Routes.interactionCallback(interactionId, interactionToken), {\n\t\t\tfiles,\n\t\t\tbody: {\n\t\t\t\ttype: InteractionResponseType.ChannelMessageWithSource,\n\t\t\t\tdata,\n\t\t\t},\n\t\t});\n\t}\n\n\t/**\n\t * Defers the reply to an interaction\n\t *\n\t * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}\n\t * @param interactionId - The id of the interaction\n\t * @param interactionToken - The token of the interaction\n\t */\n\tpublic async defer(interactionId: Snowflake, interactionToken: string) {\n\t\tawait this.rest.post(Routes.interactionCallback(interactionId, interactionToken), {\n\t\t\tbody: {\n\t\t\t\ttype: InteractionResponseType.DeferredChannelMessageWithSource,\n\t\t\t},\n\t\t});\n\t}\n\n\t/**\n\t * Defers an update from a message component interaction\n\t *\n\t * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}\n\t * @param interactionId - The id of the interaction\n\t * @param interactionToken - The token of the interaction\n\t */\n\tpublic async deferMessageUpdate(interactionId: Snowflake, interactionToken: string) {\n\t\tawait this.rest.post(Routes.interactionCallback(interactionId, interactionToken), {\n\t\t\tbody: {\n\t\t\t\ttype: InteractionResponseType.DeferredMessageUpdate,\n\t\t\t},\n\t\t});\n\t}\n\n\t/**\n\t * Reply to a deferred interaction\n\t *\n\t * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-followup-message}\n\t * @param applicationId - The application id of the interaction\n\t * @param interactionToken - The token of the interaction\n\t * @param data - The data to use when replying\n\t */\n\tpublic async followUp(\n\t\tapplicationId: Snowflake,\n\t\tinteractionToken: string,\n\t\tdata: APIInteractionResponseCallbackData & { files?: RawFile[] },\n\t) {\n\t\tawait this.webhooks.execute(applicationId, interactionToken, data);\n\t}\n\n\t/**\n\t * Edits the initial reply to an interaction\n\t *\n\t * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#edit-original-interaction-response}\n\t * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#edit-followup-message}\n\t * @param applicationId - The application id of the interaction\n\t * @param interactionToken - The token of the interaction\n\t * @param data - The data to use when editing the reply\n\t * @param messageId - The id of the message to edit. If omitted, the original reply will be edited\n\t */\n\tpublic async editReply(\n\t\tapplicationId: Snowflake,\n\t\tinteractionToken: string,\n\t\tdata: APIInteractionResponseCallbackData & { files?: RawFile[] },\n\t\tmessageId?: Snowflake | '@original',\n\t) {\n\t\treturn this.webhooks.editMessage(applicationId, interactionToken, messageId ?? '@original', data);\n\t}\n\n\t/**\n\t * Fetches the initial reply to an interaction\n\t *\n\t * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#get-original-interaction-response}\n\t * @param applicationId - The application id of the interaction\n\t * @param interactionToken - The token of the interaction\n\t */\n\tpublic async getOriginalReply(applicationId: Snowflake, interactionToken: string) {\n\t\treturn this.webhooks.getMessage(\n\t\t\tapplicationId,\n\t\t\tinteractionToken,\n\t\t\t'@original',\n\t\t) as Promise<RESTGetAPIWebhookWithTokenMessageResult>;\n\t}\n\n\t/**\n\t * Deletes the initial reply to an interaction\n\t *\n\t * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#delete-original-interaction-response}\n\t * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#delete-followup-message}\n\t * @param applicationId - The application id of the interaction\n\t * @param interactionToken - The token of the interaction\n\t * @param messageId - The id of the message to delete. If omitted, the original reply will be deleted\n\t */\n\tpublic async deleteReply(applicationId: Snowflake, interactionToken: string, messageId?: Snowflake | '@original') {\n\t\tawait this.webhooks.deleteMessage(applicationId, interactionToken, messageId ?? '@original');\n\t}\n\n\t/**\n\t * Updates the the message the component interaction was triggered on\n\t *\n\t * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}\n\t * @param interactionId - The id of the interaction\n\t * @param interactionToken - The token of the interaction\n\t * @param data - The data to use when updating the interaction\n\t */\n\tpublic async updateMessage(\n\t\tinteractionId: Snowflake,\n\t\tinteractionToken: string,\n\t\t{ files, ...data }: APIInteractionResponseCallbackData & { files?: RawFile[] },\n\t) {\n\t\tawait this.rest.post(Routes.interactionCallback(interactionId, interactionToken), {\n\t\t\tfiles,\n\t\t\tbody: {\n\t\t\t\ttype: InteractionResponseType.UpdateMessage,\n\t\t\t\tdata,\n\t\t\t},\n\t\t});\n\t}\n\n\t/**\n\t * Sends an autocomplete response to an interaction\n\t *\n\t * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}\n\t * @param interactionId - The id of the interaction\n\t * @param interactionToken - The token of the interaction\n\t * @param data - Data for the autocomplete response\n\t */\n\tpublic async createAutocompleteResponse(\n\t\tinteractionId: Snowflake,\n\t\tinteractionToken: string,\n\t\tdata: APICommandAutocompleteInteractionResponseCallbackData,\n\t) {\n\t\tawait this.rest.post(Routes.interactionCallback(interactionId, interactionToken), {\n\t\t\tbody: {\n\t\t\t\ttype: InteractionResponseType.ApplicationCommandAutocompleteResult,\n\t\t\t\tdata,\n\t\t\t},\n\t\t});\n\t}\n\n\t/**\n\t * Sends a modal response to an interaction\n\t *\n\t * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}\n\t * @param interactionId - The id of the interaction\n\t * @param interactionToken - The token of the interaction\n\t * @param data - The modal to send\n\t */\n\tpublic async createModal(\n\t\tinteractionId: Snowflake,\n\t\tinteractionToken: string,\n\t\tdata: APIModalInteractionResponseCallbackData,\n\t) {\n\t\tawait this.rest.post(Routes.interactionCallback(interactionId, interactionToken), {\n\t\t\tbody: {\n\t\t\t\ttype: InteractionResponseType.Modal,\n\t\t\t\tdata,\n\t\t\t},\n\t\t});\n\t}\n}\n","import { makeURLSearchParams, type REST } from '@discordjs/rest';\nimport { Routes, type RESTGetAPIInviteQuery, type RESTGetAPIInviteResult } from 'discord-api-types/v10';\n\nexport class InvitesAPI {\n\tpublic constructor(private readonly rest: REST) {}\n\n\t/**\n\t * Fetches an invite\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/invite#get-invite}\n\t * @param code - The invite code\n\t */\n\tpublic async get(code: string, options: RESTGetAPIInviteQuery = {}) {\n\t\treturn this.rest.get(Routes.invite(code), {\n\t\t\tquery: makeURLSearchParams(options),\n\t\t}) as Promise<RESTGetAPIInviteResult>;\n\t}\n\n\t/**\n\t * Deletes an invite\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/invite#delete-invite}\n\t * @param code - The invite code\n\t * @param reason - The reason for deleting the invite\n\t */\n\tpublic async delete(code: string, reason?: string) {\n\t\tawait this.rest.delete(Routes.invite(code), { reason });\n\t}\n}\n","import type { REST } from '@discordjs/rest';\nimport {\n\tRoutes,\n\ttype RESTGetAPIApplicationRoleConnectionMetadataResult,\n\ttype RESTPutAPIApplicationRoleConnectionMetadataResult,\n\ttype RESTPutAPIApplicationCommandPermissionsJSONBody,\n\ttype Snowflake,\n} from 'discord-api-types/v10';\n\nexport class RoleConnectionsAPI {\n\tpublic constructor(private readonly rest: REST) {}\n\n\t/**\n\t * Gets the role connection metadata records for the application\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/application-role-connection-metadata#get-application-role-connection-metadata-records}\n\t * @param applicationId - The id of the application to get role connection metadata records for\n\t */\n\tpublic async getMetadataRecords(applicationId: Snowflake) {\n\t\treturn this.rest.get(\n\t\t\tRoutes.applicationRoleConnectionMetadata(applicationId),\n\t\t) as Promise<RESTGetAPIApplicationRoleConnectionMetadataResult>;\n\t}\n\n\t/**\n\t * Updates the role connection metadata records for the application\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/application-role-connection-metadata#update-application-role-connection-metadata-records}\n\t * @param applicationId - The id of the application to update role connection metadata records for\n\t * @param options - The new role connection metadata records\n\t */\n\tpublic async updateMetadataRecords(\n\t\tapplicationId: Snowflake,\n\t\toptions: RESTPutAPIApplicationCommandPermissionsJSONBody,\n\t) {\n\t\treturn this.rest.put(Routes.applicationRoleConnectionMetadata(applicationId), {\n\t\t\tbody: options,\n\t\t}) as Promise<RESTPutAPIApplicationRoleConnectionMetadataResult>;\n\t}\n}\n","import type { REST } from '@discordjs/rest';\nimport {\n\tRoutes,\n\ttype RESTGetAPIStickerResult,\n\ttype RESTGetNitroStickerPacksResult,\n\ttype Snowflake,\n} from 'discord-api-types/v10';\n\nexport class StickersAPI {\n\tpublic constructor(private readonly rest: REST) {}\n\n\t/**\n\t * Fetches all of the nitro sticker packs\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/sticker#list-nitro-sticker-packs}\n\t */\n\tpublic async getNitroStickers() {\n\t\treturn this.rest.get(Routes.nitroStickerPacks()) as Promise<RESTGetNitroStickerPacksResult>;\n\t}\n\n\t/**\n\t * Fetches a sticker\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/sticker#get-sticker}\n\t * @param stickerId - The id of the sticker\n\t */\n\tpublic async get(stickerId: Snowflake) {\n\t\treturn this.rest.get(Routes.sticker(stickerId)) as Promise<RESTGetAPIStickerResult>;\n\t}\n}\n","import type { RawFile, REST } from '@discordjs/rest';\nimport {\n\tRoutes,\n\ttype APIThreadChannel,\n\ttype APIThreadMember,\n\ttype RESTGetAPIChannelThreadMembersResult,\n\ttype RESTPostAPIChannelThreadsJSONBody,\n\ttype RESTPostAPIChannelThreadsResult,\n\ttype RESTPostAPIGuildForumThreadsJSONBody,\n\ttype Snowflake,\n} from 'discord-api-types/v10';\n\nexport interface StartThreadOptions extends RESTPostAPIChannelThreadsJSONBody {\n\tmessage_id?: string;\n}\n\nexport interface StartForumThreadOptions extends RESTPostAPIGuildForumThreadsJSONBody {\n\tmessage: RESTPostAPIGuildForumThreadsJSONBody['message'] & { files?: RawFile[] };\n}\n\nexport class ThreadsAPI {\n\tpublic constructor(private readonly rest: REST) {}\n\n\t/**\n\t * Fetches a thread\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/channel#get-channel}\n\t * @param threadId - The id of the thread\n\t */\n\tpublic async get(threadId: Snowflake) {\n\t\treturn this.rest.get(Routes.channel(threadId)) as Promise<APIThreadChannel>;\n\t}\n\n\t/**\n\t * Creates a new thread\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/channel#start-thread-from-message}\n\t * @see {@link https://discord.com/developers/docs/resources/channel#start-thread-without-message}\n\t * @param channelId - The id of the channel to start the thread in\n\t * @param data - The data to use when starting the thread\n\t */\n\tpublic async create(channelId: Snowflake, { message_id, ...body }: StartThreadOptions) {\n\t\treturn this.rest.post(Routes.threads(channelId, message_id), { body }) as Promise<RESTPostAPIChannelThreadsResult>;\n\t}\n\n\t/**\n\t * Creates a new forum post\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/channel#start-thread-in-forum-channel}\n\t * @param channelId - The id of the forum channel to start the thread in\n\t * @param data - The data to use when starting the thread\n\t */\n\tpublic async createForumThread(channelId: Snowflake, { message, ...optionsBody }: StartForumThreadOptions) {\n\t\tconst { files, ...messageBody } = message;\n\n\t\tconst body = {\n\t\t\t...optionsBody,\n\t\t\tmessage: messageBody,\n\t\t};\n\n\t\treturn this.rest.post(Routes.threads(channelId), { files, body }) as Promise<APIThreadChannel>;\n\t}\n\n\t/**\n\t * Adds the current user to a thread\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/channel#join-thread}\n\t * @param threadId - The id of the thread to join\n\t */\n\tpublic async join(threadId: Snowflake) {\n\t\tawait this.rest.put(Routes.threadMembers(threadId, '@me'));\n\t}\n\n\t/**\n\t * Adds a member to a thread\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/channel#add-thread-member}\n\t * @param threadId - The id of the thread to add the member to\n\t * @param userId - The id of the user to add to the thread\n\t */\n\tpublic async addMember(threadId: Snowflake, userId: Snowflake) {\n\t\tawait this.rest.put(Routes.threadMembers(threadId, userId));\n\t}\n\n\t/**\n\t * Removes the current user from a thread\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/channel#leave-thread}\n\t * @param threadId - The id of the thread to leave\n\t */\n\tpublic async leave(threadId: Snowflake) {\n\t\tawait this.rest.delete(Routes.threadMembers(threadId, '@me'));\n\t}\n\n\t/**\n\t * Removes a member from a thread\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/channel#remove-thread-member}\n\t * @param threadId - The id of the thread to remove the member from\n\t * @param userId - The id of the user to remove from the thread\n\t */\n\tpublic async removeMember(threadId: Snowflake, userId: Snowflake) {\n\t\tawait this.rest.delete(Routes.threadMembers(threadId, userId));\n\t}\n\n\t/**\n\t * Fetches a member of a thread\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/channel#get-thread-member}\n\t * @param threadId - The id of the thread to fetch the member from\n\t * @param userId - The id of the user\n\t */\n\tpublic async getMember(threadId: Snowflake, userId: Snowflake) {\n\t\treturn this.rest.get(Routes.threadMembers(threadId, userId)) as Promise<APIThreadMember>;\n\t}\n\n\t/**\n\t * Fetches all members of a thread\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/channel#list-thread-members}\n\t * @param threadId - The id of the thread to fetch the members from\n\t */\n\tpublic async getAllMembers(threadId: Snowflake) {\n\t\treturn this.rest.get(Routes.threadMembers(threadId)) as Promise<RESTGetAPIChannelThreadMembersResult>;\n\t}\n}\n","import { makeURLSearchParams, type REST } from '@discordjs/rest';\nimport {\n\tRoutes,\n\ttype RESTGetAPICurrentUserApplicationRoleConnectionResult,\n\ttype RESTGetAPICurrentUserConnectionsResult,\n\ttype RESTGetAPICurrentUserGuildsQuery,\n\ttype RESTGetAPICurrentUserGuildsResult,\n\ttype RESTGetAPICurrentUserResult,\n\ttype RESTGetAPIUserResult,\n\ttype RESTGetCurrentUserGuildMemberResult,\n\ttype RESTPatchAPICurrentUserJSONBody,\n\ttype RESTPatchAPICurrentUserResult,\n\ttype RESTPatchAPIGuildMemberJSONBody,\n\ttype RESTPatchAPIGuildMemberResult,\n\ttype RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody,\n\ttype RESTPatchAPIGuildVoiceStateCurrentMemberResult,\n\ttype RESTPostAPICurrentUserCreateDMChannelResult,\n\ttype RESTPutAPICurrentUserApplicationRoleConnectionJSONBody,\n\ttype RESTPutAPICurrentUserApplicationRoleConnectionResult,\n\ttype Snowflake,\n} from 'discord-api-types/v10';\n\nexport class UsersAPI {\n\tpublic constructor(private readonly rest: REST) {}\n\n\t/**\n\t * Fetches a user by their id\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/user#get-user}\n\t * @param userId - The id of the user to fetch\n\t */\n\tpublic async get(userId: Snowflake) {\n\t\treturn this.rest.get(Routes.user(userId)) as Promise<RESTGetAPIUserResult>;\n\t}\n\n\t/**\n\t * Returns the user object of the requester's account\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/user#get-current-user}\n\t */\n\tpublic async getCurrent() {\n\t\treturn this.rest.get(Routes.user('@me')) as Promise<RESTGetAPICurrentUserResult>;\n\t}\n\n\t/**\n\t * Returns a list of partial guild objects the current user is a member of\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/user#get-current-user-guilds}\n\t * @param options - The options to use when fetching the current user's guilds\n\t */\n\tpublic async getGuilds(options: RESTGetAPICurrentUserGuildsQuery = {}) {\n\t\treturn this.rest.get(Routes.userGuilds(), {\n\t\t\tquery: makeURLSearchParams(options),\n\t\t}) as Promise<RESTGetAPICurrentUserGuildsResult>;\n\t}\n\n\t/**\n\t * Leaves the guild with the given id\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/user#leave-guild}\n\t * @param guildId - The id of the guild\n\t */\n\tpublic async leaveGuild(guildId: Snowflake) {\n\t\tawait this.rest.delete(Routes.userGuild(guildId));\n\t}\n\n\t/**\n\t * Edits the current user\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/user#modify-current-user}\n\t * @param user - The new data for the current user\n\t */\n\tpublic async edit(user: RESTPatchAPICurrentUserJSONBody) {\n\t\treturn this.rest.patch(Routes.user('@me'), { body: user }) as Promise<RESTPatchAPICurrentUserResult>;\n\t}\n\n\t/**\n\t * Fetches the guild member for the current user\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/user#get-current-user-guild-member}\n\t * @param guildId - The id of the guild\n\t */\n\tpublic async getGuildMember(guildId: Snowflake) {\n\t\treturn this.rest.get(Routes.userGuildMember(guildId)) as Promise<RESTGetCurrentUserGuildMemberResult>;\n\t}\n\n\t/**\n\t * Edits the guild member for the current user\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#modify-current-member}\n\t * @param guildId - The id of the guild\n\t * @param member - The new data for the guild member\n\t * @param reason - The reason for editing this guild member\n\t */\n\tpublic async editGuildMember(guildId: Snowflake, member: RESTPatchAPIGuildMemberJSONBody = {}, reason?: string) {\n\t\treturn this.rest.patch(Routes.guildMember(guildId, '@me'), {\n\t\t\treason,\n\t\t\tbody: member,\n\t\t}) as Promise<RESTPatchAPIGuildMemberResult>;\n\t}\n\n\t/**\n\t * Sets the voice state for the current user\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#modify-current-user-voice-state}\n\t * @param guildId - The id of the guild\n\t * @param options - The options to use when setting the voice state\n\t */\n\tpublic async setVoiceState(guildId: Snowflake, options: RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody = {}) {\n\t\treturn this.rest.patch(Routes.guildVoiceState(guildId, '@me'), {\n\t\t\tbody: options,\n\t\t}) as Promise<RESTPatchAPIGuildVoiceStateCurrentMemberResult>;\n\t}\n\n\t/**\n\t * Opens a new DM channel with a user\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/user#create-dm}\n\t * @param userId - The id of the user to open a DM channel with\n\t */\n\tpublic async createDM(userId: Snowflake) {\n\t\treturn this.rest.post(Routes.userChannels(), {\n\t\t\tbody: { recipient_id: userId },\n\t\t}) as Promise<RESTPostAPICurrentUserCreateDMChannelResult>;\n\t}\n\n\t/**\n\t * Gets the current user's connections\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/user#get-user-connections}\n\t */\n\tpublic async getConnections() {\n\t\treturn this.rest.get(Routes.userConnections()) as Promise<RESTGetAPICurrentUserConnectionsResult>;\n\t}\n\n\t/**\n\t * Gets the current user's active application role connection\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/user#get-user-application-role-connection}\n\t * @param applicationId - The id of the application\n\t */\n\tpublic async getApplicationRoleConnection(applicationId: Snowflake) {\n\t\treturn this.rest.get(\n\t\t\tRoutes.userApplicationRoleConnection(applicationId),\n\t\t) as Promise<RESTGetAPICurrentUserApplicationRoleConnectionResult>;\n\t}\n\n\t/**\n\t * Updates the current user's application role connection\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/user#update-user-application-role-connection}\n\t * @param applicationId - The id of the application\n\t * @param options - The options to use when updating the application role connection\n\t */\n\tpublic async updateApplicationRoleConnection(\n\t\tapplicationId: Snowflake,\n\t\toptions: RESTPutAPICurrentUserApplicationRoleConnectionJSONBody,\n\t) {\n\t\treturn this.rest.put(Routes.userApplicationRoleConnection(applicationId), {\n\t\t\tbody: options,\n\t\t}) as Promise<RESTPutAPICurrentUserApplicationRoleConnectionResult>;\n\t}\n}\n","import type { REST } from '@discordjs/rest';\nimport { Routes, type GetAPIVoiceRegionsResult } from 'discord-api-types/v10';\n\nexport class VoiceAPI {\n\tpublic constructor(private readonly rest: REST) {}\n\n\t/**\n\t * Fetches all voice regions\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/voice#list-voice-regions}\n\t */\n\tpublic async getVoiceRegions() {\n\t\treturn this.rest.get(Routes.voiceRegions()) as Promise<GetAPIVoiceRegionsResult>;\n\t}\n}\n","import { makeURLSearchParams, type RawFile, type REST } from '@discordjs/rest';\nimport {\n\tRoutes,\n\ttype RESTGetAPIChannelMessageResult,\n\ttype RESTGetAPIWebhookResult,\n\ttype RESTPatchAPIWebhookJSONBody,\n\ttype RESTPatchAPIWebhookResult,\n\ttype RESTPatchAPIWebhookWithTokenMessageJSONBody,\n\ttype RESTPatchAPIWebhookWithTokenMessageResult,\n\ttype RESTPostAPIChannelWebhookJSONBody,\n\ttype RESTPostAPIWebhookWithTokenGitHubQuery,\n\ttype RESTPostAPIWebhookWithTokenJSONBody,\n\ttype RESTPostAPIWebhookWithTokenQuery,\n\ttype RESTPostAPIWebhookWithTokenResult,\n\ttype RESTPostAPIWebhookWithTokenSlackQuery,\n\ttype RESTPostAPIWebhookWithTokenWaitResult,\n\ttype Snowflake,\n} from 'discord-api-types/v10';\n\nexport class WebhooksAPI {\n\tpublic constructor(private readonly rest: REST) {}\n\n\t/**\n\t * Fetches a webhook\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/webhook#get-webhook}\n\t * @see {@link https://discord.com/developers/docs/resources/webhook#get-webhook-with-token}\n\t * @param id - The id of the webhook\n\t * @param token - The token of the webhook\n\t */\n\tpublic async get(id: Snowflake, token?: string) {\n\t\treturn this.rest.get(Routes.webhook(id, token)) as Promise<RESTGetAPIWebhookResult>;\n\t}\n\n\t/**\n\t * Creates a new webhook\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/webhook#create-webhook}\n\t * @param channelId - The id of the channel to create the webhook in\n\t * @param data - The data to use when creating the webhook\n\t * @param reason - The reason for creating the webhook\n\t */\n\tpublic async create(channelId: Snowflake, data: RESTPostAPIChannelWebhookJSONBody, reason?: string) {\n\t\treturn this.rest.post(Routes.channelWebhooks(channelId), {\n\t\t\treason,\n\t\t\tbody: data,\n\t\t}) as Promise<RESTPostAPIWebhookWithTokenResult>;\n\t}\n\n\t/**\n\t * Edits a webhook\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/webhook#modify-webhook}\n\t * @see {@link https://discord.com/developers/docs/resources/webhook#modify-webhook-with-token}\n\t * @param id - The id of the webhook to edit\n\t * @param webhook - The new webhook data\n\t * @param options - The options to use when editing the webhook\n\t */\n\tpublic async edit(\n\t\tid: Snowflake,\n\t\twebhook: RESTPatchAPIWebhookJSONBody,\n\t\t{ token, reason }: { reason?: string; token?: string } = {},\n\t) {\n\t\treturn this.rest.patch(Routes.webhook(id, token), { reason, body: webhook }) as Promise<RESTPatchAPIWebhookResult>;\n\t}\n\n\t/**\n\t * Deletes a webhook\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/webhook#delete-webhook}\n\t * @see {@link https://discord.com/developers/docs/resources/webhook#delete-webhook-with-token}\n\t * @param id - The id of the webhook to delete\n\t * @param options - The options to use when deleting the webhook\n\t */\n\tpublic async delete(id: Snowflake, { token, reason }: { reason?: string; token?: string } = {}) {\n\t\tawait this.rest.delete(Routes.webhook(id, token), { reason });\n\t}\n\n\t/**\n\t * Executes a webhook and returns the created message\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/webhook#execute-webhook}\n\t * @param id - The id of the webhook\n\t * @param token - The token of the webhook\n\t * @param data - The data to use when executing the webhook\n\t */\n\tpublic async execute(\n\t\tid: Snowflake,\n\t\ttoken: string,\n\t\tdata: RESTPostAPIWebhookWithTokenJSONBody & RESTPostAPIWebhookWithTokenQuery & { files?: RawFile[]; wait: true },\n\t): Promise<RESTPostAPIWebhookWithTokenWaitResult>;\n\n\t/**\n\t * Executes a webhook\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/webhook#execute-webhook}\n\t * @param id - The id of the webhook\n\t * @param token - The token of the webhook\n\t * @param data - The data to use when executing the webhook\n\t */\n\tpublic async execute(\n\t\tid: Snowflake,\n\t\ttoken: string,\n\t\tdata: RESTPostAPIWebhookWithTokenJSONBody & RESTPostAPIWebhookWithTokenQuery & { files?: RawFile[]; wait?: false },\n\t): Promise<void>;\n\n\t/**\n\t * Executes a webhook\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/webhook#execute-webhook}\n\t * @param id - The id of the webhook\n\t * @param token - The token of the webhook\n\t * @param data - The data to use when executing the webhook\n\t */\n\tpublic async execute(\n\t\tid: Snowflake,\n\t\ttoken: string,\n\t\t{\n\t\t\twait,\n\t\t\tthread_id,\n\t\t\tfiles,\n\t\t\t...body\n\t\t}: RESTPostAPIWebhookWithTokenJSONBody & RESTPostAPIWebhookWithTokenQuery & { files?: RawFile[] },\n\t) {\n\t\treturn this.rest.post(Routes.webhook(id, token), {\n\t\t\tquery: makeURLSearchParams({ wait, thread_id }),\n\t\t\tfiles,\n\t\t\tbody,\n\t\t\tauth: false,\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-invalid-void-type\n\t\t}) as Promise<RESTPostAPIWebhookWithTokenWaitResult | void>;\n\t}\n\n\t/**\n\t * Executes a slack webhook\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/webhook#execute-slackcompatible-webhook}\n\t * @param id - The id of the webhook\n\t * @param token - The token of the webhook\n\t * @param options - The options to use when executing the webhook\n\t */\n\tpublic async executeSlack(\n\t\tid: Snowflake,\n\t\ttoken: string,\n\t\tbody: unknown,\n\t\toptions: RESTPostAPIWebhookWithTokenSlackQuery = {},\n\t) {\n\t\tawait this.rest.post(Routes.webhookPlatform(id, token, 'slack'), {\n\t\t\tquery: makeURLSearchParams(options),\n\t\t\tbody,\n\t\t\tauth: false,\n\t\t});\n\t}\n\n\t/**\n\t * Executes a github webhook\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/webhook#execute-githubcompatible-webhook}\n\t * @param id - The id of the webhook\n\t * @param token - The token of the webhook\n\t * @param options - The options to use when executing the webhook\n\t */\n\tpublic async executeGitHub(\n\t\tid: Snowflake,\n\t\ttoken: string,\n\t\tbody: unknown,\n\t\toptions: RESTPostAPIWebhookWithTokenGitHubQuery = {},\n\t) {\n\t\tawait this.rest.post(Routes.webhookPlatform(id, token, 'github'), {\n\t\t\tquery: makeURLSearchParams(options),\n\t\t\tbody,\n\t\t\tauth: false,\n\t\t});\n\t}\n\n\t/**\n\t * Fetches an associated message from a webhook\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/webhook#get-webhook-message}\n\t * @param id - The id of the webhook\n\t * @param token - The token of the webhook\n\t * @param messageId - The id of the message to fetch\n\t * @param options - The options to use when fetching the message\n\t */\n\tpublic async getMessage(id: Snowflake, token: string, messageId: Snowflake, options: { thread_id?: string } = {}) {\n\t\treturn this.rest.get(Routes.webhookMessage(id, token, messageId), {\n\t\t\tquery: makeURLSearchParams(options),\n\t\t\tauth: false,\n\t\t}) as Promise<RESTGetAPIChannelMessageResult>;\n\t}\n\n\t/**\n\t * Edits an associated message from a webhook\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/webhook#edit-webhook-message}\n\t * @param id - The id of the webhook\n\t * @param token - The token of the webhook\n\t * @param messageId - The id of the message to edit\n\t * @param data - The data to use when editing the message\n\t */\n\tpublic async editMessage(\n\t\tid: Snowflake,\n\t\ttoken: string,\n\t\tmessageId: Snowflake,\n\t\t{ thread_id, ...body }: RESTPatchAPIWebhookWithTokenMessageJSONBody & { thread_id?: string },\n\t) {\n\t\treturn this.rest.patch(Routes.webhookMessage(id, token, messageId), {\n\t\t\tquery: makeURLSearchParams({ thread_id }),\n\t\t\tauth: false,\n\t\t\tbody,\n\t\t}) as Promise<RESTPatchAPIWebhookWithTokenMessageResult>;\n\t}\n\n\t/**\n\t * Deletes an associated message from a webhook\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/webhook#delete-webhook-message}\n\t * @param id - The id of the webhook\n\t * @param token - The token of the webhook\n\t * @param messageId - The id of the message to delete\n\t * @param options - The options to use when deleting the message\n\t */\n\tpublic async deleteMessage(id: Snowflake, token: string, messageId: Snowflake, options: { thread_id?: string } = {}) {\n\t\tawait this.rest.delete(Routes.webhookMessage(id, token, messageId), {\n\t\t\tquery: makeURLSearchParams(options),\n\t\t\tauth: false,\n\t\t});\n\t}\n}\n","import type { REST } from '@discordjs/rest';\nimport { ApplicationCommandsAPI } from './applicationCommands.js';\nimport { ChannelsAPI } from './channel.js';\nimport { GuildsAPI } from './guild.js';\nimport { InteractionsAPI } from './interactions.js';\nimport { InvitesAPI } from './invite.js';\nimport { RoleConnectionsAPI } from './roleConnections.js';\nimport { StickersAPI } from './sticker.js';\nimport { ThreadsAPI } from './thread.js';\nimport { UsersAPI } from './user.js';\nimport { VoiceAPI } from './voice.js';\nimport { WebhooksAPI } from './webhook.js';\n\nexport * from './applicationCommands.js';\nexport * from './channel.js';\nexport * from './guild.js';\nexport * from './interactions.js';\nexport * from './invite.js';\nexport * from './roleConnections.js';\nexport * from './sticker.js';\nexport * from './thread.js';\nexport * from './user.js';\nexport * from './voice.js';\nexport * from './webhook.js';\n\nexport class API {\n\tpublic readonly applicationCommands: ApplicationCommandsAPI;\n\n\tpublic readonly channels: ChannelsAPI;\n\n\tpublic readonly guilds: GuildsAPI;\n\n\tpublic readonly interactions: InteractionsAPI;\n\n\tpublic readonly invites: InvitesAPI;\n\n\tpublic readonly roleConnections: RoleConnectionsAPI;\n\n\tpublic readonly stickers: StickersAPI;\n\n\tpublic readonly threads: ThreadsAPI;\n\n\tpublic readonly users: UsersAPI;\n\n\tpublic readonly voice: VoiceAPI;\n\n\tpublic readonly webhooks: WebhooksAPI;\n\n\tpublic constructor(public readonly rest: REST) {\n\t\tthis.applicationCommands = new ApplicationCommandsAPI(rest);\n\t\tthis.channels = new ChannelsAPI(rest);\n\t\tthis.guilds = new GuildsAPI(rest);\n\t\tthis.invites = new InvitesAPI(rest);\n\t\tthis.roleConnections = new RoleConnectionsAPI(rest);\n\t\tthis.stickers = new StickersAPI(rest);\n\t\tthis.threads = new ThreadsAPI(rest);\n\t\tthis.users = new UsersAPI(rest);\n\t\tthis.voice = new VoiceAPI(rest);\n\t\tthis.webhooks = new WebhooksAPI(rest);\n\t\tthis.interactions = new InteractionsAPI(rest, this.webhooks);\n\t}\n}\n","import type { REST } from '@discordjs/rest';\nimport { WebSocketShardEvents, type WebSocketManager } from '@discordjs/ws';\nimport { AsyncEventEmitter } from '@vladfrangu/async_event_emitter';\nimport type {\n\tGatewayAutoModerationActionExecutionDispatchData,\n\tGatewayAutoModerationRuleCreateDispatchData,\n\tGatewayAutoModerationRuleDeleteDispatchData,\n\tGatewayAutoModerationRuleUpdateDispatchData,\n\tGatewayChannelCreateDispatchData,\n\tGatewayChannelDeleteDispatchData,\n\tGatewayChannelPinsUpdateDispatchData,\n\tGatewayChannelUpdateDispatchData,\n\tGatewayDispatchEvents,\n\tGatewayGuildBanAddDispatchData,\n\tGatewayGuildBanRemoveDispatchData,\n\tGatewayGuildCreateDispatchData,\n\tGatewayGuildDeleteDispatchData,\n\tGatewayGuildEmojisUpdateDispatchData,\n\tGatewayGuildIntegrationsUpdateDispatchData,\n\tGatewayGuildMemberAddDispatchData,\n\tGatewayGuildMemberRemoveDispatchData,\n\tGatewayGuildMembersChunkDispatchData,\n\tGatewayGuildMemberUpdateDispatchData,\n\tGatewayGuildRoleCreateDispatchData,\n\tGatewayGuildRoleDeleteDispatchData,\n\tGatewayGuildRoleUpdateDispatchData,\n\tGatewayGuildScheduledEventCreateDispatchData,\n\tGatewayGuildScheduledEventDeleteDispatchData,\n\tGatewayGuildScheduledEventUpdateDispatchData,\n\tGatewayGuildScheduledEventUserAddDispatchData,\n\tGatewayGuildScheduledEventUserRemoveDispatchData,\n\tGatewayGuildStickersUpdateDispatchData,\n\tGatewayGuildUpdateDispatchData,\n\tGatewayIntegrationCreateDispatchData,\n\tGatewayIntegrationDeleteDispatchData,\n\tGatewayIntegrationUpdateDispatchData,\n\tGatewayInteractionCreateDispatchData,\n\tGatewayInviteCreateDispatchData,\n\tGatewayInviteDeleteDispatchData,\n\tGatewayMessageCreateDispatchData,\n\tGatewayMessageDeleteBulkDispatchData,\n\tGatewayMessageDeleteDispatchData,\n\tGatewayMessageReactionAddDispatchData,\n\tGatewayMessageReactionRemoveAllDispatchData,\n\tGatewayMessageReactionRemoveDispatchData,\n\tGatewayMessageReactionRemoveEmojiDispatchData,\n\tGatewayMessageUpdateDispatchData,\n\tGatewayPresenceUpdateDispatchData,\n\tGatewayReadyDispatchData,\n\tGatewayStageInstanceCreateDispatchData,\n\tGatewayStageInstanceDeleteDispatchData,\n\tGatewayStageInstanceUpdateDispatchData,\n\tGatewayThreadCreateDispatchData,\n\tGatewayThreadDeleteDispatchData,\n\tGatewayThreadListSyncDispatchData,\n\tGatewayThreadMembersUpdateDispatchData,\n\tGatewayThreadMemberUpdateDispatchData,\n\tGatewayThreadUpdateDispatchData,\n\tGatewayTypingStartDispatchData,\n\tGatewayUserUpdateDispatchData,\n\tGatewayVoiceServerUpdateDispatchData,\n\tGatewayVoiceStateUpdateDispatchData,\n\tGatewayWebhooksUpdateDispatchData,\n} from 'discord-api-types/v10';\nimport { API } from './api/index.js';\n\nexport interface IntrinsicProps {\n\t/**\n\t * The REST API\n\t */\n\tapi: API;\n\t/**\n\t * The id of the shard that emitted the event\n\t */\n\tshardId: number;\n}\n\nexport interface WithIntrinsicProps<T> extends IntrinsicProps {\n\tdata: T;\n}\n\nexport interface MappedEvents {\n\t[GatewayDispatchEvents.ChannelCreate]: [WithIntrinsicProps<GatewayChannelCreateDispatchData>];\n\t[GatewayDispatchEvents.ChannelDelete]: [WithIntrinsicProps<GatewayChannelDeleteDispatchData>];\n\t[GatewayDispatchEvents.ChannelPinsUpdate]: [WithIntrinsicProps<GatewayChannelPinsUpdateDispatchData>];\n\t[GatewayDispatchEvents.ChannelUpdate]: [WithIntrinsicProps<GatewayChannelUpdateDispatchData>];\n\t[GatewayDispatchEvents.GuildBanAdd]: [WithIntrinsicProps<GatewayGuildBanAddDispatchData>];\n\t[GatewayDispatchEvents.GuildBanRemove]: [WithIntrinsicProps<GatewayGuildBanRemoveDispatchData>];\n\t[GatewayDispatchEvents.GuildCreate]: [WithIntrinsicProps<GatewayGuildCreateDispatchData>];\n\t[GatewayDispatchEvents.GuildDelete]: [WithIntrinsicProps<GatewayGuildDeleteDispatchData>];\n\t[GatewayDispatchEvents.GuildEmojisUpdate]: [WithIntrinsicProps<GatewayGuildEmojisUpdateDispatchData>];\n\t[GatewayDispatchEvents.GuildIntegrationsUpdate]: [WithIntrinsicProps<GatewayGuildIntegrationsUpdateDispatchData>];\n\t[GatewayDispatchEvents.GuildMemberAdd]: [WithIntrinsicProps<GatewayGuildMemberAddDispatchData>];\n\t[GatewayDispatchEvents.GuildMemberRemove]: [WithIntrinsicProps<GatewayGuildMemberRemoveDispatchData>];\n\t[GatewayDispatchEvents.GuildMemberUpdate]: [WithIntrinsicProps<GatewayGuildMemberUpdateDispatchData>];\n\t[GatewayDispatchEvents.GuildMembersChunk]: [WithIntrinsicProps<GatewayGuildMembersChunkDispatchData>];\n\t[GatewayDispatchEvents.GuildRoleCreate]: [WithIntrinsicProps<GatewayGuildRoleCreateDispatchData>];\n\t[GatewayDispatchEvents.GuildRoleDelete]: [WithIntrinsicProps<GatewayGuildRoleDeleteDispatchData>];\n\t[GatewayDispatchEvents.GuildRoleUpdate]: [WithIntrinsicProps<GatewayGuildRoleUpdateDispatchData>];\n\t[GatewayDispatchEvents.GuildScheduledEventCreate]: [WithIntrinsicProps<GatewayGuildScheduledEventCreateDispatchData>];\n\t[GatewayDispatchEvents.GuildScheduledEventDelete]: [WithIntrinsicProps<GatewayGuildScheduledEventDeleteDispatchData>];\n\t[GatewayDispatchEvents.GuildScheduledEventUpdate]: [WithIntrinsicProps<GatewayGuildScheduledEventUpdateDispatchData>];\n\t[GatewayDispatchEvents.GuildScheduledEventUserAdd]: [\n\t\tWithIntrinsicProps<GatewayGuildScheduledEventUserAddDispatchData>,\n\t];\n\t[GatewayDispatchEvents.GuildScheduledEventUserRemove]: [\n\t\tWithIntrinsicProps<GatewayGuildScheduledEventUserRemoveDispatchData>,\n\t];\n\t[GatewayDispatchEvents.GuildStickersUpdate]: [WithIntrinsicProps<GatewayGuildStickersUpdateDispatchData>];\n\t[GatewayDispatchEvents.GuildUpdate]: [WithIntrinsicProps<GatewayGuildUpdateDispatchData>];\n\t[GatewayDispatchEvents.IntegrationCreate]: [WithIntrinsicProps<GatewayIntegrationCreateDispatchData>];\n\t[GatewayDispatchEvents.IntegrationDelete]: [WithIntrinsicProps<GatewayIntegrationDeleteDispatchData>];\n\t[GatewayDispatchEvents.IntegrationUpdate]: [WithIntrinsicProps<GatewayIntegrationUpdateDispatchData>];\n\t[GatewayDispatchEvents.InteractionCreate]: [WithIntrinsicProps<GatewayInteractionCreateDispatchData>];\n\t[GatewayDispatchEvents.InviteCreate]: [WithIntrinsicProps<GatewayInviteCreateDispatchData>];\n\t[GatewayDispatchEvents.InviteDelete]: [WithIntrinsicProps<GatewayInviteDeleteDispatchData>];\n\t[GatewayDispatchEvents.MessageCreate]: [WithIntrinsicProps<GatewayMessageCreateDispatchData>];\n\t[GatewayDispatchEvents.MessageDelete]: [WithIntrinsicProps<GatewayMessageDeleteDispatchData>];\n\t[GatewayDispatchEvents.MessageDeleteBulk]: [WithIntrinsicProps<GatewayMessageDeleteBulkDispatchData>];\n\t[GatewayDispatchEvents.MessageReactionAdd]: [WithIntrinsicProps<GatewayMessageReactionAddDispatchData>];\n\t[GatewayDispatchEvents.MessageReactionRemove]: [WithIntrinsicProps<GatewayMessageReactionRemoveDispatchData>];\n\t[GatewayDispatchEvents.MessageReactionRemoveAll]: [WithIntrinsicProps<GatewayMessageReactionRemoveAllDispatchData>];\n\t[GatewayDispatchEvents.MessageReactionRemoveEmoji]: [\n\t\tWithIntrinsicProps<GatewayMessageReactionRemoveEmojiDispatchData>,\n\t];\n\t[GatewayDispatchEvents.MessageUpdate]: [WithIntrinsicProps<GatewayMessageUpdateDispatchData>];\n\t[GatewayDispatchEvents.PresenceUpdate]: [WithIntrinsicProps<GatewayPresenceUpdateDispatchData>];\n\t[GatewayDispatchEvents.Ready]: [WithIntrinsicProps<GatewayReadyDispatchData>];\n\t[GatewayDispatchEvents.StageInstanceCreate]: [WithIntrinsicProps<GatewayStageInstanceCreateDispatchData>];\n\t[GatewayDispatchEvents.StageInstanceDelete]: [WithIntrinsicProps<GatewayStageInstanceDeleteDispatchData>];\n\t[GatewayDispatchEvents.StageInstanceUpdate]: [WithIntrinsicProps<GatewayStageInstanceUpdateDispatchData>];\n\t[GatewayDispatchEvents.ThreadCreate]: [WithIntrinsicProps<GatewayThreadCreateDispatchData>];\n\t[GatewayDispatchEvents.ThreadDelete]: [WithIntrinsicProps<GatewayThreadDeleteDispatchData>];\n\t[GatewayDispatchEvents.ThreadListSync]: [WithIntrinsicProps<GatewayThreadListSyncDispatchData>];\n\t[GatewayDispatchEvents.ThreadMemberUpdate]: [WithIntrinsicProps<GatewayThreadMemberUpdateDispatchData>];\n\t[GatewayDispatchEvents.ThreadMembersUpdate]: [WithIntrinsicProps<GatewayThreadMembersUpdateDispatchData>];\n\t[GatewayDispatchEvents.ThreadUpdate]: [WithIntrinsicProps<GatewayThreadUpdateDispatchData>];\n\t[GatewayDispatchEvents.UserUpdate]: [WithIntrinsicProps<GatewayUserUpdateDispatchData>];\n\t[GatewayDispatchEvents.VoiceServerUpdate]: [WithIntrinsicProps<GatewayVoiceServerUpdateDispatchData>];\n\t[GatewayDispatchEvents.VoiceStateUpdate]: [WithIntrinsicProps<GatewayVoiceStateUpdateDispatchData>];\n\t[GatewayDispatchEvents.WebhooksUpdate]: [WithIntrinsicProps<GatewayWebhooksUpdateDispatchData>];\n\t[GatewayDispatchEvents.Resumed]: [WithIntrinsicProps<never>];\n\t[GatewayDispatchEvents.TypingStart]: [WithIntrinsicProps<GatewayTypingStartDispatchData>];\n\t[GatewayDispatchEvents.AutoModerationActionExecution]: [\n\t\tWithIntrinsicProps<GatewayAutoModerationActionExecutionDispatchData>,\n\t];\n\t[GatewayDispatchEvents.AutoModerationRuleCreate]: [WithIntrinsicProps<GatewayAutoModerationRuleCreateDispatchData>];\n\t[GatewayDispatchEvents.AutoModerationRuleDelete]: [WithIntrinsicProps<GatewayAutoModerationRuleDeleteDispatchData>];\n\t[GatewayDispatchEvents.AutoModerationRuleUpdate]: [WithIntrinsicProps<GatewayAutoModerationRuleUpdateDispatchData>];\n}\n\nexport type ManagerShardEventsMap = {\n\t[K in keyof MappedEvents]: MappedEvents[K];\n};\n\nexport interface ClientOptions {\n\trest: REST;\n\tws: WebSocketManager;\n}\n\nexport function createClient({ rest, ws }: ClientOptions) {\n\tconst api = new API(rest);\n\tconst emitter = new AsyncEventEmitter<ManagerShardEventsMap>();\n\n\tfunction wrapIntrinsicProps<T>(obj: T, shardId: number): WithIntrinsicProps<T> {\n\t\treturn {\n\t\t\tapi,\n\t\t\tshardId,\n\t\t\tdata: obj,\n\t\t};\n\t}\n\n\tws.on(WebSocketShardEvents.Dispatch, ({ data: dispatch, shardId }) => {\n\t\t// @ts-expect-error event props can't be resolved properly, but they are correct\n\t\temitter.emit(dispatch.t, wrapIntrinsicProps(dispatch.d, shardId));\n\t});\n\n\treturn emitter;\n}\n","import type { RawFile } from '@discordjs/rest';\nimport type { APIInteractionResponseCallbackData } from 'discord-api-types/v10';\n\nexport interface DescriptiveRawFile extends RawFile {\n\tdescription?: string;\n}\n\n/**\n * A utility function to create a form data payload given an array of file buffers\n *\n * @param files - The files to create a form data payload for\n * @param options - The additional options for the form data payload\n */\nexport function withFiles(files: DescriptiveRawFile[], options: APIInteractionResponseCallbackData) {\n\tconst body = {\n\t\t...options,\n\t\tattachments: files.map((file, index) => ({\n\t\t\tid: index.toString(),\n\t\t\tdescription: file.description,\n\t\t})),\n\t};\n\n\tconst outputFiles = files.map((file, index) => ({\n\t\tname: file.name ?? index.toString(),\n\t\tdata: file.data,\n\t}));\n\n\treturn { body, files: outputFiles };\n}\n","export * from './api/index.js';\nexport * from './client.js';\nexport * from './util/index.js';\n\nexport * from 'discord-api-types/v10';\n"],"mappings":";;;;AAAA,SAAS,2BAAsC;AAC/C;AAAA,EACC;AAAA,OAgBM;AAEA,IAAM,yBAAN,MAA6B;AAAA,EAC5B,YAA6B,MAAY;AAAZ;AAAA,EAAa;AAAA,EASjD,MAAa,kBAAkB,eAA0B,UAA8C,CAAC,GAAG;AAC1G,WAAO,KAAK,KAAK,IAAI,OAAO,oBAAoB,aAAa,GAAG;AAAA,MAC/D,OAAO,oBAAoB,OAAO;AAAA,IACnC,CAAC;AAAA,EACF;AAAA,EASA,MAAa,oBAAoB,eAA0B,MAA8C;AACxG,WAAO,KAAK,KAAK,KAAK,OAAO,oBAAoB,aAAa,GAAG;AAAA,MAChE,MAAM;AAA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AAEF,SAAO,EAAE,MAAM,OAAO,YAAY;AACnC;AAfgB;;;ACThB,cAAc;","names":["makeURLSearchParams","Routes","Routes","makeURLSearchParams","makeURLSearchParams","Routes","Routes","makeURLSearchParams","Routes","Routes","makeURLSearchParams","Routes","Routes","makeURLSearchParams","Routes","Routes","Routes","Routes","Routes","Routes","makeURLSearchParams","Routes","Routes","makeURLSearchParams","Routes","Routes","makeURLSearchParams","Routes","Routes","makeURLSearchParams"]}
|
|
1
|
+
{"version":3,"sources":["../src/api/applicationCommands.ts","../src/api/channel.ts","../src/api/guild.ts","../src/api/interactions.ts","../src/api/invite.ts","../src/api/oauth2.ts","../src/api/roleConnections.ts","../src/api/sticker.ts","../src/api/thread.ts","../src/api/user.ts","../src/api/voice.ts","../src/api/webhook.ts","../src/api/index.ts","../src/client.ts","../src/util/files.ts","../src/index.ts"],"sourcesContent":["import { makeURLSearchParams, type REST } from '@discordjs/rest';\nimport {\n\tRoutes,\n\ttype RESTGetAPIApplicationCommandPermissionsResult,\n\ttype RESTGetAPIApplicationCommandResult,\n\ttype RESTGetAPIApplicationCommandsResult,\n\ttype RESTGetAPIGuildApplicationCommandsPermissionsResult,\n\ttype RESTPatchAPIApplicationCommandJSONBody,\n\ttype RESTPatchAPIApplicationCommandResult,\n\ttype RESTPostAPIApplicationCommandsJSONBody,\n\ttype RESTPostAPIApplicationCommandsResult,\n\ttype RESTPutAPIApplicationCommandPermissionsJSONBody,\n\ttype RESTPutAPIApplicationCommandPermissionsResult,\n\ttype RESTPutAPIApplicationCommandsJSONBody,\n\ttype RESTGetAPIApplicationCommandsQuery,\n\ttype RESTPutAPIApplicationCommandsResult,\n\ttype RESTGetAPIApplicationGuildCommandsQuery,\n\ttype Snowflake,\n} from 'discord-api-types/v10';\n\nexport class ApplicationCommandsAPI {\n\tpublic constructor(private readonly rest: REST) {}\n\n\t/**\n\t * Fetches all global commands for a application\n\t *\n\t * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-global-application-commands}\n\t * @param applicationId - The application id to fetch commands for\n\t * @param options - The options to use when fetching commands\n\t */\n\tpublic async getGlobalCommands(applicationId: Snowflake, options: RESTGetAPIApplicationCommandsQuery = {}) {\n\t\treturn this.rest.get(Routes.applicationCommands(applicationId), {\n\t\t\tquery: makeURLSearchParams(options),\n\t\t}) as Promise<RESTGetAPIApplicationCommandsResult>;\n\t}\n\n\t/**\n\t * Creates a new global command\n\t *\n\t * @see {@link https://discord.com/developers/docs/interactions/application-commands#create-global-application-command}\n\t * @param applicationId - The application id to create the command for\n\t * @param data - The data to use when creating the command\n\t */\n\tpublic async createGlobalCommand(applicationId: Snowflake, data: RESTPostAPIApplicationCommandsJSONBody) {\n\t\treturn this.rest.post(Routes.applicationCommands(applicationId), {\n\t\t\tbody: data,\n\t\t}) as Promise<RESTPostAPIApplicationCommandsResult>;\n\t}\n\n\t/**\n\t * Fetches a global command\n\t *\n\t * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-global-application-command}\n\t * @param applicationId - The application id to fetch the command from\n\t * @param commandId - The command id to fetch\n\t */\n\tpublic async getGlobalCommand(applicationId: Snowflake, commandId: Snowflake) {\n\t\treturn this.rest.get(\n\t\t\tRoutes.applicationCommand(applicationId, commandId),\n\t\t) as Promise<RESTGetAPIApplicationCommandResult>;\n\t}\n\n\t/**\n\t * Edits a global command\n\t *\n\t * @see {@link https://discord.com/developers/docs/interactions/application-commands#edit-global-application-command}\n\t * @param applicationId - The application id of the command\n\t * @param commandId - The id of the command to edit\n\t * @param data - The data to use when editing the command\n\t */\n\tpublic async editGlobalCommand(\n\t\tapplicationId: Snowflake,\n\t\tcommandId: Snowflake,\n\t\tdata: RESTPatchAPIApplicationCommandJSONBody,\n\t) {\n\t\treturn this.rest.patch(Routes.applicationCommand(applicationId, commandId), {\n\t\t\tbody: data,\n\t\t}) as Promise<RESTPatchAPIApplicationCommandResult>;\n\t}\n\n\t/**\n\t * Deletes a global command\n\t *\n\t * @see {@link https://discord.com/developers/docs/interactions/application-commands#delete-global-application-command}\n\t * @param applicationId - The application id of the command\n\t * @param commandId - The id of the command to delete\n\t */\n\tpublic async deleteGlobalCommand(applicationId: Snowflake, commandId: Snowflake) {\n\t\tawait this.rest.delete(Routes.applicationCommand(applicationId, commandId));\n\t}\n\n\t/**\n\t * Overwrites global commands\n\t *\n\t * @see {@link https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-global-application-commands}\n\t * @param applicationId - The application id to overwrite commands for\n\t * @param data - The data to use when overwriting commands\n\t */\n\tpublic async bulkOverwriteGlobalCommands(applicationId: Snowflake, data: RESTPutAPIApplicationCommandsJSONBody) {\n\t\treturn this.rest.put(Routes.applicationCommands(applicationId), {\n\t\t\tbody: data,\n\t\t}) as Promise<RESTPutAPIApplicationCommandsResult>;\n\t}\n\n\t/**\n\t * Fetches all commands for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-guild-application-commands}\n\t * @param applicationId - The application id to fetch commands for\n\t * @param guildId - The guild id to fetch commands for\n\t * @param data - The data to use when fetching commands\n\t */\n\tpublic async getGuildCommands(\n\t\tapplicationId: Snowflake,\n\t\tguildId: Snowflake,\n\t\tdata: RESTGetAPIApplicationGuildCommandsQuery = {},\n\t) {\n\t\treturn this.rest.get(Routes.applicationGuildCommands(applicationId, guildId), {\n\t\t\tquery: makeURLSearchParams(data),\n\t\t}) as Promise<RESTGetAPIApplicationCommandsResult>;\n\t}\n\n\t/**\n\t * Creates a new command for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/interactions/application-commands#create-guild-application-command}\n\t * @param applicationId - The application id to create the command for\n\t * @param guildId - The guild id to create the command for\n\t * @param data - The data to use when creating the command\n\t */\n\tpublic async createGuildCommand(\n\t\tapplicationId: Snowflake,\n\t\tguildId: Snowflake,\n\t\tdata: RESTPostAPIApplicationCommandsJSONBody,\n\t) {\n\t\treturn this.rest.post(Routes.applicationGuildCommands(applicationId, guildId), {\n\t\t\tbody: data,\n\t\t}) as Promise<RESTPostAPIApplicationCommandsResult>;\n\t}\n\n\t/**\n\t * Fetches a guild command\n\t *\n\t * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-guild-application-command}\n\t * @param applicationId - The application id to fetch the command from\n\t * @param guildId - The guild id to fetch the command from\n\t * @param commandId - The command id to fetch\n\t */\n\tpublic async getGuildCommand(applicationId: Snowflake, guildId: Snowflake, commandId: Snowflake) {\n\t\treturn this.rest.get(\n\t\t\tRoutes.applicationGuildCommand(applicationId, guildId, commandId),\n\t\t) as Promise<RESTGetAPIApplicationCommandResult>;\n\t}\n\n\t/**\n\t * Edits a guild command\n\t *\n\t * @see {@link https://discord.com/developers/docs/interactions/application-commands#edit-guild-application-command}\n\t * @param applicationId - The application id of the command\n\t * @param guildId - The guild id of the command\n\t * @param commandId - The command id to edit\n\t * @param data - The data to use when editing the command\n\t */\n\tpublic async editGuildCommand(\n\t\tapplicationId: Snowflake,\n\t\tguildId: Snowflake,\n\t\tcommandId: Snowflake,\n\t\tdata: RESTPatchAPIApplicationCommandJSONBody,\n\t) {\n\t\treturn this.rest.patch(Routes.applicationGuildCommand(applicationId, guildId, commandId), {\n\t\t\tbody: data,\n\t\t}) as Promise<RESTPatchAPIApplicationCommandResult>;\n\t}\n\n\t/**\n\t * Deletes a guild command\n\t *\n\t * @see {@link https://discord.com/developers/docs/interactions/application-commands#delete-guild-application-command}\n\t * @param applicationId - The application id of the command\n\t * @param guildId - The guild id of the command\n\t * @param commandId - The id of the command to delete\n\t */\n\tpublic async deleteGuildCommand(applicationId: Snowflake, guildId: Snowflake, commandId: Snowflake) {\n\t\tawait this.rest.delete(Routes.applicationGuildCommand(applicationId, guildId, commandId));\n\t}\n\n\t/**\n\t * Bulk overwrites guild commands\n\t *\n\t * @see {@link https://discord.com/developers/docs/interactions/application-commands#bulk-overwrite-guild-application-commands}\n\t * @param applicationId - The application id to overwrite commands for\n\t * @param guildId - The guild id to overwrite commands for\n\t * @param data - The data to use when overwriting commands\n\t */\n\tpublic async bulkOverwriteGuildCommands(\n\t\tapplicationId: Snowflake,\n\t\tguildId: Snowflake,\n\t\tdata: RESTPutAPIApplicationCommandsJSONBody,\n\t) {\n\t\treturn this.rest.put(Routes.applicationGuildCommands(applicationId, guildId), {\n\t\t\tbody: data,\n\t\t}) as Promise<RESTPutAPIApplicationCommandsResult>;\n\t}\n\n\t/**\n\t * Fetches the permissions for a guild command\n\t *\n\t * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-guild-application-command-permissions}\n\t * @param applicationId - The application id to get the permissions for\n\t * @param guildId - The guild id of the command\n\t * @param commandId - The command id to get the permissions for\n\t */\n\tpublic async getGuildCommandPermissions(applicationId: Snowflake, guildId: Snowflake, commandId: Snowflake) {\n\t\treturn this.rest.get(\n\t\t\tRoutes.applicationCommandPermissions(applicationId, guildId, commandId),\n\t\t) as Promise<RESTGetAPIApplicationCommandPermissionsResult>;\n\t}\n\n\t/**\n\t * Fetches all permissions for all commands in a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/interactions/application-commands#get-application-command-permissions}\n\t * @param applicationId - The application id to get the permissions for\n\t * @param guildId - The guild id to get the permissions for\n\t */\n\tpublic async getGuildCommandsPermissions(applicationId: Snowflake, guildId: Snowflake) {\n\t\treturn this.rest.get(\n\t\t\tRoutes.guildApplicationCommandsPermissions(applicationId, guildId),\n\t\t) as Promise<RESTGetAPIGuildApplicationCommandsPermissionsResult>;\n\t}\n\n\t/**\n\t * Edits the permissions for a guild command\n\t *\n\t * @see {@link https://discord.com/developers/docs/interactions/application-commands#edit-application-command-permissions}\n\t * @param userToken - The token of the user to edit permissions on behalf of\n\t * @param applicationId - The application id to edit the permissions for\n\t * @param guildId - The guild id to edit the permissions for\n\t * @param commandId - The id of the command to edit the permissions for\n\t * @param data - The data to use when editing the permissions\n\t */\n\tpublic async editGuildCommandPermissions(\n\t\tuserToken: string,\n\t\tapplicationId: Snowflake,\n\t\tguildId: Snowflake,\n\t\tcommandId: Snowflake,\n\t\tdata: RESTPutAPIApplicationCommandPermissionsJSONBody,\n\t) {\n\t\treturn this.rest.put(Routes.applicationCommandPermissions(applicationId, guildId, commandId), {\n\t\t\theaders: { Authorization: `Bearer ${userToken.replace('Bearer ', '')}` },\n\t\t\tauth: false,\n\t\t\tbody: data,\n\t\t}) as Promise<RESTPutAPIApplicationCommandPermissionsResult>;\n\t}\n}\n","import { makeURLSearchParams, type RawFile, type REST } from '@discordjs/rest';\nimport {\n\tRoutes,\n\ttype RESTDeleteAPIChannelResult,\n\ttype RESTGetAPIChannelInvitesResult,\n\ttype RESTGetAPIChannelMessageReactionUsersQuery,\n\ttype RESTGetAPIChannelMessageReactionUsersResult,\n\ttype RESTGetAPIChannelMessageResult,\n\ttype RESTGetAPIChannelMessagesQuery,\n\ttype RESTGetAPIChannelMessagesResult,\n\ttype RESTGetAPIChannelPinsResult,\n\ttype RESTGetAPIChannelResult,\n\ttype RESTGetAPIChannelThreadsArchivedQuery,\n\ttype RESTGetAPIChannelUsersThreadsArchivedResult,\n\ttype RESTPatchAPIChannelJSONBody,\n\ttype RESTPatchAPIChannelMessageResult,\n\ttype RESTPatchAPIChannelResult,\n\ttype RESTPostAPIChannelFollowersResult,\n\ttype RESTPostAPIChannelInviteJSONBody,\n\ttype RESTPostAPIChannelInviteResult,\n\ttype RESTPostAPIChannelMessageCrosspostResult,\n\ttype RESTPostAPIChannelMessageJSONBody,\n\ttype RESTPostAPIChannelMessageResult,\n\ttype Snowflake,\n} from 'discord-api-types/v10';\n\nexport class ChannelsAPI {\n\tpublic constructor(private readonly rest: REST) {}\n\n\t/**\n\t * Sends a message in a channel\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/channel#create-message}\n\t * @param channelId - The id of the channel to send the message in\n\t * @param data - The data to use when sending the message\n\t */\n\tpublic async createMessage(\n\t\tchannelId: Snowflake,\n\t\t{ files, ...body }: RESTPostAPIChannelMessageJSONBody & { files?: RawFile[] },\n\t) {\n\t\treturn this.rest.post(Routes.channelMessages(channelId), {\n\t\t\tfiles,\n\t\t\tbody,\n\t\t}) as Promise<RESTPostAPIChannelMessageResult>;\n\t}\n\n\t/**\n\t * Edits a message\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/channel#edit-message}\n\t * @param channelId - The id of the channel the message is in\n\t * @param messageId - The id of the message to edit\n\t * @param data - The data to use when editing the message\n\t */\n\tpublic async editMessage(\n\t\tchannelId: Snowflake,\n\t\tmessageId: Snowflake,\n\t\t{ files, ...body }: RESTPostAPIChannelMessageJSONBody & { files?: RawFile[] },\n\t) {\n\t\treturn this.rest.patch(Routes.channelMessage(channelId, messageId), {\n\t\t\tfiles,\n\t\t\tbody,\n\t\t}) as Promise<RESTPatchAPIChannelMessageResult>;\n\t}\n\n\t/**\n\t * Fetches the reactions for a message\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/channel#get-reactions}\n\t * @param channelId - The id of the channel the message is in\n\t * @param messageId - The id of the message to get the reactions for\n\t * @param emoji - The emoji to get the reactions for\n\t * @param options - The options to use when fetching the reactions\n\t */\n\tpublic async getMessageReactions(\n\t\tchannelId: Snowflake,\n\t\tmessageId: Snowflake,\n\t\temoji: string,\n\t\toptions: RESTGetAPIChannelMessageReactionUsersQuery = {},\n\t) {\n\t\treturn this.rest.get(Routes.channelMessageReaction(channelId, messageId, encodeURIComponent(emoji)), {\n\t\t\tquery: makeURLSearchParams(options),\n\t\t}) as Promise<RESTGetAPIChannelMessageReactionUsersResult>;\n\t}\n\n\t/**\n\t * Deletes a reaction for the current user\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/channel#delete-own-reaction}\n\t * @param channelId - The id of the channel the message is in\n\t * @param messageId - The id of the message to delete the reaction for\n\t * @param emoji - The emoji to delete the reaction for\n\t */\n\tpublic async deleteOwnMessageReaction(channelId: Snowflake, messageId: Snowflake, emoji: string) {\n\t\tawait this.rest.delete(Routes.channelMessageOwnReaction(channelId, messageId, encodeURIComponent(emoji)));\n\t}\n\n\t/**\n\t * Deletes a reaction for a user\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/channel#delete-user-reaction}\n\t * @param channelId - The id of the channel the message is in\n\t * @param messageId - The id of the message to delete the reaction for\n\t * @param emoji - The emoji to delete the reaction for\n\t * @param userId - The id of the user to delete the reaction for\n\t */\n\tpublic async deleteUserMessageReaction(channelId: Snowflake, messageId: Snowflake, emoji: string, userId: Snowflake) {\n\t\tawait this.rest.delete(Routes.channelMessageUserReaction(channelId, messageId, encodeURIComponent(emoji), userId));\n\t}\n\n\t/**\n\t * Deletes all reactions for a message\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/channel#delete-all-reactions}\n\t * @param channelId - The id of the channel the message is in\n\t * @param messageId - The id of the message to delete the reactions for\n\t */\n\tpublic async deleteAllMessageReactions(channelId: Snowflake, messageId: Snowflake) {\n\t\tawait this.rest.delete(Routes.channelMessageAllReactions(channelId, messageId));\n\t}\n\n\t/**\n\t * Deletes all reactions of an emoji for a message\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/channel#delete-all-reactions-for-emoji}\n\t * @param channelId - The id of the channel the message is in\n\t * @param messageId - The id of the message to delete the reactions for\n\t * @param emoji - The emoji to delete the reactions for\n\t */\n\tpublic async deleteAllMessageReactionsForEmoji(channelId: Snowflake, messageId: Snowflake, emoji: string) {\n\t\tawait this.rest.delete(Routes.channelMessageReaction(channelId, messageId, encodeURIComponent(emoji)));\n\t}\n\n\t/**\n\t * Adds a reaction to a message\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/channel#create-reaction}\n\t * @param channelId - The id of the channel the message is in\n\t * @param messageId - The id of the message to add the reaction to\n\t * @param emoji - The emoji to add the reaction with\n\t */\n\tpublic async addMessageReaction(channelId: Snowflake, messageId: Snowflake, emoji: string) {\n\t\tawait this.rest.put(Routes.channelMessageOwnReaction(channelId, messageId, encodeURIComponent(emoji)));\n\t}\n\n\t/**\n\t * Fetches a channel\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/channel#get-channel}\n\t * @param channelId - The id of the channel\n\t */\n\tpublic async get(channelId: Snowflake) {\n\t\treturn this.rest.get(Routes.channel(channelId)) as Promise<RESTGetAPIChannelResult>;\n\t}\n\n\t/**\n\t * Edits a channel\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/channel#modify-channel}\n\t * @param channelId - The id of the channel to edit\n\t * @param data - The new channel data\n\t */\n\tpublic async edit(channelId: Snowflake, data: RESTPatchAPIChannelJSONBody) {\n\t\treturn this.rest.patch(Routes.channel(channelId), { body: data }) as Promise<RESTPatchAPIChannelResult>;\n\t}\n\n\t/**\n\t * Deletes a channel\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/channel#deleteclose-channel}\n\t * @param channelId - The id of the channel to delete\n\t */\n\tpublic async delete(channelId: Snowflake) {\n\t\treturn this.rest.delete(Routes.channel(channelId)) as Promise<RESTDeleteAPIChannelResult>;\n\t}\n\n\t/**\n\t * Fetches the messages of a channel\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/channel#get-channel-messages}\n\t * @param channelId - The id of the channel to fetch messages from\n\t * @param options - The options to use when fetching messages\n\t */\n\tpublic async getMessages(channelId: Snowflake, options: RESTGetAPIChannelMessagesQuery = {}) {\n\t\treturn this.rest.get(Routes.channelMessages(channelId), {\n\t\t\tquery: makeURLSearchParams(options),\n\t\t}) as Promise<RESTGetAPIChannelMessagesResult>;\n\t}\n\n\t/**\n\t * Shows a typing indicator in a channel\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/channel#trigger-typing-indicator}\n\t * @param channelId - The id of the channel to show the typing indicator in\n\t */\n\tpublic async showTyping(channelId: Snowflake) {\n\t\tawait this.rest.post(Routes.channelTyping(channelId));\n\t}\n\n\t/**\n\t * Fetches the pinned messages of a channel\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/channel#get-pinned-messages}\n\t * @param channelId - The id of the channel to fetch pinned messages from\n\t */\n\tpublic async getPins(channelId: Snowflake) {\n\t\treturn this.rest.get(Routes.channelPins(channelId)) as Promise<RESTGetAPIChannelPinsResult>;\n\t}\n\n\t/**\n\t * Pins a message in a channel\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/channel#pin-message}\n\t * @param channelId - The id of the channel to pin the message in\n\t * @param messageId - The id of the message to pin\n\t * @param reason - The reason for pinning the message\n\t */\n\tpublic async pinMessage(channelId: Snowflake, messageId: Snowflake, reason?: string) {\n\t\tawait this.rest.put(Routes.channelPin(channelId, messageId), { reason });\n\t}\n\n\t/**\n\t * Deletes a message\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/channel#delete-message}\n\t * @param channelId - The id of the channel the message is in\n\t * @param messageId - The id of the message to delete\n\t * @param reason - The reason for deleting the message\n\t */\n\tpublic async deleteMessage(channelId: Snowflake, messageId: Snowflake, reason?: string) {\n\t\tawait this.rest.delete(Routes.channelMessage(channelId, messageId), { reason });\n\t}\n\n\t/**\n\t * Bulk deletes messages\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/channel#bulk-delete-messages}\n\t * @param channelId - The id of the channel the messages are in\n\t * @param messageIds - The ids of the messages to delete\n\t */\n\tpublic async bulkDeleteMessages(channelId: Snowflake, messageIds: Snowflake[], reason?: string): Promise<void> {\n\t\tawait this.rest.post(Routes.channelBulkDelete(channelId), { reason, body: { messages: messageIds } });\n\t}\n\n\t/**\n\t * Fetches a message\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/channel#get-channel-message}\n\t * @param channelId - The id of the channel the message is in\n\t * @param messageId - The id of the message to fetch\n\t */\n\tpublic async getMessage(channelId: Snowflake, messageId: Snowflake) {\n\t\treturn this.rest.get(Routes.channelMessage(channelId, messageId)) as Promise<RESTGetAPIChannelMessageResult>;\n\t}\n\n\t/**\n\t * Crossposts a message\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/channel#crosspost-message}\n\t * @param channelId - The id of the channel the message is in\n\t * @param messageId - The id of the message to crosspost\n\t */\n\tpublic async crosspostMessage(channelId: Snowflake, messageId: Snowflake) {\n\t\treturn this.rest.post(\n\t\t\tRoutes.channelMessageCrosspost(channelId, messageId),\n\t\t) as Promise<RESTPostAPIChannelMessageCrosspostResult>;\n\t}\n\n\t/**\n\t * Unpins a message in a channel\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/channel#unpin-message}\n\t * @param channelId - The id of the channel to unpin the message in\n\t * @param messageId - The id of the message to unpin\n\t * @param reason - The reason for unpinning the message\n\t */\n\tpublic async unpinMessage(channelId: Snowflake, messageId: Snowflake, reason?: string) {\n\t\tawait this.rest.delete(Routes.channelPin(channelId, messageId), { reason });\n\t}\n\n\t/**\n\t * Follows an announcement channel\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/channel#follow-announcement-channel}\n\t * @param channelId - The id of the announcement channel to follow\n\t * @param webhookChannelId - The id of the webhook channel to follow the announcements in\n\t */\n\tpublic async followAnnouncements(channelId: Snowflake, webhookChannelId: Snowflake) {\n\t\treturn this.rest.post(Routes.channelFollowers(channelId), {\n\t\t\tbody: { webhook_channel_id: webhookChannelId },\n\t\t}) as Promise<RESTPostAPIChannelFollowersResult>;\n\t}\n\n\t/**\n\t * Creates a new invite for a channel\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/channel#create-channel-invite}\n\t * @param channelId - The id of the channel to create an invite for\n\t * @param data - The data to use when creating the invite\n\t */\n\tpublic async createInvite(channelId: Snowflake, data: RESTPostAPIChannelInviteJSONBody, reason?: string) {\n\t\treturn this.rest.post(Routes.channelInvites(channelId), {\n\t\t\treason,\n\t\t\tbody: data,\n\t\t}) as Promise<RESTPostAPIChannelInviteResult>;\n\t}\n\n\t/**\n\t * Fetches the invites of a channel\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/channel#get-channel-invites}\n\t * @param channelId - The id of the channel to fetch invites from\n\t */\n\tpublic async getInvites(channelId: Snowflake) {\n\t\treturn this.rest.get(Routes.channelInvites(channelId)) as Promise<RESTGetAPIChannelInvitesResult>;\n\t}\n\n\t/**\n\t * Fetches the archived threads of a channel\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/channel#list-public-archived-threads}\n\t * @see {@link https://discord.com/developers/docs/resources/channel#list-private-archived-threads}\n\t * @param channelId - The id of the channel to fetch archived threads from\n\t * @param archivedStatus - The archived status of the threads to fetch\n\t * @param options - The options to use when fetching archived threads\n\t */\n\tpublic async getArchivedThreads(\n\t\tchannelId: Snowflake,\n\t\tarchivedStatus: 'private' | 'public',\n\t\toptions: RESTGetAPIChannelThreadsArchivedQuery = {},\n\t) {\n\t\treturn this.rest.get(Routes.channelThreads(channelId, archivedStatus), {\n\t\t\tquery: makeURLSearchParams(options),\n\t\t}) as Promise<RESTGetAPIChannelUsersThreadsArchivedResult>;\n\t}\n\n\t/**\n\t * Fetches the private joined archived threads of a channel\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/channel#list-joined-private-archived-threads}\n\t * @param channelId - The id of the channel to fetch joined archived threads from\n\t * @param options - The options to use when fetching joined archived threads\n\t */\n\tpublic async getJoinedPrivateArchivedThreads(\n\t\tchannelId: Snowflake,\n\t\toptions: RESTGetAPIChannelThreadsArchivedQuery = {},\n\t) {\n\t\treturn this.rest.get(Routes.channelJoinedArchivedThreads(channelId), {\n\t\t\tquery: makeURLSearchParams(options),\n\t\t}) as Promise<RESTGetAPIChannelUsersThreadsArchivedResult>;\n\t}\n}\n","import type { RawFile } from '@discordjs/rest';\nimport { makeURLSearchParams, type REST } from '@discordjs/rest';\nimport {\n\tRoutes,\n\ttype GuildMFALevel,\n\ttype GuildWidgetStyle,\n\ttype RESTGetAPIAuditLogQuery,\n\ttype RESTGetAPIAuditLogResult,\n\ttype RESTGetAPIAutoModerationRuleResult,\n\ttype RESTGetAPIAutoModerationRulesResult,\n\ttype RESTGetAPIGuildBansResult,\n\ttype RESTGetAPIGuildChannelsResult,\n\ttype RESTGetAPIGuildEmojiResult,\n\ttype RESTGetAPIGuildEmojisResult,\n\ttype RESTGetAPIGuildIntegrationsResult,\n\ttype RESTGetAPIGuildInvitesResult,\n\ttype RESTGetAPIGuildMemberResult,\n\ttype RESTGetAPIGuildMembersQuery,\n\ttype RESTGetAPIGuildMembersSearchResult,\n\ttype RESTGetAPIGuildPreviewResult,\n\ttype RESTGetAPIGuildPruneCountResult,\n\ttype RESTGetAPIGuildResult,\n\ttype RESTGetAPIGuildRolesResult,\n\ttype RESTGetAPIGuildScheduledEventQuery,\n\ttype RESTGetAPIGuildScheduledEventResult,\n\ttype RESTGetAPIGuildScheduledEventsQuery,\n\ttype RESTGetAPIGuildScheduledEventsResult,\n\ttype RESTGetAPIGuildScheduledEventUsersQuery,\n\ttype RESTGetAPIGuildScheduledEventUsersResult,\n\ttype RESTGetAPIGuildStickerResult,\n\ttype RESTGetAPIGuildStickersResult,\n\ttype RESTGetAPIGuildTemplatesResult,\n\ttype RESTGetAPIGuildThreadsResult,\n\ttype RESTGetAPIGuildVanityUrlResult,\n\ttype RESTGetAPIGuildVoiceRegionsResult,\n\ttype RESTGetAPIGuildPruneCountQuery,\n\ttype RESTPostAPIGuildStickerFormDataBody,\n\ttype RESTPostAPIGuildStickerResult,\n\ttype RESTGetAPIGuildMembersSearchQuery,\n\ttype RESTGetAPIGuildWelcomeScreenResult,\n\ttype RESTGetAPIGuildWidgetImageResult,\n\ttype RESTGetAPIGuildWidgetJSONResult,\n\ttype RESTGetAPITemplateResult,\n\ttype RESTPatchAPIAutoModerationRuleJSONBody,\n\ttype RESTPatchAPIGuildChannelPositionsJSONBody,\n\ttype RESTPatchAPIGuildEmojiJSONBody,\n\ttype RESTPatchAPIGuildEmojiResult,\n\ttype RESTPatchAPIGuildJSONBody,\n\ttype RESTPatchAPIGuildMemberJSONBody,\n\ttype RESTPatchAPIGuildMemberResult,\n\ttype RESTPatchAPIGuildResult,\n\ttype RESTPatchAPIGuildRoleJSONBody,\n\ttype RESTPatchAPIGuildRolePositionsJSONBody,\n\ttype RESTPatchAPIGuildRolePositionsResult,\n\ttype RESTPatchAPIGuildRoleResult,\n\ttype RESTPatchAPIGuildScheduledEventJSONBody,\n\ttype RESTPatchAPIGuildScheduledEventResult,\n\ttype RESTPatchAPIGuildStickerJSONBody,\n\ttype RESTPatchAPIGuildStickerResult,\n\ttype RESTPatchAPIGuildTemplateJSONBody,\n\ttype RESTPatchAPIGuildTemplateResult,\n\ttype RESTPatchAPIGuildVoiceStateUserJSONBody,\n\ttype RESTPatchAPIGuildWelcomeScreenJSONBody,\n\ttype RESTPatchAPIGuildWelcomeScreenResult,\n\ttype RESTPatchAPIGuildWidgetSettingsJSONBody,\n\ttype RESTPatchAPIGuildWidgetSettingsResult,\n\ttype RESTPostAPIAutoModerationRuleJSONBody,\n\ttype RESTPostAPIAutoModerationRuleResult,\n\ttype RESTPostAPIGuildChannelJSONBody,\n\ttype RESTPostAPIGuildChannelResult,\n\ttype RESTPostAPIGuildEmojiJSONBody,\n\ttype RESTPostAPIGuildEmojiResult,\n\ttype RESTPostAPIGuildPruneJSONBody,\n\ttype RESTPostAPIGuildRoleJSONBody,\n\ttype RESTPostAPIGuildRoleResult,\n\ttype RESTPostAPIGuildScheduledEventJSONBody,\n\ttype RESTPostAPIGuildScheduledEventResult,\n\ttype RESTPostAPIGuildsJSONBody,\n\ttype RESTPostAPIGuildsMFAResult,\n\ttype RESTPostAPIGuildsResult,\n\ttype RESTPostAPIGuildTemplatesResult,\n\ttype RESTPostAPITemplateCreateGuildJSONBody,\n\ttype RESTPutAPIGuildBanJSONBody,\n\ttype RESTPutAPIGuildTemplateSyncResult,\n\ttype Snowflake,\n} from 'discord-api-types/v10';\n\nexport class GuildsAPI {\n\tpublic constructor(private readonly rest: REST) {}\n\n\t/**\n\t * Fetches a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#get-guild}\n\t * @param guildId - The id of the guild\n\t */\n\tpublic async get(guildId: string) {\n\t\treturn this.rest.get(Routes.guild(guildId)) as Promise<RESTGetAPIGuildResult>;\n\t}\n\n\t/**\n\t * Fetches a guild preview\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-preview}\n\t * @param guildId - The id of the guild to fetch the preview from\n\t */\n\tpublic async getPreview(guildId: Snowflake) {\n\t\treturn this.rest.get(Routes.guildPreview(guildId)) as Promise<RESTGetAPIGuildPreviewResult>;\n\t}\n\n\t/**\n\t * Creates a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#create-guild}\n\t * @param data - The guild to create\n\t */\n\tpublic async create(data: RESTPostAPIGuildsJSONBody) {\n\t\treturn this.rest.post(Routes.guilds(), { body: data }) as Promise<RESTPostAPIGuildsResult>;\n\t}\n\n\t/**\n\t * Edits a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild}\n\t * @param guildId - The id of the guild to edit\n\t * @param data - The new guild data\n\t * @param reason - The reason for editing this guild\n\t */\n\tpublic async edit(guildId: Snowflake, data: RESTPatchAPIGuildJSONBody, reason?: string) {\n\t\treturn this.rest.patch(Routes.guild(guildId), { reason, body: data }) as Promise<RESTPatchAPIGuildResult>;\n\t}\n\n\t/**\n\t * Deletes a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#delete-guild}\n\t * @param guildId - The id of the guild to delete\n\t * @param reason - The reason for deleting this guild\n\t */\n\tpublic async delete(guildId: Snowflake, reason?: string) {\n\t\tawait this.rest.delete(Routes.guild(guildId), { reason });\n\t}\n\n\t/**\n\t * Fetches all the members of a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#list-guild-members}\n\t * @param guildId - The id of the guild\n\t * @param options - The options to use when fetching the guild members\n\t */\n\tpublic async getMembers(guildId: Snowflake, options: RESTGetAPIGuildMembersQuery = {}) {\n\t\treturn this.rest.get(Routes.guildMembers(guildId), {\n\t\t\tquery: makeURLSearchParams(options),\n\t\t}) as Promise<RESTGetAPIGuildMemberResult>;\n\t}\n\n\t/**\n\t * Fetches a guild's channels\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-channels}\n\t * @param guildId - The id of the guild to fetch the channels from\n\t */\n\tpublic async getChannels(guildId: Snowflake) {\n\t\treturn this.rest.get(Routes.guildChannels(guildId)) as Promise<RESTGetAPIGuildChannelsResult>;\n\t}\n\n\t/**\n\t * Creates a guild channel\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#create-guild-channel}\n\t * @param guildId - The id of the guild to create the channel in\n\t * @param data - The data to create the new channel\n\t * @param reason - The reason for creating this channel\n\t */\n\tpublic async createChannel(guildId: Snowflake, data: RESTPostAPIGuildChannelJSONBody, reason?: string) {\n\t\treturn this.rest.post(Routes.guildChannels(guildId), {\n\t\t\treason,\n\t\t\tbody: data,\n\t\t}) as Promise<RESTPostAPIGuildChannelResult>;\n\t}\n\n\t/**\n\t * Edits a guild channel's positions\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-channel-positions}\n\t * @param guildId - The id of the guild to edit the channel positions from\n\t * @param data - The data to edit the channel positions with\n\t * @param reason - The reason for editing the channel positions\n\t */\n\tpublic async setChannelPositions(\n\t\tguildId: Snowflake,\n\t\tdata: RESTPatchAPIGuildChannelPositionsJSONBody,\n\t\treason?: string,\n\t) {\n\t\tawait this.rest.patch(Routes.guildChannels(guildId), { reason, body: data });\n\t}\n\n\t/**\n\t * Fetches the active threads in a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#list-active-guild-threads}\n\t * @param guildId - The id of the guild to fetch the active threads from\n\t */\n\tpublic async getActiveThreads(guildId: Snowflake) {\n\t\treturn this.rest.get(Routes.guildActiveThreads(guildId)) as Promise<RESTGetAPIGuildThreadsResult>;\n\t}\n\n\t/**\n\t * Fetches a guild member ban\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-bans}\n\t * @param guildId - The id of the guild to fetch the ban from\n\t */\n\tpublic async getMemberBans(guildId: Snowflake) {\n\t\treturn this.rest.get(Routes.guildBans(guildId)) as Promise<RESTGetAPIGuildBansResult>;\n\t}\n\n\t/**\n\t * Bans a user from a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#create-guild-ban}\n\t * @param guildId - The id of the guild to ban the member in\n\t * @param userId - The id of the user to ban\n\t * @param options - Options for banning the user\n\t * @param reason - The reason for banning the user\n\t */\n\tpublic async banUser(\n\t\tguildId: Snowflake,\n\t\tuserId: Snowflake,\n\t\toptions: RESTPutAPIGuildBanJSONBody = {},\n\t\treason?: string,\n\t) {\n\t\tawait this.rest.put(Routes.guildBan(guildId, userId), { reason, body: options });\n\t}\n\n\t/**\n\t * Unbans a user from a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#remove-guild-ban}\n\t * @param guildId - The id of the guild to unban the member in\n\t * @param userId - The id of the user to unban\n\t * @param reason - The reason for unbanning the user\n\t */\n\tpublic async unbanUser(guildId: Snowflake, userId: Snowflake, reason?: string) {\n\t\tawait this.rest.delete(Routes.guildBan(guildId, userId), { reason });\n\t}\n\n\t/**\n\t * Gets all the roles in a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-roles}\n\t * @param guildId - The id of the guild to fetch the roles from\n\t */\n\tpublic async getRoles(guildId: Snowflake) {\n\t\treturn this.rest.get(Routes.guildRoles(guildId)) as Promise<RESTGetAPIGuildRolesResult>;\n\t}\n\n\t/**\n\t * Creates a guild role\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#create-guild-role}\n\t * @param guildId - The id of the guild to create the role in\n\t * @param data - The data to create the role with\n\t * @param reason - The reason for creating the role\n\t */\n\tpublic async createRole(guildId: Snowflake, data: RESTPostAPIGuildRoleJSONBody, reason?: string) {\n\t\treturn this.rest.post(Routes.guildRoles(guildId), { reason, body: data }) as Promise<RESTPostAPIGuildRoleResult>;\n\t}\n\n\t/**\n\t * Sets role positions in a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-role-positions}\n\t * @param guildId - The id of the guild to set role positions for\n\t * @param data - The data for setting a role position\n\t * @param reason - The reason for setting the role position\n\t */\n\tpublic async setRolePositions(guildId: Snowflake, data: RESTPatchAPIGuildRolePositionsJSONBody, reason?: string) {\n\t\treturn this.rest.patch(Routes.guildRoles(guildId), {\n\t\t\treason,\n\t\t\tbody: data,\n\t\t}) as Promise<RESTPatchAPIGuildRolePositionsResult>;\n\t}\n\n\t/**\n\t * Edits a guild role\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-role}\n\t * @param guildId - The id of the guild to edit the role in\n\t * @param roleId - The id of the role to edit\n\t * @param data - data for editing the role\n\t * @param reason - The reason for editing the role\n\t */\n\tpublic async editRole(guildId: Snowflake, roleId: Snowflake, data: RESTPatchAPIGuildRoleJSONBody, reason?: string) {\n\t\treturn this.rest.patch(Routes.guildRole(guildId, roleId), {\n\t\t\treason,\n\t\t\tbody: data,\n\t\t}) as Promise<RESTPatchAPIGuildRoleResult>;\n\t}\n\n\t/**\n\t * Deletes a guild role\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#delete-guild-role}\n\t * @param guildId - The id of the guild to delete the role in\n\t * @param roleId - The id of the role to delete\n\t * @param reason - The reason for deleting the role\n\t */\n\tpublic async deleteRole(guildId: Snowflake, roleId: Snowflake, reason?: string) {\n\t\tawait this.rest.delete(Routes.guildRole(guildId, roleId), { reason });\n\t}\n\n\t/**\n\t * Edits the multi-factor-authentication (MFA) level of a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-mfa-level}\n\t * @param guildId - The id of the guild to edit the MFA level for\n\t * @param level - The new MFA level\n\t * @param reason - The reason for editing the MFA level\n\t */\n\tpublic async editMFALevel(guildId: Snowflake, level: GuildMFALevel, reason?: string) {\n\t\treturn this.rest.post(Routes.guildMFA(guildId), {\n\t\t\treason,\n\t\t\tbody: { mfa_level: level },\n\t\t}) as Promise<RESTPostAPIGuildsMFAResult>;\n\t}\n\n\t/**\n\t * Fetch the number of members that can be pruned from a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-prune-count}\n\t * @param guildId - The id of the guild to fetch the number of pruned members from\n\t * @param options - The options for fetching the number of pruned members\n\t */\n\tpublic async getPruneCount(guildId: Snowflake, options: RESTGetAPIGuildPruneCountQuery = {}) {\n\t\treturn this.rest.get(Routes.guildPrune(guildId), {\n\t\t\tquery: makeURLSearchParams(options),\n\t\t}) as Promise<RESTGetAPIGuildPruneCountResult>;\n\t}\n\n\t/**\n\t * Prunes members in a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#begin-guild-prune}\n\t * @param guildId - The id of the guild to prune members in\n\t * @param options - The options for pruning members\n\t * @param reason - The reason for pruning members\n\t */\n\tpublic async beginPrune(guildId: Snowflake, options: RESTPostAPIGuildPruneJSONBody = {}, reason?: string) {\n\t\treturn this.rest.post(Routes.guildPrune(guildId), {\n\t\t\tbody: options,\n\t\t\treason,\n\t\t}) as Promise<RESTGetAPIGuildPruneCountResult>;\n\t}\n\n\t/**\n\t * Fetches voice regions for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-voice-regions}\n\t * @param guildId - The id of the guild to fetch the voice regions from\n\t */\n\tpublic async getVoiceRegions(guildId: Snowflake) {\n\t\treturn this.rest.get(Routes.guildVoiceRegions(guildId)) as Promise<RESTGetAPIGuildVoiceRegionsResult>;\n\t}\n\n\t/**\n\t * Fetches the invites for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-invites}\n\t * @param guildId - The id of the guild to fetch the invites from\n\t */\n\tpublic async getInvites(guildId: Snowflake) {\n\t\treturn this.rest.get(Routes.guildInvites(guildId)) as Promise<RESTGetAPIGuildInvitesResult>;\n\t}\n\n\t/**\n\t * Fetches the integrations for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-integrations}\n\t * @param guildId - The id of the guild to fetch the integrations from\n\t */\n\tpublic async getIntegrations(guildId: Snowflake) {\n\t\treturn this.rest.get(Routes.guildIntegrations(guildId)) as Promise<RESTGetAPIGuildIntegrationsResult>;\n\t}\n\n\t/**\n\t * Deletes an integration from a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#delete-guild-integration}\n\t * @param guildId - The id of the guild to delete the integration from\n\t * @param integrationId - The id of the integration to delete\n\t * @param reason - The reason for deleting the integration\n\t */\n\tpublic async deleteIntegration(guildId: Snowflake, integrationId: Snowflake, reason?: string) {\n\t\tawait this.rest.delete(Routes.guildIntegration(guildId, integrationId), { reason });\n\t}\n\n\t/**\n\t * Fetches the widget settings for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-widget-settings}\n\t * @param guildId - The id of the guild to fetch the widget settings from\n\t */\n\tpublic async getWidgetSettings(guildId: Snowflake) {\n\t\treturn this.rest.get(Routes.guildWidgetSettings(guildId)) as Promise<RESTGetAPIGuildWidgetImageResult>;\n\t}\n\n\t/**\n\t * Edits the widget settings for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-widget}\n\t * @param guildId - The id of the guild to edit the widget settings from\n\t * @param data - The new widget settings data\n\t * @param reason - The reason for editing the widget settings\n\t */\n\tpublic async editWidgetSettings(guildId: Snowflake, data: RESTPatchAPIGuildWidgetSettingsJSONBody, reason?: string) {\n\t\treturn this.rest.patch(Routes.guildWidgetSettings(guildId), {\n\t\t\treason,\n\t\t\tbody: data,\n\t\t}) as Promise<RESTPatchAPIGuildWidgetSettingsResult>;\n\t}\n\n\t/**\n\t * Fetches the widget for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-widget}\n\t * @param guildId - The id of the guild to fetch the widget from\n\t */\n\tpublic async getWidget(guildId: Snowflake) {\n\t\treturn this.rest.get(Routes.guildWidgetJSON(guildId)) as Promise<RESTGetAPIGuildWidgetJSONResult>;\n\t}\n\n\t/**\n\t * Fetches the vanity url for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-vanity-url}\n\t * @param guildId - The id of the guild to fetch the vanity url from\n\t */\n\tpublic async getVanityURL(guildId: Snowflake) {\n\t\treturn this.rest.get(Routes.guildVanityUrl(guildId)) as Promise<RESTGetAPIGuildVanityUrlResult>;\n\t}\n\n\t/**\n\t * Fetches the widget image for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-widget-image}\n\t * @param guildId - The id of the guild to fetch the widget image from\n\t * @param style - The style of the widget image\n\t */\n\tpublic async getWidgetImage(guildId: Snowflake, style?: GuildWidgetStyle) {\n\t\treturn this.rest.get(Routes.guildWidgetImage(guildId), {\n\t\t\tquery: makeURLSearchParams({ style }),\n\t\t}) as Promise<RESTGetAPIGuildWidgetImageResult>;\n\t}\n\n\t/**\n\t * Fetches the welcome screen for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-welcome-screen}\n\t * @param guildId - The id of the guild to fetch the welcome screen from\n\t */\n\tpublic async getWelcomeScreen(guildId: Snowflake) {\n\t\treturn this.rest.get(Routes.guildWelcomeScreen(guildId)) as Promise<RESTGetAPIGuildWelcomeScreenResult>;\n\t}\n\n\t/**\n\t * Edits the welcome screen for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-welcome-screen}\n\t * @param guildId - The id of the guild to edit the welcome screen for\n\t * @param data - The new welcome screen data\n\t * @param reason - The reason for editing the welcome screen\n\t */\n\tpublic async editWelcomeScreen(guildId: Snowflake, data?: RESTPatchAPIGuildWelcomeScreenJSONBody, reason?: string) {\n\t\treturn this.rest.patch(Routes.guildWelcomeScreen(guildId), {\n\t\t\treason,\n\t\t\tbody: data,\n\t\t}) as Promise<RESTPatchAPIGuildWelcomeScreenResult>;\n\t}\n\n\t/**\n\t * Edits a user's voice state in a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#modify-user-voice-state}\n\t * @param guildId - The id of the guild to edit the current user's voice state in\n\t * @param userId - The id of the user to edit the voice state for\n\t * @param data - The data for editing the voice state\n\t * @param reason - The reason for editing the voice state\n\t */\n\tpublic async editUserVoiceState(\n\t\tguildId: Snowflake,\n\t\tuserId: Snowflake,\n\t\tdata: RESTPatchAPIGuildVoiceStateUserJSONBody,\n\t\treason?: string,\n\t) {\n\t\tawait this.rest.patch(Routes.guildVoiceState(guildId, userId), { reason, body: data });\n\t}\n\n\t/**\n\t * Fetches all emojis for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/emoji#list-guild-emojis}\n\t * @param guildId - The id of the guild to fetch the emojis from\n\t */\n\tpublic async getEmojis(guildId: Snowflake) {\n\t\treturn this.rest.get(Routes.guildEmojis(guildId)) as Promise<RESTGetAPIGuildEmojisResult>;\n\t}\n\n\t/**\n\t * Fetches an emoji for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/emoji#get-guild-emoji}\n\t * @param guildId - The id of the guild to fetch the emoji from\n\t * @param emojiId - The id of the emoji to fetch\n\t */\n\tpublic async getEmoji(guildId: Snowflake, emojiId: Snowflake) {\n\t\treturn this.rest.get(Routes.guildEmoji(guildId, emojiId)) as Promise<RESTGetAPIGuildEmojiResult>;\n\t}\n\n\t/**\n\t * Creates a new emoji for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/emoji#create-guild-emoji}\n\t * @param guildId - The id of the guild to create the emoji from\n\t * @param data - The data for creating the emoji\n\t * @param reason - The reason for creating the emoji\n\t */\n\tpublic async createEmoji(guildId: Snowflake, data: RESTPostAPIGuildEmojiJSONBody, reason?: string) {\n\t\treturn this.rest.post(Routes.guildEmojis(guildId), {\n\t\t\treason,\n\t\t\tbody: data,\n\t\t}) as Promise<RESTPostAPIGuildEmojiResult>;\n\t}\n\n\t/**\n\t * Edits an emoji for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/emoji#modify-guild-emoji}\n\t * @param guildId - The id of the guild to edit the emoji from\n\t * @param emojiId - The id of the emoji to edit\n\t * @param data - The data for editing the emoji\n\t * @param reason - The reason for editing the emoji\n\t */\n\tpublic async editEmoji(\n\t\tguildId: Snowflake,\n\t\temojiId: Snowflake,\n\t\tdata: RESTPatchAPIGuildEmojiJSONBody,\n\t\treason?: string,\n\t) {\n\t\treturn this.rest.patch(Routes.guildEmoji(guildId, emojiId), {\n\t\t\treason,\n\t\t\tbody: data,\n\t\t}) as Promise<RESTPatchAPIGuildEmojiResult>;\n\t}\n\n\t/**\n\t * Deletes an emoji for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/emoji#delete-guild-emoji}\n\t * @param guildId - The id of the guild to delete the emoji from\n\t * @param emojiId - The id of the emoji to delete\n\t * @param reason - The reason for deleting the emoji\n\t */\n\tpublic async deleteEmoji(guildId: Snowflake, emojiId: Snowflake, reason?: string) {\n\t\tawait this.rest.delete(Routes.guildEmoji(guildId, emojiId), { reason });\n\t}\n\n\t/**\n\t * Fetches all scheduled events for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#list-scheduled-events-for-guild}\n\t * @param guildId - The id of the guild to fetch the scheduled events from\n\t * @param options - The options for fetching the scheduled events\n\t */\n\tpublic async getScheduledEvents(guildId: Snowflake, options: RESTGetAPIGuildScheduledEventsQuery = {}) {\n\t\treturn this.rest.get(Routes.guildScheduledEvents(guildId), {\n\t\t\tquery: makeURLSearchParams(options),\n\t\t}) as Promise<RESTGetAPIGuildScheduledEventsResult>;\n\t}\n\n\t/**\n\t * Creates a new scheduled event for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#create-guild-scheduled-event}\n\t * @param guildId - The id of the guild to create the scheduled event from\n\t * @param data - The data to create the event with\n\t * @param reason - The reason for creating the scheduled event\n\t */\n\tpublic async createScheduledEvent(guildId: Snowflake, data: RESTPostAPIGuildScheduledEventJSONBody, reason?: string) {\n\t\treturn this.rest.post(Routes.guildScheduledEvents(guildId), {\n\t\t\treason,\n\t\t\tbody: data,\n\t\t}) as Promise<RESTPostAPIGuildScheduledEventResult>;\n\t}\n\n\t/**\n\t * Fetches a scheduled event for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#get-guild-scheduled-event}\n\t * @param guildId - The id of the guild to fetch the scheduled event from\n\t * @param eventId - The id of the scheduled event to fetch\n\t * @param options - The options for fetching the scheduled event\n\t */\n\tpublic async getScheduledEvent(\n\t\tguildId: Snowflake,\n\t\teventId: Snowflake,\n\t\toptions: RESTGetAPIGuildScheduledEventQuery = {},\n\t) {\n\t\treturn this.rest.get(Routes.guildScheduledEvent(guildId, eventId), {\n\t\t\tquery: makeURLSearchParams(options),\n\t\t}) as Promise<RESTGetAPIGuildScheduledEventResult>;\n\t}\n\n\t/**\n\t * Edits a scheduled event for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#modify-guild-scheduled-event}\n\t * @param guildId - The id of the guild to edit the scheduled event from\n\t * @param eventId - The id of the scheduled event to edit\n\t * @param data - The new event data\n\t * @param reason - The reason for editing the scheduled event\n\t */\n\tpublic async editScheduledEvent(\n\t\tguildId: Snowflake,\n\t\teventId: Snowflake,\n\t\tdata: RESTPatchAPIGuildScheduledEventJSONBody,\n\t\treason?: string,\n\t) {\n\t\treturn this.rest.patch(Routes.guildScheduledEvent(guildId, eventId), {\n\t\t\treason,\n\t\t\tbody: data,\n\t\t}) as Promise<RESTPatchAPIGuildScheduledEventResult>;\n\t}\n\n\t/**\n\t * Deletes a scheduled event for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#delete-guild-scheduled-event}\n\t * @param guildId - The id of the guild to delete the scheduled event from\n\t * @param eventId - The id of the scheduled event to delete\n\t * @param reason - The reason for deleting the scheduled event\n\t */\n\tpublic async deleteScheduledEvent(guildId: Snowflake, eventId: Snowflake, reason?: string) {\n\t\tawait this.rest.delete(Routes.guildScheduledEvent(guildId, eventId), { reason });\n\t}\n\n\t/**\n\t * Gets all users that are interested in a scheduled event\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild-scheduled-event#get-guild-scheduled-event-users}\n\t * @param guildId - The id of the guild to fetch the scheduled event users from\n\t * @param eventId - The id of the scheduled event to fetch the users for\n\t * @param options - The options for fetching the scheduled event users\n\t */\n\tpublic async getScheduledEventUsers(\n\t\tguildId: Snowflake,\n\t\teventId: Snowflake,\n\t\toptions: RESTGetAPIGuildScheduledEventUsersQuery = {},\n\t) {\n\t\treturn this.rest.get(Routes.guildScheduledEventUsers(guildId, eventId), {\n\t\t\tquery: makeURLSearchParams(options),\n\t\t}) as Promise<RESTGetAPIGuildScheduledEventUsersResult>;\n\t}\n\n\t/**\n\t * Fetches all the templates for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild-template#get-guild-templates}\n\t * @param guildId - The id of the guild to fetch the templates from\n\t */\n\tpublic async getTemplates(guildId: Snowflake) {\n\t\treturn this.rest.get(Routes.guildTemplates(guildId)) as Promise<RESTGetAPIGuildTemplatesResult>;\n\t}\n\n\t/**\n\t * Syncs a template for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild-template#sync-guild-template}\n\t * @param guildId - The id of the guild to sync the template from\n\t * @param templateCode - The code of the template to sync\n\t */\n\tpublic async syncTemplate(guildId: Snowflake, templateCode: string) {\n\t\treturn this.rest.put(Routes.guildTemplate(guildId, templateCode)) as Promise<RESTPutAPIGuildTemplateSyncResult>;\n\t}\n\n\t/**\n\t * Edits a template for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild-template#modify-guild-template}\n\t * @param guildId - The id of the guild to edit the template from\n\t * @param templateCode - The code of the template to edit\n\t * @param data - The data for editing the template\n\t */\n\tpublic async editTemplate(guildId: Snowflake, templateCode: string, data: RESTPatchAPIGuildTemplateJSONBody) {\n\t\treturn this.rest.patch(Routes.guildTemplate(guildId, templateCode), {\n\t\t\tbody: data,\n\t\t}) as Promise<RESTPatchAPIGuildTemplateResult>;\n\t}\n\n\t/**\n\t * Deletes a template for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild-template#delete-guild-template}\n\t * @param guildId - The id of the guild to delete the template from\n\t * @param templateCode - The code of the template to delete\n\t */\n\tpublic async deleteTemplate(guildId: Snowflake, templateCode: string) {\n\t\tawait this.rest.delete(Routes.guildTemplate(guildId, templateCode));\n\t}\n\n\t/**\n\t * Fetches all the stickers for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/sticker#list-guild-stickers}\n\t * @param guildId - The id of the guild to fetch the stickers from\n\t */\n\tpublic async getStickers(guildId: Snowflake) {\n\t\treturn this.rest.get(Routes.guildStickers(guildId)) as Promise<RESTGetAPIGuildStickersResult>;\n\t}\n\n\t/**\n\t * Fetches a sticker for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/sticker#get-guild-sticker}\n\t * @param guildId - The id of the guild to fetch the sticker from\n\t * @param stickerId - The id of the sticker to fetch\n\t */\n\tpublic async getSticker(guildId: Snowflake, stickerId: Snowflake) {\n\t\treturn this.rest.get(Routes.guildSticker(guildId, stickerId)) as Promise<RESTGetAPIGuildStickerResult>;\n\t}\n\n\t/**\n\t * Creates a sticker for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/sticker#create-guild-sticker}\n\t * @param guildId - The id of the guild to create the sticker for\n\t * @param data - The data for creating the sticker\n\t * @param reason - The reason for creating the sticker\n\t */\n\tpublic async createSticker(\n\t\tguildId: Snowflake,\n\t\t{ file, ...body }: Omit<RESTPostAPIGuildStickerFormDataBody, 'file'> & { file: RawFile },\n\t\treason?: string,\n\t) {\n\t\tconst fileData = { ...file, key: 'file' };\n\n\t\treturn this.rest.post(Routes.guildStickers(guildId), {\n\t\t\tappendToFormData: true,\n\t\t\tbody,\n\t\t\tfiles: [fileData],\n\t\t\treason,\n\t\t}) as Promise<RESTPostAPIGuildStickerResult>;\n\t}\n\n\t/**\n\t * Edits a sticker for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/sticker#modify-guild-sticker}\n\t * @param guildId - The id of the guild to edit the sticker from\n\t * @param stickerId - The id of the sticker to edit\n\t * @param data - The data for editing the sticker\n\t * @param reason - The reason for editing the sticker\n\t */\n\tpublic async editSticker(\n\t\tguildId: Snowflake,\n\t\tstickerId: Snowflake,\n\t\tdata: RESTPatchAPIGuildStickerJSONBody,\n\t\treason?: string,\n\t) {\n\t\treturn this.rest.patch(Routes.guildSticker(guildId, stickerId), {\n\t\t\treason,\n\t\t\tbody: data,\n\t\t}) as Promise<RESTPatchAPIGuildStickerResult>;\n\t}\n\n\t/**\n\t * Deletes a sticker for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/sticker#delete-guild-sticker}\n\t * @param guildId - The id of the guild to delete the sticker from\n\t * @param stickerId - The id of the sticker to delete\n\t * @param reason - The reason for deleting the sticker\n\t */\n\tpublic async deleteSticker(guildId: Snowflake, stickerId: Snowflake, reason?: string) {\n\t\tawait this.rest.delete(Routes.guildSticker(guildId, stickerId), { reason });\n\t}\n\n\t/**\n\t * Fetches the audit logs for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/audit-log#get-guild-audit-log}\n\t * @param guildId - The id of the guild to fetch the audit logs from\n\t * @param options - The options for fetching the audit logs\n\t */\n\tpublic async getAuditLogs(guildId: Snowflake, options: RESTGetAPIAuditLogQuery = {}) {\n\t\treturn this.rest.get(Routes.guildAuditLog(guildId), {\n\t\t\tquery: makeURLSearchParams(options),\n\t\t}) as Promise<RESTGetAPIAuditLogResult>;\n\t}\n\n\t/**\n\t * Fetches all auto moderation rules for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/auto-moderation#list-auto-moderation-rules-for-guild}\n\t * @param guildId - The id of the guild to fetch the auto moderation rules from\n\t */\n\tpublic async getAutoModerationRules(guildId: Snowflake) {\n\t\treturn this.rest.get(Routes.guildAutoModerationRules(guildId)) as Promise<RESTGetAPIAutoModerationRulesResult>;\n\t}\n\n\t/**\n\t * Fetches an auto moderation rule for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/auto-moderation#get-auto-moderation-rule}\n\t * @param guildId - The id of the guild to fetch the auto moderation rule from\n\t * @param ruleId - The id of the auto moderation rule to fetch\n\t */\n\tpublic async getAutoModerationRule(guildId: Snowflake, ruleId: Snowflake) {\n\t\treturn this.rest.get(\n\t\t\tRoutes.guildAutoModerationRule(guildId, ruleId),\n\t\t) as Promise<RESTGetAPIAutoModerationRuleResult>;\n\t}\n\n\t/**\n\t * Creates a new auto moderation rule for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/auto-moderation#create-auto-moderation-rule}\n\t * @param guildId - The id of the guild to create the auto moderation rule from\n\t * @param data - The data for creating the auto moderation rule\n\t */\n\tpublic async createAutoModerationRule(\n\t\tguildId: Snowflake,\n\t\tdata: RESTPostAPIAutoModerationRuleJSONBody,\n\t\treason?: string,\n\t) {\n\t\treturn this.rest.post(Routes.guildAutoModerationRules(guildId), {\n\t\t\treason,\n\t\t\tbody: data,\n\t\t}) as Promise<RESTPostAPIAutoModerationRuleResult>;\n\t}\n\n\t/**\n\t * Edits an auto moderation rule for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/auto-moderation#modify-auto-moderation-rule}\n\t * @param guildId - The id of the guild to edit the auto moderation rule from\n\t * @param ruleId - The id of the auto moderation rule to edit\n\t * @param data - The data for editing the auto moderation rule\n\t * @param reason - The reason for editing the auto moderation rule\n\t */\n\tpublic async editAutoModerationRule(\n\t\tguildId: Snowflake,\n\t\truleId: Snowflake,\n\t\tdata: RESTPatchAPIAutoModerationRuleJSONBody,\n\t\treason?: string,\n\t) {\n\t\treturn this.rest.patch(Routes.guildAutoModerationRule(guildId, ruleId), {\n\t\t\treason,\n\t\t\tbody: data,\n\t\t}) as Promise<RESTPatchAPIAutoModerationRuleJSONBody>;\n\t}\n\n\t/**\n\t * Deletes an auto moderation rule for a guild\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/auto-moderation#delete-auto-moderation-rule}\n\t * @param guildId - The id of the guild to delete the auto moderation rule from\n\t * @param ruleId - The id of the auto moderation rule to delete\n\t * @param reason - The reason for deleting the auto moderation rule\n\t */\n\tpublic async deleteAutoModerationRule(guildId: Snowflake, ruleId: Snowflake, reason?: string) {\n\t\tawait this.rest.delete(Routes.guildAutoModerationRule(guildId, ruleId), { reason });\n\t}\n\n\t/**\n\t * Fetches a guild member\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#get-guild-member}\n\t * @param guildId - The id of the guild\n\t * @param userId - The id of the user\n\t */\n\tpublic async getMember(guildId: Snowflake, userId: Snowflake) {\n\t\treturn this.rest.get(Routes.guildMember(guildId, userId)) as Promise<RESTGetAPIGuildMemberResult>;\n\t}\n\n\t/**\n\t * Searches for guild members\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#search-guild-members}\n\t * @param guildId - The id of the guild to search in\n\t * @param query - The query to search for\n\t * @param limit - The maximum number of members to return\n\t */\n\tpublic async searchForMembers(guildId: Snowflake, options: RESTGetAPIGuildMembersSearchQuery) {\n\t\treturn this.rest.get(Routes.guildMembersSearch(guildId), {\n\t\t\tquery: makeURLSearchParams(options),\n\t\t}) as Promise<RESTGetAPIGuildMembersSearchResult>;\n\t}\n\n\t/**\n\t * Edits a guild member\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#modify-guild-member}\n\t * @param guildId - The id of the guild\n\t * @param userId - The id of the user\n\t * @param data - The data to use when editing the guild member\n\t * @param reason - The reason for editing this guild member\n\t */\n\tpublic async editMember(\n\t\tguildId: Snowflake,\n\t\tuserId: Snowflake,\n\t\tdata: RESTPatchAPIGuildMemberJSONBody = {},\n\t\treason?: string,\n\t) {\n\t\treturn this.rest.patch(Routes.guildMember(guildId, userId), {\n\t\t\treason,\n\t\t\tbody: data,\n\t\t}) as Promise<RESTPatchAPIGuildMemberResult>;\n\t}\n\n\t/**\n\t * Adds a role to a guild member\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#add-guild-member-role}\n\t * @param guildId - The id of the guild\n\t * @param userId - The id of the user\n\t * @param roleId - The id of the role\n\t * @param reason - The reason for adding this role to the guild member\n\t */\n\tpublic async addRoleToMember(guildId: Snowflake, userId: Snowflake, roleId: Snowflake, reason?: string) {\n\t\tawait this.rest.put(Routes.guildMemberRole(guildId, userId, roleId), { reason });\n\t}\n\n\t/**\n\t * Removes a role from a guild member\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#remove-guild-member-role}\n\t * @param guildId - The id of the guild\n\t * @param userId - The id of the user\n\t * @param roleId - The id of the role\n\t * @param reason - The reason for removing this role from the guild member\n\t */\n\tpublic async removeRoleFromMember(guildId: Snowflake, userId: Snowflake, roleId: Snowflake, reason?: string) {\n\t\tawait this.rest.delete(Routes.guildMemberRole(guildId, userId, roleId), { reason });\n\t}\n\n\t/**\n\t * Fetches a guild template\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild-template#get-guild-template}\n\t * @param templateCode - The code of the template\n\t */\n\tpublic async getTemplate(templateCode: string) {\n\t\treturn this.rest.get(Routes.template(templateCode)) as Promise<RESTGetAPITemplateResult>;\n\t}\n\n\t/**\n\t * Creates a new template\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild-template#create-guild-template}\n\t * @param templateCode - The code of the template\n\t * @param data - The data to use when creating the template\n\t */\n\tpublic async createTemplate(templateCode: string, data: RESTPostAPITemplateCreateGuildJSONBody) {\n\t\treturn this.rest.post(Routes.template(templateCode), { body: data }) as Promise<RESTPostAPIGuildTemplatesResult>;\n\t}\n}\n","import type { RawFile, REST } from '@discordjs/rest';\nimport type { Snowflake } from 'discord-api-types/v10';\nimport {\n\tInteractionResponseType,\n\tRoutes,\n\ttype APICommandAutocompleteInteractionResponseCallbackData,\n\ttype APIInteractionResponseCallbackData,\n\ttype APIModalInteractionResponseCallbackData,\n\ttype RESTGetAPIWebhookWithTokenMessageResult,\n} from 'discord-api-types/v10';\nimport type { WebhooksAPI } from './webhook.js';\n\nexport class InteractionsAPI {\n\tpublic constructor(private readonly rest: REST, private readonly webhooks: WebhooksAPI) {}\n\n\t/**\n\t * Replies to an interaction\n\t *\n\t * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}\n\t * @param interactionId - The id of the interaction\n\t * @param interactionToken - The token of the interaction\n\t * @param data - The data to use when replying\n\t */\n\tpublic async reply(\n\t\tinteractionId: Snowflake,\n\t\tinteractionToken: string,\n\t\t{ files, ...data }: APIInteractionResponseCallbackData & { files?: RawFile[] },\n\t) {\n\t\tawait this.rest.post(Routes.interactionCallback(interactionId, interactionToken), {\n\t\t\tfiles,\n\t\t\tbody: {\n\t\t\t\ttype: InteractionResponseType.ChannelMessageWithSource,\n\t\t\t\tdata,\n\t\t\t},\n\t\t});\n\t}\n\n\t/**\n\t * Defers the reply to an interaction\n\t *\n\t * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}\n\t * @param interactionId - The id of the interaction\n\t * @param interactionToken - The token of the interaction\n\t */\n\tpublic async defer(interactionId: Snowflake, interactionToken: string) {\n\t\tawait this.rest.post(Routes.interactionCallback(interactionId, interactionToken), {\n\t\t\tbody: {\n\t\t\t\ttype: InteractionResponseType.DeferredChannelMessageWithSource,\n\t\t\t},\n\t\t});\n\t}\n\n\t/**\n\t * Defers an update from a message component interaction\n\t *\n\t * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}\n\t * @param interactionId - The id of the interaction\n\t * @param interactionToken - The token of the interaction\n\t */\n\tpublic async deferMessageUpdate(interactionId: Snowflake, interactionToken: string) {\n\t\tawait this.rest.post(Routes.interactionCallback(interactionId, interactionToken), {\n\t\t\tbody: {\n\t\t\t\ttype: InteractionResponseType.DeferredMessageUpdate,\n\t\t\t},\n\t\t});\n\t}\n\n\t/**\n\t * Reply to a deferred interaction\n\t *\n\t * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-followup-message}\n\t * @param applicationId - The application id of the interaction\n\t * @param interactionToken - The token of the interaction\n\t * @param data - The data to use when replying\n\t */\n\tpublic async followUp(\n\t\tapplicationId: Snowflake,\n\t\tinteractionToken: string,\n\t\tdata: APIInteractionResponseCallbackData & { files?: RawFile[] },\n\t) {\n\t\tawait this.webhooks.execute(applicationId, interactionToken, data);\n\t}\n\n\t/**\n\t * Edits the initial reply to an interaction\n\t *\n\t * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#edit-original-interaction-response}\n\t * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#edit-followup-message}\n\t * @param applicationId - The application id of the interaction\n\t * @param interactionToken - The token of the interaction\n\t * @param data - The data to use when editing the reply\n\t * @param messageId - The id of the message to edit. If omitted, the original reply will be edited\n\t */\n\tpublic async editReply(\n\t\tapplicationId: Snowflake,\n\t\tinteractionToken: string,\n\t\tdata: APIInteractionResponseCallbackData & { files?: RawFile[] },\n\t\tmessageId?: Snowflake | '@original',\n\t) {\n\t\treturn this.webhooks.editMessage(applicationId, interactionToken, messageId ?? '@original', data);\n\t}\n\n\t/**\n\t * Fetches the initial reply to an interaction\n\t *\n\t * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#get-original-interaction-response}\n\t * @param applicationId - The application id of the interaction\n\t * @param interactionToken - The token of the interaction\n\t */\n\tpublic async getOriginalReply(applicationId: Snowflake, interactionToken: string) {\n\t\treturn this.webhooks.getMessage(\n\t\t\tapplicationId,\n\t\t\tinteractionToken,\n\t\t\t'@original',\n\t\t) as Promise<RESTGetAPIWebhookWithTokenMessageResult>;\n\t}\n\n\t/**\n\t * Deletes the initial reply to an interaction\n\t *\n\t * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#delete-original-interaction-response}\n\t * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#delete-followup-message}\n\t * @param applicationId - The application id of the interaction\n\t * @param interactionToken - The token of the interaction\n\t * @param messageId - The id of the message to delete. If omitted, the original reply will be deleted\n\t */\n\tpublic async deleteReply(applicationId: Snowflake, interactionToken: string, messageId?: Snowflake | '@original') {\n\t\tawait this.webhooks.deleteMessage(applicationId, interactionToken, messageId ?? '@original');\n\t}\n\n\t/**\n\t * Updates the the message the component interaction was triggered on\n\t *\n\t * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}\n\t * @param interactionId - The id of the interaction\n\t * @param interactionToken - The token of the interaction\n\t * @param data - The data to use when updating the interaction\n\t */\n\tpublic async updateMessage(\n\t\tinteractionId: Snowflake,\n\t\tinteractionToken: string,\n\t\t{ files, ...data }: APIInteractionResponseCallbackData & { files?: RawFile[] },\n\t) {\n\t\tawait this.rest.post(Routes.interactionCallback(interactionId, interactionToken), {\n\t\t\tfiles,\n\t\t\tbody: {\n\t\t\t\ttype: InteractionResponseType.UpdateMessage,\n\t\t\t\tdata,\n\t\t\t},\n\t\t});\n\t}\n\n\t/**\n\t * Sends an autocomplete response to an interaction\n\t *\n\t * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}\n\t * @param interactionId - The id of the interaction\n\t * @param interactionToken - The token of the interaction\n\t * @param data - Data for the autocomplete response\n\t */\n\tpublic async createAutocompleteResponse(\n\t\tinteractionId: Snowflake,\n\t\tinteractionToken: string,\n\t\tdata: APICommandAutocompleteInteractionResponseCallbackData,\n\t) {\n\t\tawait this.rest.post(Routes.interactionCallback(interactionId, interactionToken), {\n\t\t\tbody: {\n\t\t\t\ttype: InteractionResponseType.ApplicationCommandAutocompleteResult,\n\t\t\t\tdata,\n\t\t\t},\n\t\t});\n\t}\n\n\t/**\n\t * Sends a modal response to an interaction\n\t *\n\t * @see {@link https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response}\n\t * @param interactionId - The id of the interaction\n\t * @param interactionToken - The token of the interaction\n\t * @param data - The modal to send\n\t */\n\tpublic async createModal(\n\t\tinteractionId: Snowflake,\n\t\tinteractionToken: string,\n\t\tdata: APIModalInteractionResponseCallbackData,\n\t) {\n\t\tawait this.rest.post(Routes.interactionCallback(interactionId, interactionToken), {\n\t\t\tbody: {\n\t\t\t\ttype: InteractionResponseType.Modal,\n\t\t\t\tdata,\n\t\t\t},\n\t\t});\n\t}\n}\n","import { makeURLSearchParams, type REST } from '@discordjs/rest';\nimport { Routes, type RESTGetAPIInviteQuery, type RESTGetAPIInviteResult } from 'discord-api-types/v10';\n\nexport class InvitesAPI {\n\tpublic constructor(private readonly rest: REST) {}\n\n\t/**\n\t * Fetches an invite\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/invite#get-invite}\n\t * @param code - The invite code\n\t */\n\tpublic async get(code: string, options: RESTGetAPIInviteQuery = {}) {\n\t\treturn this.rest.get(Routes.invite(code), {\n\t\t\tquery: makeURLSearchParams(options),\n\t\t}) as Promise<RESTGetAPIInviteResult>;\n\t}\n\n\t/**\n\t * Deletes an invite\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/invite#delete-invite}\n\t * @param code - The invite code\n\t * @param reason - The reason for deleting the invite\n\t */\n\tpublic async delete(code: string, reason?: string) {\n\t\tawait this.rest.delete(Routes.invite(code), { reason });\n\t}\n}\n","import { URL } from 'node:url';\nimport type { REST } from '@discordjs/rest';\nimport { makeURLSearchParams } from '@discordjs/rest';\nimport {\n\tRoutes,\n\tRouteBases,\n\ttype RESTOAuth2AuthorizationQuery,\n\ttype RESTPostOAuth2RefreshTokenURLEncodedData,\n\ttype RESTPostOAuth2RefreshTokenResult,\n\ttype RESTPostOAuth2ClientCredentialsURLEncodedData,\n\ttype RESTPostOAuth2ClientCredentialsResult,\n\ttype RESTGetAPIOAuth2CurrentAuthorizationResult,\n\ttype RESTGetAPIOAuth2CurrentApplicationResult,\n\ttype RESTPostOAuth2AccessTokenURLEncodedData,\n\ttype RESTPostOAuth2AccessTokenResult,\n} from 'discord-api-types/v10';\n\nexport class OAuth2API {\n\tpublic constructor(private readonly rest: REST) {}\n\n\t/**\n\t * Creates an OAuth2 authorization URL given the options\n\t *\n\t * @see {@link https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-authorization-url-example}\n\t * @param options - The options for creating the authorization URL\n\t */\n\tpublic generateAuthorizationURL(options: RESTOAuth2AuthorizationQuery) {\n\t\tconst url = new URL(`${RouteBases.api}${Routes.oauth2Authorization()}`);\n\t\turl.search = makeURLSearchParams(options).toString();\n\t\treturn url.toString();\n\t}\n\n\t/**\n\t * Performs an OAuth2 token exchange, giving you an access token\n\t *\n\t * @see {@link https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-access-token-exchange-example}\n\t * @param options - The options for the token exchange request\n\t */\n\tpublic async tokenExchange(options: RESTPostOAuth2AccessTokenURLEncodedData) {\n\t\treturn this.rest.post(Routes.oauth2TokenExchange(), {\n\t\t\tbody: makeURLSearchParams(options),\n\t\t\theaders: {\n\t\t\t\t'Content-Type': 'application/x-www-form-urlencoded',\n\t\t\t},\n\t\t}) as Promise<RESTPostOAuth2AccessTokenResult>;\n\t}\n\n\t/**\n\t * Refreshes an OAuth2 access token, giving you a new one\n\t *\n\t * @see {@link https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-refresh-token-exchange-example}\n\t * @param options - The options for the refresh token request\n\t */\n\tpublic async refreshToken(options: RESTPostOAuth2RefreshTokenURLEncodedData) {\n\t\treturn this.rest.post(Routes.oauth2TokenExchange(), {\n\t\t\tbody: makeURLSearchParams(options),\n\t\t\theaders: {\n\t\t\t\t'Content-Type': 'application/x-www-form-urlencoded',\n\t\t\t},\n\t\t}) as Promise<RESTPostOAuth2RefreshTokenResult>;\n\t}\n\n\t/**\n\t * Fetches the bearer token for the current application\n\t *\n\t * @remarks\n\t * This is primarily used for testing purposes\n\t * @see {@link https://discord.com/developers/docs/topics/oauth2#client-credentials-grant}\n\t * @param options - The options for the client credentials grant request\n\t */\n\tpublic async getToken(options: RESTPostOAuth2ClientCredentialsURLEncodedData) {\n\t\treturn this.rest.post(Routes.oauth2TokenExchange(), {\n\t\t\tbody: makeURLSearchParams(options),\n\t\t\theaders: {\n\t\t\t\t'Content-Type': 'application/x-www-form-urlencoded',\n\t\t\t},\n\t\t}) as Promise<RESTPostOAuth2ClientCredentialsResult>;\n\t}\n\n\t/**\n\t * Fetches the current bot's application information\n\t *\n\t * @see {@link https://discord.com/developers/docs/topics/oauth2#get-current-bot-application-information}\n\t */\n\tpublic async getCurrentBotApplicationInformation() {\n\t\treturn this.rest.get(Routes.oauth2CurrentApplication()) as Promise<RESTGetAPIOAuth2CurrentApplicationResult>;\n\t}\n\n\t/**\n\t * Fetches the current authorization information\n\t *\n\t * @see {@link https://discord.com/developers/docs/topics/oauth2#get-current-authorization-information}\n\t */\n\tpublic async getCurrentAuthorizationInformation() {\n\t\treturn this.rest.get(Routes.oauth2CurrentAuthorization()) as Promise<RESTGetAPIOAuth2CurrentAuthorizationResult>;\n\t}\n}\n","import type { REST } from '@discordjs/rest';\nimport {\n\tRoutes,\n\ttype RESTGetAPIApplicationRoleConnectionMetadataResult,\n\ttype RESTPutAPIApplicationRoleConnectionMetadataResult,\n\ttype RESTPutAPIApplicationCommandPermissionsJSONBody,\n\ttype Snowflake,\n} from 'discord-api-types/v10';\n\nexport class RoleConnectionsAPI {\n\tpublic constructor(private readonly rest: REST) {}\n\n\t/**\n\t * Gets the role connection metadata records for the application\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/application-role-connection-metadata#get-application-role-connection-metadata-records}\n\t * @param applicationId - The id of the application to get role connection metadata records for\n\t */\n\tpublic async getMetadataRecords(applicationId: Snowflake) {\n\t\treturn this.rest.get(\n\t\t\tRoutes.applicationRoleConnectionMetadata(applicationId),\n\t\t) as Promise<RESTGetAPIApplicationRoleConnectionMetadataResult>;\n\t}\n\n\t/**\n\t * Updates the role connection metadata records for the application\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/application-role-connection-metadata#update-application-role-connection-metadata-records}\n\t * @param applicationId - The id of the application to update role connection metadata records for\n\t * @param options - The new role connection metadata records\n\t */\n\tpublic async updateMetadataRecords(\n\t\tapplicationId: Snowflake,\n\t\toptions: RESTPutAPIApplicationCommandPermissionsJSONBody,\n\t) {\n\t\treturn this.rest.put(Routes.applicationRoleConnectionMetadata(applicationId), {\n\t\t\tbody: options,\n\t\t}) as Promise<RESTPutAPIApplicationRoleConnectionMetadataResult>;\n\t}\n}\n","import type { REST } from '@discordjs/rest';\nimport {\n\tRoutes,\n\ttype RESTGetAPIStickerResult,\n\ttype RESTGetNitroStickerPacksResult,\n\ttype Snowflake,\n} from 'discord-api-types/v10';\n\nexport class StickersAPI {\n\tpublic constructor(private readonly rest: REST) {}\n\n\t/**\n\t * Fetches all of the nitro sticker packs\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/sticker#list-nitro-sticker-packs}\n\t */\n\tpublic async getNitroStickers() {\n\t\treturn this.rest.get(Routes.nitroStickerPacks()) as Promise<RESTGetNitroStickerPacksResult>;\n\t}\n\n\t/**\n\t * Fetches a sticker\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/sticker#get-sticker}\n\t * @param stickerId - The id of the sticker\n\t */\n\tpublic async get(stickerId: Snowflake) {\n\t\treturn this.rest.get(Routes.sticker(stickerId)) as Promise<RESTGetAPIStickerResult>;\n\t}\n}\n","import type { RawFile, REST } from '@discordjs/rest';\nimport {\n\tRoutes,\n\ttype APIThreadChannel,\n\ttype APIThreadMember,\n\ttype RESTGetAPIChannelThreadMembersResult,\n\ttype RESTPostAPIChannelThreadsJSONBody,\n\ttype RESTPostAPIChannelThreadsResult,\n\ttype RESTPostAPIGuildForumThreadsJSONBody,\n\ttype Snowflake,\n} from 'discord-api-types/v10';\n\nexport interface StartThreadOptions extends RESTPostAPIChannelThreadsJSONBody {\n\tmessage_id?: string;\n}\n\nexport interface StartForumThreadOptions extends RESTPostAPIGuildForumThreadsJSONBody {\n\tmessage: RESTPostAPIGuildForumThreadsJSONBody['message'] & { files?: RawFile[] };\n}\n\nexport class ThreadsAPI {\n\tpublic constructor(private readonly rest: REST) {}\n\n\t/**\n\t * Fetches a thread\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/channel#get-channel}\n\t * @param threadId - The id of the thread\n\t */\n\tpublic async get(threadId: Snowflake) {\n\t\treturn this.rest.get(Routes.channel(threadId)) as Promise<APIThreadChannel>;\n\t}\n\n\t/**\n\t * Creates a new thread\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/channel#start-thread-from-message}\n\t * @see {@link https://discord.com/developers/docs/resources/channel#start-thread-without-message}\n\t * @param channelId - The id of the channel to start the thread in\n\t * @param data - The data to use when starting the thread\n\t */\n\tpublic async create(channelId: Snowflake, { message_id, ...body }: StartThreadOptions) {\n\t\treturn this.rest.post(Routes.threads(channelId, message_id), { body }) as Promise<RESTPostAPIChannelThreadsResult>;\n\t}\n\n\t/**\n\t * Creates a new forum post\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/channel#start-thread-in-forum-channel}\n\t * @param channelId - The id of the forum channel to start the thread in\n\t * @param data - The data to use when starting the thread\n\t */\n\tpublic async createForumThread(channelId: Snowflake, { message, ...optionsBody }: StartForumThreadOptions) {\n\t\tconst { files, ...messageBody } = message;\n\n\t\tconst body = {\n\t\t\t...optionsBody,\n\t\t\tmessage: messageBody,\n\t\t};\n\n\t\treturn this.rest.post(Routes.threads(channelId), { files, body }) as Promise<APIThreadChannel>;\n\t}\n\n\t/**\n\t * Adds the current user to a thread\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/channel#join-thread}\n\t * @param threadId - The id of the thread to join\n\t */\n\tpublic async join(threadId: Snowflake) {\n\t\tawait this.rest.put(Routes.threadMembers(threadId, '@me'));\n\t}\n\n\t/**\n\t * Adds a member to a thread\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/channel#add-thread-member}\n\t * @param threadId - The id of the thread to add the member to\n\t * @param userId - The id of the user to add to the thread\n\t */\n\tpublic async addMember(threadId: Snowflake, userId: Snowflake) {\n\t\tawait this.rest.put(Routes.threadMembers(threadId, userId));\n\t}\n\n\t/**\n\t * Removes the current user from a thread\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/channel#leave-thread}\n\t * @param threadId - The id of the thread to leave\n\t */\n\tpublic async leave(threadId: Snowflake) {\n\t\tawait this.rest.delete(Routes.threadMembers(threadId, '@me'));\n\t}\n\n\t/**\n\t * Removes a member from a thread\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/channel#remove-thread-member}\n\t * @param threadId - The id of the thread to remove the member from\n\t * @param userId - The id of the user to remove from the thread\n\t */\n\tpublic async removeMember(threadId: Snowflake, userId: Snowflake) {\n\t\tawait this.rest.delete(Routes.threadMembers(threadId, userId));\n\t}\n\n\t/**\n\t * Fetches a member of a thread\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/channel#get-thread-member}\n\t * @param threadId - The id of the thread to fetch the member from\n\t * @param userId - The id of the user\n\t */\n\tpublic async getMember(threadId: Snowflake, userId: Snowflake) {\n\t\treturn this.rest.get(Routes.threadMembers(threadId, userId)) as Promise<APIThreadMember>;\n\t}\n\n\t/**\n\t * Fetches all members of a thread\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/channel#list-thread-members}\n\t * @param threadId - The id of the thread to fetch the members from\n\t */\n\tpublic async getAllMembers(threadId: Snowflake) {\n\t\treturn this.rest.get(Routes.threadMembers(threadId)) as Promise<RESTGetAPIChannelThreadMembersResult>;\n\t}\n}\n","import { makeURLSearchParams, type REST } from '@discordjs/rest';\nimport {\n\tRoutes,\n\ttype RESTGetAPICurrentUserApplicationRoleConnectionResult,\n\ttype RESTGetAPICurrentUserConnectionsResult,\n\ttype RESTGetAPICurrentUserGuildsQuery,\n\ttype RESTGetAPICurrentUserGuildsResult,\n\ttype RESTGetAPICurrentUserResult,\n\ttype RESTGetAPIUserResult,\n\ttype RESTGetCurrentUserGuildMemberResult,\n\ttype RESTPatchAPICurrentUserJSONBody,\n\ttype RESTPatchAPICurrentUserResult,\n\ttype RESTPatchAPIGuildMemberJSONBody,\n\ttype RESTPatchAPIGuildMemberResult,\n\ttype RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody,\n\ttype RESTPatchAPIGuildVoiceStateCurrentMemberResult,\n\ttype RESTPostAPICurrentUserCreateDMChannelResult,\n\ttype RESTPutAPICurrentUserApplicationRoleConnectionJSONBody,\n\ttype RESTPutAPICurrentUserApplicationRoleConnectionResult,\n\ttype Snowflake,\n} from 'discord-api-types/v10';\n\nexport class UsersAPI {\n\tpublic constructor(private readonly rest: REST) {}\n\n\t/**\n\t * Fetches a user by their id\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/user#get-user}\n\t * @param userId - The id of the user to fetch\n\t */\n\tpublic async get(userId: Snowflake) {\n\t\treturn this.rest.get(Routes.user(userId)) as Promise<RESTGetAPIUserResult>;\n\t}\n\n\t/**\n\t * Returns the user object of the requester's account\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/user#get-current-user}\n\t */\n\tpublic async getCurrent() {\n\t\treturn this.rest.get(Routes.user('@me')) as Promise<RESTGetAPICurrentUserResult>;\n\t}\n\n\t/**\n\t * Returns a list of partial guild objects the current user is a member of\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/user#get-current-user-guilds}\n\t * @param options - The options to use when fetching the current user's guilds\n\t */\n\tpublic async getGuilds(options: RESTGetAPICurrentUserGuildsQuery = {}) {\n\t\treturn this.rest.get(Routes.userGuilds(), {\n\t\t\tquery: makeURLSearchParams(options),\n\t\t}) as Promise<RESTGetAPICurrentUserGuildsResult>;\n\t}\n\n\t/**\n\t * Leaves the guild with the given id\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/user#leave-guild}\n\t * @param guildId - The id of the guild\n\t */\n\tpublic async leaveGuild(guildId: Snowflake) {\n\t\tawait this.rest.delete(Routes.userGuild(guildId));\n\t}\n\n\t/**\n\t * Edits the current user\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/user#modify-current-user}\n\t * @param user - The new data for the current user\n\t */\n\tpublic async edit(user: RESTPatchAPICurrentUserJSONBody) {\n\t\treturn this.rest.patch(Routes.user('@me'), { body: user }) as Promise<RESTPatchAPICurrentUserResult>;\n\t}\n\n\t/**\n\t * Fetches the guild member for the current user\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/user#get-current-user-guild-member}\n\t * @param guildId - The id of the guild\n\t */\n\tpublic async getGuildMember(guildId: Snowflake) {\n\t\treturn this.rest.get(Routes.userGuildMember(guildId)) as Promise<RESTGetCurrentUserGuildMemberResult>;\n\t}\n\n\t/**\n\t * Edits the guild member for the current user\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#modify-current-member}\n\t * @param guildId - The id of the guild\n\t * @param member - The new data for the guild member\n\t * @param reason - The reason for editing this guild member\n\t */\n\tpublic async editGuildMember(guildId: Snowflake, member: RESTPatchAPIGuildMemberJSONBody = {}, reason?: string) {\n\t\treturn this.rest.patch(Routes.guildMember(guildId, '@me'), {\n\t\t\treason,\n\t\t\tbody: member,\n\t\t}) as Promise<RESTPatchAPIGuildMemberResult>;\n\t}\n\n\t/**\n\t * Sets the voice state for the current user\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/guild#modify-current-user-voice-state}\n\t * @param guildId - The id of the guild\n\t * @param options - The options to use when setting the voice state\n\t */\n\tpublic async setVoiceState(guildId: Snowflake, options: RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody = {}) {\n\t\treturn this.rest.patch(Routes.guildVoiceState(guildId, '@me'), {\n\t\t\tbody: options,\n\t\t}) as Promise<RESTPatchAPIGuildVoiceStateCurrentMemberResult>;\n\t}\n\n\t/**\n\t * Opens a new DM channel with a user\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/user#create-dm}\n\t * @param userId - The id of the user to open a DM channel with\n\t */\n\tpublic async createDM(userId: Snowflake) {\n\t\treturn this.rest.post(Routes.userChannels(), {\n\t\t\tbody: { recipient_id: userId },\n\t\t}) as Promise<RESTPostAPICurrentUserCreateDMChannelResult>;\n\t}\n\n\t/**\n\t * Gets the current user's connections\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/user#get-user-connections}\n\t */\n\tpublic async getConnections() {\n\t\treturn this.rest.get(Routes.userConnections()) as Promise<RESTGetAPICurrentUserConnectionsResult>;\n\t}\n\n\t/**\n\t * Gets the current user's active application role connection\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/user#get-user-application-role-connection}\n\t * @param applicationId - The id of the application\n\t */\n\tpublic async getApplicationRoleConnection(applicationId: Snowflake) {\n\t\treturn this.rest.get(\n\t\t\tRoutes.userApplicationRoleConnection(applicationId),\n\t\t) as Promise<RESTGetAPICurrentUserApplicationRoleConnectionResult>;\n\t}\n\n\t/**\n\t * Updates the current user's application role connection\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/user#update-user-application-role-connection}\n\t * @param applicationId - The id of the application\n\t * @param options - The options to use when updating the application role connection\n\t */\n\tpublic async updateApplicationRoleConnection(\n\t\tapplicationId: Snowflake,\n\t\toptions: RESTPutAPICurrentUserApplicationRoleConnectionJSONBody,\n\t) {\n\t\treturn this.rest.put(Routes.userApplicationRoleConnection(applicationId), {\n\t\t\tbody: options,\n\t\t}) as Promise<RESTPutAPICurrentUserApplicationRoleConnectionResult>;\n\t}\n}\n","import type { REST } from '@discordjs/rest';\nimport { Routes, type GetAPIVoiceRegionsResult } from 'discord-api-types/v10';\n\nexport class VoiceAPI {\n\tpublic constructor(private readonly rest: REST) {}\n\n\t/**\n\t * Fetches all voice regions\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/voice#list-voice-regions}\n\t */\n\tpublic async getVoiceRegions() {\n\t\treturn this.rest.get(Routes.voiceRegions()) as Promise<GetAPIVoiceRegionsResult>;\n\t}\n}\n","import { makeURLSearchParams, type RawFile, type REST } from '@discordjs/rest';\nimport {\n\tRoutes,\n\ttype RESTGetAPIChannelMessageResult,\n\ttype RESTGetAPIWebhookResult,\n\ttype RESTPatchAPIWebhookJSONBody,\n\ttype RESTPatchAPIWebhookResult,\n\ttype RESTPatchAPIWebhookWithTokenMessageJSONBody,\n\ttype RESTPatchAPIWebhookWithTokenMessageResult,\n\ttype RESTPostAPIChannelWebhookJSONBody,\n\ttype RESTPostAPIWebhookWithTokenGitHubQuery,\n\ttype RESTPostAPIWebhookWithTokenJSONBody,\n\ttype RESTPostAPIWebhookWithTokenQuery,\n\ttype RESTPostAPIWebhookWithTokenResult,\n\ttype RESTPostAPIWebhookWithTokenSlackQuery,\n\ttype RESTPostAPIWebhookWithTokenWaitResult,\n\ttype Snowflake,\n} from 'discord-api-types/v10';\n\nexport class WebhooksAPI {\n\tpublic constructor(private readonly rest: REST) {}\n\n\t/**\n\t * Fetches a webhook\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/webhook#get-webhook}\n\t * @see {@link https://discord.com/developers/docs/resources/webhook#get-webhook-with-token}\n\t * @param id - The id of the webhook\n\t * @param token - The token of the webhook\n\t */\n\tpublic async get(id: Snowflake, token?: string) {\n\t\treturn this.rest.get(Routes.webhook(id, token)) as Promise<RESTGetAPIWebhookResult>;\n\t}\n\n\t/**\n\t * Creates a new webhook\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/webhook#create-webhook}\n\t * @param channelId - The id of the channel to create the webhook in\n\t * @param data - The data to use when creating the webhook\n\t * @param reason - The reason for creating the webhook\n\t */\n\tpublic async create(channelId: Snowflake, data: RESTPostAPIChannelWebhookJSONBody, reason?: string) {\n\t\treturn this.rest.post(Routes.channelWebhooks(channelId), {\n\t\t\treason,\n\t\t\tbody: data,\n\t\t}) as Promise<RESTPostAPIWebhookWithTokenResult>;\n\t}\n\n\t/**\n\t * Edits a webhook\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/webhook#modify-webhook}\n\t * @see {@link https://discord.com/developers/docs/resources/webhook#modify-webhook-with-token}\n\t * @param id - The id of the webhook to edit\n\t * @param webhook - The new webhook data\n\t * @param options - The options to use when editing the webhook\n\t */\n\tpublic async edit(\n\t\tid: Snowflake,\n\t\twebhook: RESTPatchAPIWebhookJSONBody,\n\t\t{ token, reason }: { reason?: string; token?: string } = {},\n\t) {\n\t\treturn this.rest.patch(Routes.webhook(id, token), { reason, body: webhook }) as Promise<RESTPatchAPIWebhookResult>;\n\t}\n\n\t/**\n\t * Deletes a webhook\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/webhook#delete-webhook}\n\t * @see {@link https://discord.com/developers/docs/resources/webhook#delete-webhook-with-token}\n\t * @param id - The id of the webhook to delete\n\t * @param options - The options to use when deleting the webhook\n\t */\n\tpublic async delete(id: Snowflake, { token, reason }: { reason?: string; token?: string } = {}) {\n\t\tawait this.rest.delete(Routes.webhook(id, token), { reason });\n\t}\n\n\t/**\n\t * Executes a webhook and returns the created message\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/webhook#execute-webhook}\n\t * @param id - The id of the webhook\n\t * @param token - The token of the webhook\n\t * @param data - The data to use when executing the webhook\n\t */\n\tpublic async execute(\n\t\tid: Snowflake,\n\t\ttoken: string,\n\t\tdata: RESTPostAPIWebhookWithTokenJSONBody & RESTPostAPIWebhookWithTokenQuery & { files?: RawFile[]; wait: true },\n\t): Promise<RESTPostAPIWebhookWithTokenWaitResult>;\n\n\t/**\n\t * Executes a webhook\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/webhook#execute-webhook}\n\t * @param id - The id of the webhook\n\t * @param token - The token of the webhook\n\t * @param data - The data to use when executing the webhook\n\t */\n\tpublic async execute(\n\t\tid: Snowflake,\n\t\ttoken: string,\n\t\tdata: RESTPostAPIWebhookWithTokenJSONBody & RESTPostAPIWebhookWithTokenQuery & { files?: RawFile[]; wait?: false },\n\t): Promise<void>;\n\n\t/**\n\t * Executes a webhook\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/webhook#execute-webhook}\n\t * @param id - The id of the webhook\n\t * @param token - The token of the webhook\n\t * @param data - The data to use when executing the webhook\n\t */\n\tpublic async execute(\n\t\tid: Snowflake,\n\t\ttoken: string,\n\t\t{\n\t\t\twait,\n\t\t\tthread_id,\n\t\t\tfiles,\n\t\t\t...body\n\t\t}: RESTPostAPIWebhookWithTokenJSONBody & RESTPostAPIWebhookWithTokenQuery & { files?: RawFile[] },\n\t) {\n\t\treturn this.rest.post(Routes.webhook(id, token), {\n\t\t\tquery: makeURLSearchParams({ wait, thread_id }),\n\t\t\tfiles,\n\t\t\tbody,\n\t\t\tauth: false,\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-invalid-void-type\n\t\t}) as Promise<RESTPostAPIWebhookWithTokenWaitResult | void>;\n\t}\n\n\t/**\n\t * Executes a slack webhook\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/webhook#execute-slackcompatible-webhook}\n\t * @param id - The id of the webhook\n\t * @param token - The token of the webhook\n\t * @param options - The options to use when executing the webhook\n\t */\n\tpublic async executeSlack(\n\t\tid: Snowflake,\n\t\ttoken: string,\n\t\tbody: unknown,\n\t\toptions: RESTPostAPIWebhookWithTokenSlackQuery = {},\n\t) {\n\t\tawait this.rest.post(Routes.webhookPlatform(id, token, 'slack'), {\n\t\t\tquery: makeURLSearchParams(options),\n\t\t\tbody,\n\t\t\tauth: false,\n\t\t});\n\t}\n\n\t/**\n\t * Executes a github webhook\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/webhook#execute-githubcompatible-webhook}\n\t * @param id - The id of the webhook\n\t * @param token - The token of the webhook\n\t * @param options - The options to use when executing the webhook\n\t */\n\tpublic async executeGitHub(\n\t\tid: Snowflake,\n\t\ttoken: string,\n\t\tbody: unknown,\n\t\toptions: RESTPostAPIWebhookWithTokenGitHubQuery = {},\n\t) {\n\t\tawait this.rest.post(Routes.webhookPlatform(id, token, 'github'), {\n\t\t\tquery: makeURLSearchParams(options),\n\t\t\tbody,\n\t\t\tauth: false,\n\t\t});\n\t}\n\n\t/**\n\t * Fetches an associated message from a webhook\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/webhook#get-webhook-message}\n\t * @param id - The id of the webhook\n\t * @param token - The token of the webhook\n\t * @param messageId - The id of the message to fetch\n\t * @param options - The options to use when fetching the message\n\t */\n\tpublic async getMessage(id: Snowflake, token: string, messageId: Snowflake, options: { thread_id?: string } = {}) {\n\t\treturn this.rest.get(Routes.webhookMessage(id, token, messageId), {\n\t\t\tquery: makeURLSearchParams(options),\n\t\t\tauth: false,\n\t\t}) as Promise<RESTGetAPIChannelMessageResult>;\n\t}\n\n\t/**\n\t * Edits an associated message from a webhook\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/webhook#edit-webhook-message}\n\t * @param id - The id of the webhook\n\t * @param token - The token of the webhook\n\t * @param messageId - The id of the message to edit\n\t * @param data - The data to use when editing the message\n\t */\n\tpublic async editMessage(\n\t\tid: Snowflake,\n\t\ttoken: string,\n\t\tmessageId: Snowflake,\n\t\t{ thread_id, ...body }: RESTPatchAPIWebhookWithTokenMessageJSONBody & { thread_id?: string },\n\t) {\n\t\treturn this.rest.patch(Routes.webhookMessage(id, token, messageId), {\n\t\t\tquery: makeURLSearchParams({ thread_id }),\n\t\t\tauth: false,\n\t\t\tbody,\n\t\t}) as Promise<RESTPatchAPIWebhookWithTokenMessageResult>;\n\t}\n\n\t/**\n\t * Deletes an associated message from a webhook\n\t *\n\t * @see {@link https://discord.com/developers/docs/resources/webhook#delete-webhook-message}\n\t * @param id - The id of the webhook\n\t * @param token - The token of the webhook\n\t * @param messageId - The id of the message to delete\n\t * @param options - The options to use when deleting the message\n\t */\n\tpublic async deleteMessage(id: Snowflake, token: string, messageId: Snowflake, options: { thread_id?: string } = {}) {\n\t\tawait this.rest.delete(Routes.webhookMessage(id, token, messageId), {\n\t\t\tquery: makeURLSearchParams(options),\n\t\t\tauth: false,\n\t\t});\n\t}\n}\n","import type { REST } from '@discordjs/rest';\nimport { ApplicationCommandsAPI } from './applicationCommands.js';\nimport { ChannelsAPI } from './channel.js';\nimport { GuildsAPI } from './guild.js';\nimport { InteractionsAPI } from './interactions.js';\nimport { InvitesAPI } from './invite.js';\nimport { OAuth2API } from './oauth2.js';\nimport { RoleConnectionsAPI } from './roleConnections.js';\nimport { StickersAPI } from './sticker.js';\nimport { ThreadsAPI } from './thread.js';\nimport { UsersAPI } from './user.js';\nimport { VoiceAPI } from './voice.js';\nimport { WebhooksAPI } from './webhook.js';\n\nexport * from './applicationCommands.js';\nexport * from './channel.js';\nexport * from './guild.js';\nexport * from './interactions.js';\nexport * from './invite.js';\nexport * from './oauth2.js';\nexport * from './roleConnections.js';\nexport * from './sticker.js';\nexport * from './thread.js';\nexport * from './user.js';\nexport * from './voice.js';\nexport * from './webhook.js';\n\nexport class API {\n\tpublic readonly applicationCommands: ApplicationCommandsAPI;\n\n\tpublic readonly channels: ChannelsAPI;\n\n\tpublic readonly guilds: GuildsAPI;\n\n\tpublic readonly interactions: InteractionsAPI;\n\n\tpublic readonly invites: InvitesAPI;\n\n\tpublic readonly oauth2: OAuth2API;\n\n\tpublic readonly roleConnections: RoleConnectionsAPI;\n\n\tpublic readonly stickers: StickersAPI;\n\n\tpublic readonly threads: ThreadsAPI;\n\n\tpublic readonly users: UsersAPI;\n\n\tpublic readonly voice: VoiceAPI;\n\n\tpublic readonly webhooks: WebhooksAPI;\n\n\tpublic constructor(public readonly rest: REST) {\n\t\tthis.applicationCommands = new ApplicationCommandsAPI(rest);\n\t\tthis.channels = new ChannelsAPI(rest);\n\t\tthis.guilds = new GuildsAPI(rest);\n\t\tthis.invites = new InvitesAPI(rest);\n\t\tthis.roleConnections = new RoleConnectionsAPI(rest);\n\t\tthis.oauth2 = new OAuth2API(rest);\n\t\tthis.stickers = new StickersAPI(rest);\n\t\tthis.threads = new ThreadsAPI(rest);\n\t\tthis.users = new UsersAPI(rest);\n\t\tthis.voice = new VoiceAPI(rest);\n\t\tthis.webhooks = new WebhooksAPI(rest);\n\t\tthis.interactions = new InteractionsAPI(rest, this.webhooks);\n\t}\n}\n","import type { REST } from '@discordjs/rest';\nimport { WebSocketShardEvents, type WebSocketManager } from '@discordjs/ws';\nimport { AsyncEventEmitter } from '@vladfrangu/async_event_emitter';\nimport type {\n\tGatewayAutoModerationActionExecutionDispatchData,\n\tGatewayAutoModerationRuleCreateDispatchData,\n\tGatewayAutoModerationRuleDeleteDispatchData,\n\tGatewayAutoModerationRuleUpdateDispatchData,\n\tGatewayChannelCreateDispatchData,\n\tGatewayChannelDeleteDispatchData,\n\tGatewayChannelPinsUpdateDispatchData,\n\tGatewayChannelUpdateDispatchData,\n\tGatewayDispatchEvents,\n\tGatewayGuildBanAddDispatchData,\n\tGatewayGuildBanRemoveDispatchData,\n\tGatewayGuildCreateDispatchData,\n\tGatewayGuildDeleteDispatchData,\n\tGatewayGuildEmojisUpdateDispatchData,\n\tGatewayGuildIntegrationsUpdateDispatchData,\n\tGatewayGuildMemberAddDispatchData,\n\tGatewayGuildMemberRemoveDispatchData,\n\tGatewayGuildMembersChunkDispatchData,\n\tGatewayGuildMemberUpdateDispatchData,\n\tGatewayGuildRoleCreateDispatchData,\n\tGatewayGuildRoleDeleteDispatchData,\n\tGatewayGuildRoleUpdateDispatchData,\n\tGatewayGuildScheduledEventCreateDispatchData,\n\tGatewayGuildScheduledEventDeleteDispatchData,\n\tGatewayGuildScheduledEventUpdateDispatchData,\n\tGatewayGuildScheduledEventUserAddDispatchData,\n\tGatewayGuildScheduledEventUserRemoveDispatchData,\n\tGatewayGuildStickersUpdateDispatchData,\n\tGatewayGuildUpdateDispatchData,\n\tGatewayIntegrationCreateDispatchData,\n\tGatewayIntegrationDeleteDispatchData,\n\tGatewayIntegrationUpdateDispatchData,\n\tGatewayInteractionCreateDispatchData,\n\tGatewayInviteCreateDispatchData,\n\tGatewayInviteDeleteDispatchData,\n\tGatewayMessageCreateDispatchData,\n\tGatewayMessageDeleteBulkDispatchData,\n\tGatewayMessageDeleteDispatchData,\n\tGatewayMessageReactionAddDispatchData,\n\tGatewayMessageReactionRemoveAllDispatchData,\n\tGatewayMessageReactionRemoveDispatchData,\n\tGatewayMessageReactionRemoveEmojiDispatchData,\n\tGatewayMessageUpdateDispatchData,\n\tGatewayPresenceUpdateDispatchData,\n\tGatewayReadyDispatchData,\n\tGatewayStageInstanceCreateDispatchData,\n\tGatewayStageInstanceDeleteDispatchData,\n\tGatewayStageInstanceUpdateDispatchData,\n\tGatewayThreadCreateDispatchData,\n\tGatewayThreadDeleteDispatchData,\n\tGatewayThreadListSyncDispatchData,\n\tGatewayThreadMembersUpdateDispatchData,\n\tGatewayThreadMemberUpdateDispatchData,\n\tGatewayThreadUpdateDispatchData,\n\tGatewayTypingStartDispatchData,\n\tGatewayUserUpdateDispatchData,\n\tGatewayVoiceServerUpdateDispatchData,\n\tGatewayVoiceStateUpdateDispatchData,\n\tGatewayWebhooksUpdateDispatchData,\n} from 'discord-api-types/v10';\nimport { API } from './api/index.js';\n\nexport interface IntrinsicProps {\n\t/**\n\t * The REST API\n\t */\n\tapi: API;\n\t/**\n\t * The id of the shard that emitted the event\n\t */\n\tshardId: number;\n}\n\nexport interface WithIntrinsicProps<T> extends IntrinsicProps {\n\tdata: T;\n}\n\nexport interface MappedEvents {\n\t[GatewayDispatchEvents.ChannelCreate]: [WithIntrinsicProps<GatewayChannelCreateDispatchData>];\n\t[GatewayDispatchEvents.ChannelDelete]: [WithIntrinsicProps<GatewayChannelDeleteDispatchData>];\n\t[GatewayDispatchEvents.ChannelPinsUpdate]: [WithIntrinsicProps<GatewayChannelPinsUpdateDispatchData>];\n\t[GatewayDispatchEvents.ChannelUpdate]: [WithIntrinsicProps<GatewayChannelUpdateDispatchData>];\n\t[GatewayDispatchEvents.GuildBanAdd]: [WithIntrinsicProps<GatewayGuildBanAddDispatchData>];\n\t[GatewayDispatchEvents.GuildBanRemove]: [WithIntrinsicProps<GatewayGuildBanRemoveDispatchData>];\n\t[GatewayDispatchEvents.GuildCreate]: [WithIntrinsicProps<GatewayGuildCreateDispatchData>];\n\t[GatewayDispatchEvents.GuildDelete]: [WithIntrinsicProps<GatewayGuildDeleteDispatchData>];\n\t[GatewayDispatchEvents.GuildEmojisUpdate]: [WithIntrinsicProps<GatewayGuildEmojisUpdateDispatchData>];\n\t[GatewayDispatchEvents.GuildIntegrationsUpdate]: [WithIntrinsicProps<GatewayGuildIntegrationsUpdateDispatchData>];\n\t[GatewayDispatchEvents.GuildMemberAdd]: [WithIntrinsicProps<GatewayGuildMemberAddDispatchData>];\n\t[GatewayDispatchEvents.GuildMemberRemove]: [WithIntrinsicProps<GatewayGuildMemberRemoveDispatchData>];\n\t[GatewayDispatchEvents.GuildMemberUpdate]: [WithIntrinsicProps<GatewayGuildMemberUpdateDispatchData>];\n\t[GatewayDispatchEvents.GuildMembersChunk]: [WithIntrinsicProps<GatewayGuildMembersChunkDispatchData>];\n\t[GatewayDispatchEvents.GuildRoleCreate]: [WithIntrinsicProps<GatewayGuildRoleCreateDispatchData>];\n\t[GatewayDispatchEvents.GuildRoleDelete]: [WithIntrinsicProps<GatewayGuildRoleDeleteDispatchData>];\n\t[GatewayDispatchEvents.GuildRoleUpdate]: [WithIntrinsicProps<GatewayGuildRoleUpdateDispatchData>];\n\t[GatewayDispatchEvents.GuildScheduledEventCreate]: [WithIntrinsicProps<GatewayGuildScheduledEventCreateDispatchData>];\n\t[GatewayDispatchEvents.GuildScheduledEventDelete]: [WithIntrinsicProps<GatewayGuildScheduledEventDeleteDispatchData>];\n\t[GatewayDispatchEvents.GuildScheduledEventUpdate]: [WithIntrinsicProps<GatewayGuildScheduledEventUpdateDispatchData>];\n\t[GatewayDispatchEvents.GuildScheduledEventUserAdd]: [\n\t\tWithIntrinsicProps<GatewayGuildScheduledEventUserAddDispatchData>,\n\t];\n\t[GatewayDispatchEvents.GuildScheduledEventUserRemove]: [\n\t\tWithIntrinsicProps<GatewayGuildScheduledEventUserRemoveDispatchData>,\n\t];\n\t[GatewayDispatchEvents.GuildStickersUpdate]: [WithIntrinsicProps<GatewayGuildStickersUpdateDispatchData>];\n\t[GatewayDispatchEvents.GuildUpdate]: [WithIntrinsicProps<GatewayGuildUpdateDispatchData>];\n\t[GatewayDispatchEvents.IntegrationCreate]: [WithIntrinsicProps<GatewayIntegrationCreateDispatchData>];\n\t[GatewayDispatchEvents.IntegrationDelete]: [WithIntrinsicProps<GatewayIntegrationDeleteDispatchData>];\n\t[GatewayDispatchEvents.IntegrationUpdate]: [WithIntrinsicProps<GatewayIntegrationUpdateDispatchData>];\n\t[GatewayDispatchEvents.InteractionCreate]: [WithIntrinsicProps<GatewayInteractionCreateDispatchData>];\n\t[GatewayDispatchEvents.InviteCreate]: [WithIntrinsicProps<GatewayInviteCreateDispatchData>];\n\t[GatewayDispatchEvents.InviteDelete]: [WithIntrinsicProps<GatewayInviteDeleteDispatchData>];\n\t[GatewayDispatchEvents.MessageCreate]: [WithIntrinsicProps<GatewayMessageCreateDispatchData>];\n\t[GatewayDispatchEvents.MessageDelete]: [WithIntrinsicProps<GatewayMessageDeleteDispatchData>];\n\t[GatewayDispatchEvents.MessageDeleteBulk]: [WithIntrinsicProps<GatewayMessageDeleteBulkDispatchData>];\n\t[GatewayDispatchEvents.MessageReactionAdd]: [WithIntrinsicProps<GatewayMessageReactionAddDispatchData>];\n\t[GatewayDispatchEvents.MessageReactionRemove]: [WithIntrinsicProps<GatewayMessageReactionRemoveDispatchData>];\n\t[GatewayDispatchEvents.MessageReactionRemoveAll]: [WithIntrinsicProps<GatewayMessageReactionRemoveAllDispatchData>];\n\t[GatewayDispatchEvents.MessageReactionRemoveEmoji]: [\n\t\tWithIntrinsicProps<GatewayMessageReactionRemoveEmojiDispatchData>,\n\t];\n\t[GatewayDispatchEvents.MessageUpdate]: [WithIntrinsicProps<GatewayMessageUpdateDispatchData>];\n\t[GatewayDispatchEvents.PresenceUpdate]: [WithIntrinsicProps<GatewayPresenceUpdateDispatchData>];\n\t[GatewayDispatchEvents.Ready]: [WithIntrinsicProps<GatewayReadyDispatchData>];\n\t[GatewayDispatchEvents.StageInstanceCreate]: [WithIntrinsicProps<GatewayStageInstanceCreateDispatchData>];\n\t[GatewayDispatchEvents.StageInstanceDelete]: [WithIntrinsicProps<GatewayStageInstanceDeleteDispatchData>];\n\t[GatewayDispatchEvents.StageInstanceUpdate]: [WithIntrinsicProps<GatewayStageInstanceUpdateDispatchData>];\n\t[GatewayDispatchEvents.ThreadCreate]: [WithIntrinsicProps<GatewayThreadCreateDispatchData>];\n\t[GatewayDispatchEvents.ThreadDelete]: [WithIntrinsicProps<GatewayThreadDeleteDispatchData>];\n\t[GatewayDispatchEvents.ThreadListSync]: [WithIntrinsicProps<GatewayThreadListSyncDispatchData>];\n\t[GatewayDispatchEvents.ThreadMemberUpdate]: [WithIntrinsicProps<GatewayThreadMemberUpdateDispatchData>];\n\t[GatewayDispatchEvents.ThreadMembersUpdate]: [WithIntrinsicProps<GatewayThreadMembersUpdateDispatchData>];\n\t[GatewayDispatchEvents.ThreadUpdate]: [WithIntrinsicProps<GatewayThreadUpdateDispatchData>];\n\t[GatewayDispatchEvents.UserUpdate]: [WithIntrinsicProps<GatewayUserUpdateDispatchData>];\n\t[GatewayDispatchEvents.VoiceServerUpdate]: [WithIntrinsicProps<GatewayVoiceServerUpdateDispatchData>];\n\t[GatewayDispatchEvents.VoiceStateUpdate]: [WithIntrinsicProps<GatewayVoiceStateUpdateDispatchData>];\n\t[GatewayDispatchEvents.WebhooksUpdate]: [WithIntrinsicProps<GatewayWebhooksUpdateDispatchData>];\n\t[GatewayDispatchEvents.Resumed]: [WithIntrinsicProps<never>];\n\t[GatewayDispatchEvents.TypingStart]: [WithIntrinsicProps<GatewayTypingStartDispatchData>];\n\t[GatewayDispatchEvents.AutoModerationActionExecution]: [\n\t\tWithIntrinsicProps<GatewayAutoModerationActionExecutionDispatchData>,\n\t];\n\t[GatewayDispatchEvents.AutoModerationRuleCreate]: [WithIntrinsicProps<GatewayAutoModerationRuleCreateDispatchData>];\n\t[GatewayDispatchEvents.AutoModerationRuleDelete]: [WithIntrinsicProps<GatewayAutoModerationRuleDeleteDispatchData>];\n\t[GatewayDispatchEvents.AutoModerationRuleUpdate]: [WithIntrinsicProps<GatewayAutoModerationRuleUpdateDispatchData>];\n}\n\nexport type ManagerShardEventsMap = {\n\t[K in keyof MappedEvents]: MappedEvents[K];\n};\n\nexport interface ClientOptions {\n\trest: REST;\n\tws: WebSocketManager;\n}\n\nexport function createClient({ rest, ws }: ClientOptions) {\n\tconst api = new API(rest);\n\tconst emitter = new AsyncEventEmitter<ManagerShardEventsMap>();\n\n\tfunction wrapIntrinsicProps<T>(obj: T, shardId: number): WithIntrinsicProps<T> {\n\t\treturn {\n\t\t\tapi,\n\t\t\tshardId,\n\t\t\tdata: obj,\n\t\t};\n\t}\n\n\tws.on(WebSocketShardEvents.Dispatch, ({ data: dispatch, shardId }) => {\n\t\t// @ts-expect-error event props can't be resolved properly, but they are correct\n\t\temitter.emit(dispatch.t, wrapIntrinsicProps(dispatch.d, shardId));\n\t});\n\n\treturn emitter;\n}\n","import type { RawFile } from '@discordjs/rest';\nimport type { APIInteractionResponseCallbackData } from 'discord-api-types/v10';\n\nexport interface DescriptiveRawFile extends RawFile {\n\tdescription?: string;\n}\n\n/**\n * A utility function to create a form data payload given an array of file buffers\n *\n * @param files - The files to create a form data payload for\n * @param options - The additional options for the form data payload\n */\nexport function withFiles(files: DescriptiveRawFile[], options: APIInteractionResponseCallbackData) {\n\tconst body = {\n\t\t...options,\n\t\tattachments: files.map((file, index) => ({\n\t\t\tid: index.toString(),\n\t\t\tdescription: file.description,\n\t\t})),\n\t};\n\n\tconst outputFiles = files.map((file, index) => ({\n\t\tname: file.name ?? index.toString(),\n\t\tdata: file.data,\n\t}));\n\n\treturn { body, files: outputFiles };\n}\n","export * from './api/index.js';\nexport * from './client.js';\nexport * from './util/index.js';\n\nexport * from 'discord-api-types/v10';\n"],"mappings":";;;;AAAA,SAAS,2BAAsC;AAC/C;AAAA,EACC;AAAA,OAgBM;AAEA,IAAM,yBAAN,MAA6B;AAAA,EAC5B,YAA6B,MAAY;AAAZ;AAAA,EAAa;AAAA,EASjD,MAAa,kBAAkB,eAA0B,UAA8C,CAAC,GAAG;AAC1G,WAAO,KAAK,KAAK,IAAI,OAAO,oBAAoB,aAAa,GAAG;AAAA,MAC/D,OAAO,oBAAoB,OAAO;AAAA,IACnC,CAAC;AAAA,EACF;AAAA,EASA,MAAa,oBAAoB,eAA0B,MAA8C;AACxG,WAAO,KAAK,KAAK,KAAK,OAAO,oBAAoB,aAAa,GAAG;AAAA,MAChE,MAAM;AAAA,IACP,CAAC;AAAA,EACF;AAAA,EASA,MAAa,iBAAiB,eAA0B,WAAsB;AAC7E,WAAO,KAAK,KAAK;AAAA,MAChB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AAQ,IAAI,SAAS,IAAI;AAC9B,SAAK,WAAW,IAAI,YAAY,IAAI;AACpC,SAAK,eAAe,IAAI,gBAAgB,MAAM,KAAK,QAAQ;AAAA,EAC5D;AAAA,EArCgB;AAAA,EAEA;AAAA,EAEA;AAAA,EAEA;AAAA,EAEA;AAAA,EAEA;AAAA,EAEA;AAAA,EAEA;AAAA,EAEA;AAAA,EAEA;AAAA,EAEA;AAAA,EAEA;AAgBjB;AAvCa;;;AC1Bb,SAAS,4BAAmD;AAC5D,SAAS,yBAAyB;AA8J3B,SAAS,aAAa,EAAE,MAAM,GAAG,GAAkB;AACzD,QAAM,MAAM,IAAI,IAAI,IAAI;AACxB,QAAM,UAAU,IAAI,kBAAyC;AAE7D,WAAS,mBAAsB,KAAQ,SAAwC;AAC9E,WAAO;AAAA,MACN;AAAA,MACA;AAAA,MACA,MAAM;AAAA,IACP;AAAA,EACD;AANS;AAQT,KAAG,GAAG,qBAAqB,UAAU,CAAC,EAAE,MAAM,UAAU,QAAQ,MAAM;AAErE,YAAQ,KAAK,SAAS,GAAG,mBAAmB,SAAS,GAAG,OAAO,CAAC;AAAA,EACjE,CAAC;AAED,SAAO;AACR;AAlBgB;;;ACnJT,SAAS,UAAU,OAA6B,SAA6C;AACnG,QAAM,OAAO;AAAA,IACZ,GAAG;AAAA,IACH,aAAa,MAAM,IAAI,CAAC,MAAM,WAAW;AAAA,MACxC,IAAI,MAAM,SAAS;AAAA,MACnB,aAAa,KAAK;AAAA,IACnB,EAAE;AAAA,EACH;AAEA,QAAM,cAAc,MAAM,IAAI,CAAC,MAAM,WAAW;AAAA,IAC/C,MAAM,KAAK,QAAQ,MAAM,SAAS;AAAA,IAClC,MAAM,KAAK;AAAA,EACZ,EAAE;AAEF,SAAO,EAAE,MAAM,OAAO,YAAY;AACnC;AAfgB;;;ACThB,cAAc;","names":["makeURLSearchParams","Routes","Routes","makeURLSearchParams","makeURLSearchParams","Routes","Routes","makeURLSearchParams","Routes","Routes","makeURLSearchParams","Routes","Routes","makeURLSearchParams","makeURLSearchParams","Routes","Routes","makeURLSearchParams","Routes","Routes","Routes","Routes","Routes","Routes","makeURLSearchParams","Routes","Routes","makeURLSearchParams","Routes","Routes","makeURLSearchParams","Routes","Routes","makeURLSearchParams"]}
|