@discordjs/core 2.2.0 → 2.2.2

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.
@@ -1,6 +1,6 @@
1
1
  import { REST, RequestData, RawFile } from '@discordjs/rest';
2
2
  import * as discord_api_types_v10 from 'discord-api-types/v10';
3
- import { Snowflake, RESTGetAPIApplicationCommandsQuery, RESTGetAPIApplicationCommandsResult, RESTPostAPIApplicationCommandsJSONBody, RESTPatchAPIApplicationCommandJSONBody, RESTPutAPIApplicationCommandsJSONBody, RESTPutAPIApplicationCommandsResult, RESTGetAPIApplicationGuildCommandsQuery, RESTGetAPIApplicationGuildCommandsResult, RESTPostAPIApplicationGuildCommandsJSONBody, RESTPostAPIApplicationGuildCommandsResult, RESTGetAPIApplicationGuildCommandResult, RESTPatchAPIApplicationGuildCommandJSONBody, RESTPatchAPIApplicationGuildCommandResult, RESTPutAPIApplicationGuildCommandsJSONBody, RESTPutAPIApplicationGuildCommandsResult, RESTGetAPIGuildApplicationCommandsPermissionsResult, RESTPutAPIApplicationCommandPermissionsJSONBody, RESTPatchCurrentApplicationJSONBody, RESTGetAPIApplicationEmojisResult, RESTPostAPIApplicationEmojiJSONBody, RESTPatchAPIApplicationEmojiJSONBody, RESTPostAPIGuildForumThreadsJSONBody, RESTPostAPIChannelMessageJSONBody, RESTPatchAPIChannelMessageJSONBody, RESTGetAPIChannelMessageReactionUsersQuery, RESTGetAPIChannelMessageReactionUsersResult, RESTPatchAPIChannelJSONBody, RESTGetAPIChannelMessagesQuery, RESTGetAPIChannelMessagesResult, RESTGetAPIChannelPinsResult, RESTPostAPIChannelInviteJSONBody, RESTGetAPIChannelInvitesResult, RESTPostAPIChannelThreadsJSONBody, APIThreadChannel, RESTGetAPIChannelThreadsArchivedQuery, RESTGetAPIChannelUsersThreadsArchivedResult, RESTPostAPIChannelWebhookJSONBody, RESTGetAPIChannelWebhooksResult, RESTPutAPIChannelPermissionJSONBody, RESTGetAPIGuildResult, RESTGetAPIGuildQuery, RESTPostAPIGuildsJSONBody, RESTPatchAPIGuildJSONBody, RESTPutAPIGuildMemberJSONBody, RESTPutAPIGuildMemberResult, RESTGetAPIGuildMembersQuery, RESTGetAPIGuildMembersResult, RESTGetAPIGuildChannelsResult, RESTPostAPIGuildChannelJSONBody, RESTPatchAPIGuildChannelPositionsJSONBody, RESTGetAPIGuildBansQuery, RESTGetAPIGuildBansResult, RESTPutAPIGuildBanJSONBody, RESTPostAPIGuildBulkBanJSONBody, RESTPostAPIGuildBulkBanResult, RESTGetAPIGuildRolesResult, RESTPostAPIGuildRoleJSONBody, RESTPatchAPIGuildRolePositionsJSONBody, RESTPatchAPIGuildRolePositionsResult, RESTPatchAPIGuildRoleJSONBody, GuildMFALevel, RESTGetAPIGuildPruneCountQuery, RESTGetAPIGuildPruneCountResult, RESTPostAPIGuildPruneJSONBody, RESTPostAPIGuildPruneResult, RESTGetAPIGuildVoiceRegionsResult, RESTGetAPIGuildInvitesResult, RESTGetAPIGuildIntegrationsResult, RESTPatchAPIGuildWidgetSettingsJSONBody, RESTGetAPIGuildVanityUrlResult, GuildWidgetStyle, RESTPatchAPIGuildWelcomeScreenJSONBody, RESTPatchAPIGuildVoiceStateUserJSONBody, RESTGetAPIGuildEmojisResult, RESTPostAPIGuildEmojiJSONBody, RESTPatchAPIGuildEmojiJSONBody, RESTGetAPIGuildScheduledEventsQuery, RESTGetAPIGuildScheduledEventsResult, RESTPostAPIGuildScheduledEventJSONBody, RESTGetAPIGuildScheduledEventQuery, RESTPatchAPIGuildScheduledEventJSONBody, RESTGetAPIGuildScheduledEventUsersQuery, RESTGetAPIGuildScheduledEventUsersResult, RESTGetAPIGuildTemplatesResult, RESTPatchAPIGuildTemplateJSONBody, RESTGetAPIGuildStickersResult, RESTPostAPIGuildStickerFormDataBody, RESTPatchAPIGuildStickerJSONBody, RESTGetAPIAuditLogQuery, RESTGetAPIAutoModerationRulesResult, RESTPostAPIAutoModerationRuleJSONBody, RESTPatchAPIAutoModerationRuleJSONBody, RESTGetAPIGuildMembersSearchQuery, RESTGetAPIGuildMembersSearchResult, RESTPatchAPIGuildMemberJSONBody, RESTPostAPIGuildTemplatesJSONBody, RESTGetAPIGuildWebhooksResult, RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, RESTPutAPIGuildOnboardingJSONBody, RESTPatchAPIWebhookJSONBody, RESTPostAPIWebhookWithTokenJSONBody, RESTPostAPIWebhookWithTokenQuery, RESTPostAPIWebhookWithTokenWaitResult, RESTPostAPIWebhookWithTokenSlackQuery, RESTPostAPIWebhookWithTokenGitHubQuery, RESTGetAPIWebhookWithTokenMessageQuery, RESTPatchAPIWebhookWithTokenMessageJSONBody, RESTPatchAPIWebhookWithTokenMessageQuery, APIInteractionResponseCallbackData, APIInteractionResponseDeferredChannelMessageWithSource, APICommandAutocompleteInteractionResponseCallbackData, APIModalInteractionResponseCallbackData, RESTGetAPIInviteQuery, RESTGetAPISKUsResult, RESTGetAPIEntitlementsQuery, RESTGetAPIEntitlementsResult, RESTPostAPIEntitlementJSONBody, RESTOAuth2AuthorizationQuery, RESTPostOAuth2AccessTokenURLEncodedData, RESTPostOAuth2AccessTokenResult, RESTPostOAuth2RefreshTokenURLEncodedData, RESTPostOAuth2ClientCredentialsURLEncodedData, RESTGetAPIOAuth2CurrentApplicationResult, RESTGetAPIOAuth2CurrentAuthorizationResult, RESTPostOAuth2TokenRevocationQuery, RESTGetAPIPollAnswerVotersQuery, RESTGetAPIPollAnswerVotersResult, RESTGetAPIApplicationRoleConnectionMetadataResult, RESTPutAPIApplicationRoleConnectionMetadataJSONBody, RESTPutAPIApplicationRoleConnectionMetadataResult, RESTPostAPIStageInstanceJSONBody, RESTPatchAPIStageInstanceJSONBody, RESTGetStickerPacksResult, APIThreadMember, RESTGetAPIChannelThreadMembersResult, RESTGetAPICurrentUserGuildsQuery, RESTGetAPICurrentUserGuildsResult, RESTPatchAPICurrentUserJSONBody, RESTGetAPICurrentUserConnectionsResult, RESTPutAPICurrentUserApplicationRoleConnectionJSONBody, RESTGetAPIVoiceRegionsResult } from 'discord-api-types/v10';
3
+ import { Snowflake, RESTGetAPIApplicationCommandsQuery, RESTGetAPIApplicationCommandsResult, RESTPostAPIApplicationCommandsJSONBody, RESTPatchAPIApplicationCommandJSONBody, RESTPutAPIApplicationCommandsJSONBody, RESTPutAPIApplicationCommandsResult, RESTGetAPIApplicationGuildCommandsQuery, RESTGetAPIApplicationGuildCommandsResult, RESTPostAPIApplicationGuildCommandsJSONBody, RESTPostAPIApplicationGuildCommandsResult, RESTGetAPIApplicationGuildCommandResult, RESTPatchAPIApplicationGuildCommandJSONBody, RESTPatchAPIApplicationGuildCommandResult, RESTPutAPIApplicationGuildCommandsJSONBody, RESTPutAPIApplicationGuildCommandsResult, RESTGetAPIGuildApplicationCommandsPermissionsResult, RESTPutAPIApplicationCommandPermissionsJSONBody, RESTPatchCurrentApplicationJSONBody, RESTGetAPIApplicationEmojisResult, RESTPostAPIApplicationEmojiJSONBody, RESTPatchAPIApplicationEmojiJSONBody, RESTPostAPIGuildForumThreadsJSONBody, RESTPostAPIChannelMessageJSONBody, RESTPatchAPIChannelMessageJSONBody, RESTGetAPIChannelMessageReactionUsersQuery, RESTGetAPIChannelMessageReactionUsersResult, RESTPatchAPIChannelJSONBody, RESTGetAPIChannelMessagesQuery, RESTGetAPIChannelMessagesResult, RESTGetAPIChannelPinsResult, RESTPostAPIChannelInviteJSONBody, RESTGetAPIChannelInvitesResult, RESTPostAPIChannelThreadsJSONBody, RESTPostAPIChannelThreadsResult, APIThreadChannel, RESTGetAPIChannelThreadsArchivedQuery, RESTGetAPIChannelUsersThreadsArchivedResult, RESTPostAPIChannelWebhookJSONBody, RESTGetAPIChannelWebhooksResult, RESTPutAPIChannelPermissionJSONBody, RESTGetAPIGuildResult, RESTGetAPIGuildQuery, RESTPostAPIGuildsJSONBody, RESTPatchAPIGuildJSONBody, RESTPutAPIGuildMemberJSONBody, RESTPutAPIGuildMemberResult, RESTGetAPIGuildMembersQuery, RESTGetAPIGuildMembersResult, RESTGetAPIGuildChannelsResult, RESTPostAPIGuildChannelJSONBody, RESTPatchAPIGuildChannelPositionsJSONBody, RESTGetAPIGuildBansQuery, RESTGetAPIGuildBansResult, RESTPutAPIGuildBanJSONBody, RESTPostAPIGuildBulkBanJSONBody, RESTPostAPIGuildBulkBanResult, RESTGetAPIGuildRolesResult, RESTPostAPIGuildRoleJSONBody, RESTPatchAPIGuildRolePositionsJSONBody, RESTPatchAPIGuildRolePositionsResult, RESTPatchAPIGuildRoleJSONBody, GuildMFALevel, RESTGetAPIGuildPruneCountQuery, RESTGetAPIGuildPruneCountResult, RESTPostAPIGuildPruneJSONBody, RESTPostAPIGuildPruneResult, RESTGetAPIGuildVoiceRegionsResult, RESTGetAPIGuildInvitesResult, RESTGetAPIGuildIntegrationsResult, RESTPatchAPIGuildWidgetSettingsJSONBody, RESTGetAPIGuildVanityUrlResult, GuildWidgetStyle, RESTPatchAPIGuildWelcomeScreenJSONBody, RESTPatchAPIGuildVoiceStateUserJSONBody, RESTGetAPIGuildEmojisResult, RESTPostAPIGuildEmojiJSONBody, RESTPatchAPIGuildEmojiJSONBody, RESTGetAPIGuildScheduledEventsQuery, RESTGetAPIGuildScheduledEventsResult, RESTPostAPIGuildScheduledEventJSONBody, RESTGetAPIGuildScheduledEventQuery, RESTPatchAPIGuildScheduledEventJSONBody, RESTGetAPIGuildScheduledEventUsersQuery, RESTGetAPIGuildScheduledEventUsersResult, RESTGetAPIGuildTemplatesResult, RESTPatchAPIGuildTemplateJSONBody, RESTGetAPIGuildStickersResult, RESTPostAPIGuildStickerFormDataBody, RESTPatchAPIGuildStickerJSONBody, RESTGetAPIAuditLogQuery, RESTGetAPIAutoModerationRulesResult, RESTPostAPIAutoModerationRuleJSONBody, RESTPatchAPIAutoModerationRuleJSONBody, RESTGetAPIGuildMembersSearchQuery, RESTGetAPIGuildMembersSearchResult, RESTPatchAPIGuildMemberJSONBody, RESTPostAPIGuildTemplatesJSONBody, RESTGetAPIGuildWebhooksResult, RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, RESTPutAPIGuildOnboardingJSONBody, RESTPatchAPIWebhookJSONBody, RESTPostAPIWebhookWithTokenJSONBody, RESTPostAPIWebhookWithTokenQuery, RESTPostAPIWebhookWithTokenWaitResult, RESTPostAPIWebhookWithTokenSlackQuery, RESTPostAPIWebhookWithTokenGitHubQuery, RESTGetAPIWebhookWithTokenMessageQuery, RESTPatchAPIWebhookWithTokenMessageJSONBody, RESTPatchAPIWebhookWithTokenMessageQuery, APIInteractionResponseCallbackData, APIInteractionResponseDeferredChannelMessageWithSource, APICommandAutocompleteInteractionResponseCallbackData, APIModalInteractionResponseCallbackData, RESTGetAPIInviteQuery, RESTGetAPISKUsResult, RESTGetAPIEntitlementsQuery, RESTGetAPIEntitlementsResult, RESTPostAPIEntitlementJSONBody, RESTOAuth2AuthorizationQuery, RESTPostOAuth2AccessTokenURLEncodedData, RESTPostOAuth2AccessTokenResult, RESTPostOAuth2RefreshTokenURLEncodedData, RESTPostOAuth2ClientCredentialsURLEncodedData, RESTGetAPIOAuth2CurrentApplicationResult, RESTGetAPIOAuth2CurrentAuthorizationResult, RESTPostOAuth2TokenRevocationQuery, RESTGetAPIPollAnswerVotersQuery, RESTGetAPIPollAnswerVotersResult, RESTGetAPIApplicationRoleConnectionMetadataResult, RESTPutAPIApplicationRoleConnectionMetadataJSONBody, RESTPutAPIApplicationRoleConnectionMetadataResult, RESTPostAPIStageInstanceJSONBody, RESTPatchAPIStageInstanceJSONBody, RESTGetStickerPacksResult, APIThreadMember, RESTGetAPIChannelThreadMembersResult, RESTGetAPICurrentUserGuildsQuery, RESTGetAPICurrentUserGuildsResult, RESTPatchAPICurrentUserJSONBody, RESTPatchAPICurrentGuildMemberJSONBody, RESTGetAPICurrentUserConnectionsResult, RESTPutAPICurrentUserApplicationRoleConnectionJSONBody, RESTGetAPIVoiceRegionsResult } from 'discord-api-types/v10';
4
4
  export * from 'discord-api-types/v10';
5
5
  import * as discord_api_types_globals from 'discord-api-types/globals';
6
6
 
@@ -190,7 +190,7 @@ declare class ApplicationsAPI {
190
190
  * @param emojiId - The id of the emoji to fetch
191
191
  * @param options - The options for fetching the emoji
192
192
  */
193
- getEmoji(applicationId: Snowflake, emojiId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIEmoji>;
193
+ getEmoji(applicationId: Snowflake, emojiId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIApplicationEmoji>;
194
194
  /**
195
195
  * Creates a new emoji of an application
196
196
  *
@@ -199,7 +199,7 @@ declare class ApplicationsAPI {
199
199
  * @param body - The data for creating the emoji
200
200
  * @param options - The options for creating the emoji
201
201
  */
202
- createEmoji(applicationId: Snowflake, body: RESTPostAPIApplicationEmojiJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIEmoji>;
202
+ createEmoji(applicationId: Snowflake, body: RESTPostAPIApplicationEmojiJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIApplicationEmoji>;
203
203
  /**
204
204
  * Edits an emoji of an application
205
205
  *
@@ -209,7 +209,7 @@ declare class ApplicationsAPI {
209
209
  * @param body - The data for editing the emoji
210
210
  * @param options - The options for editing the emoji
211
211
  */
212
- editEmoji(applicationId: Snowflake, emojiId: Snowflake, body: RESTPatchAPIApplicationEmojiJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIEmoji>;
212
+ editEmoji(applicationId: Snowflake, emojiId: Snowflake, body: RESTPatchAPIApplicationEmojiJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIApplicationEmoji>;
213
213
  /**
214
214
  * Deletes an emoji of an application
215
215
  *
@@ -329,7 +329,7 @@ declare class ChannelsAPI {
329
329
  * @param body - The new channel data
330
330
  * @param options - The options for editing the channel
331
331
  */
332
- edit(channelId: Snowflake, body: RESTPatchAPIChannelJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIChannel>;
332
+ edit(channelId: Snowflake, body: RESTPatchAPIChannelJSONBody, { signal, reason }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APIChannel>;
333
333
  /**
334
334
  * Deletes a channel
335
335
  *
@@ -337,7 +337,7 @@ declare class ChannelsAPI {
337
337
  * @param channelId - The id of the channel to delete
338
338
  * @param options - The options for deleting the channel
339
339
  */
340
- delete(channelId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIChannel>;
340
+ delete(channelId: Snowflake, { signal, reason }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APIChannel>;
341
341
  /**
342
342
  * Fetches the messages of a channel
343
343
  *
@@ -453,7 +453,7 @@ declare class ChannelsAPI {
453
453
  * @param messageId - The id of the message to start the thread from
454
454
  * @param options - The options for starting the thread
455
455
  */
456
- createThread(channelId: Snowflake, body: RESTPostAPIChannelThreadsJSONBody, messageId?: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIChannel>;
456
+ createThread(channelId: Snowflake, body: RESTPostAPIChannelThreadsJSONBody, messageId?: Snowflake, { signal, reason }?: Pick<RequestData, 'reason' | 'signal'>): Promise<RESTPostAPIChannelThreadsResult>;
457
457
  /**
458
458
  * Creates a new forum post
459
459
  *
@@ -462,7 +462,7 @@ declare class ChannelsAPI {
462
462
  * @param body - The data for starting the thread
463
463
  * @param options - The options for starting the thread
464
464
  */
465
- createForumThread(channelId: Snowflake, { message, ...optionsBody }: StartForumThreadOptions, { signal }?: Pick<RequestData, 'signal'>): Promise<APIThreadChannel>;
465
+ createForumThread(channelId: Snowflake, { message, ...optionsBody }: StartForumThreadOptions, { signal, reason }?: Pick<RequestData, 'reason' | 'signal'>): Promise<APIThreadChannel<discord_api_types_v10.ThreadChannelType>>;
466
466
  /**
467
467
  * Fetches the archived threads of a channel
468
468
  *
@@ -555,6 +555,7 @@ declare class GuildsAPI {
555
555
  * @see {@link https://discord.com/developers/docs/resources/guild#create-guild}
556
556
  * @param body - The guild to create
557
557
  * @param options - The options for creating the guild
558
+ * @deprecated API related to guild ownership may no longer be used.
558
559
  */
559
560
  create(body: RESTPostAPIGuildsJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIGuild>;
560
561
  /**
@@ -572,8 +573,9 @@ declare class GuildsAPI {
572
573
  * @see {@link https://discord.com/developers/docs/resources/guild#delete-guild}
573
574
  * @param guildId - The id of the guild to delete
574
575
  * @param options - The options for deleting this guild
576
+ * @deprecated API related to guild ownership may no longer be used.
575
577
  */
576
- delete(guildId: Snowflake, { signal, reason }?: Pick<RequestData, 'reason' | 'signal'>): Promise<void>;
578
+ delete(guildId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
577
579
  /**
578
580
  * Adds user to the guild
579
581
  *
@@ -734,6 +736,7 @@ declare class GuildsAPI {
734
736
  * @param guildId - The id of the guild to edit the MFA level for
735
737
  * @param level - The new MFA level
736
738
  * @param options - The options for editing the MFA level
739
+ * @deprecated API related to guild ownership may no longer be used.
737
740
  */
738
741
  editMFALevel(guildId: Snowflake, level: GuildMFALevel, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.RESTPostAPIGuildsMFAJSONBody>;
739
742
  /**
@@ -1165,11 +1168,11 @@ declare class GuildsAPI {
1165
1168
  * Creates a new template
1166
1169
  *
1167
1170
  * @see {@link https://discord.com/developers/docs/resources/guild-template#create-guild-template}
1168
- * @param templateCode - The code of the template
1171
+ * @param guildId - The id of the guild
1169
1172
  * @param body - The data for creating the template
1170
1173
  * @param options - The options for creating the template
1171
1174
  */
1172
- createTemplate(templateCode: string, body: RESTPostAPIGuildTemplatesJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APITemplate>;
1175
+ createTemplate(guildId: Snowflake, body: RESTPostAPIGuildTemplatesJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APITemplate>;
1173
1176
  /**
1174
1177
  * Fetches webhooks for a guild
1175
1178
  *
@@ -1822,7 +1825,7 @@ declare class UsersAPI {
1822
1825
  * @param body - The new data for the guild member
1823
1826
  * @param options - The options for editing the guild member
1824
1827
  */
1825
- editCurrentGuildMember(guildId: Snowflake, body?: RESTPatchAPIGuildMemberJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APIGuildMember>;
1828
+ editCurrentGuildMember(guildId: Snowflake, body?: RESTPatchAPICurrentGuildMemberJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APIGuildMember>;
1826
1829
  /**
1827
1830
  * Opens a new DM channel with a user
1828
1831
  *
@@ -1,6 +1,6 @@
1
1
  import { REST, RequestData, RawFile } from '@discordjs/rest';
2
2
  import * as discord_api_types_v10 from 'discord-api-types/v10';
3
- import { Snowflake, RESTGetAPIApplicationCommandsQuery, RESTGetAPIApplicationCommandsResult, RESTPostAPIApplicationCommandsJSONBody, RESTPatchAPIApplicationCommandJSONBody, RESTPutAPIApplicationCommandsJSONBody, RESTPutAPIApplicationCommandsResult, RESTGetAPIApplicationGuildCommandsQuery, RESTGetAPIApplicationGuildCommandsResult, RESTPostAPIApplicationGuildCommandsJSONBody, RESTPostAPIApplicationGuildCommandsResult, RESTGetAPIApplicationGuildCommandResult, RESTPatchAPIApplicationGuildCommandJSONBody, RESTPatchAPIApplicationGuildCommandResult, RESTPutAPIApplicationGuildCommandsJSONBody, RESTPutAPIApplicationGuildCommandsResult, RESTGetAPIGuildApplicationCommandsPermissionsResult, RESTPutAPIApplicationCommandPermissionsJSONBody, RESTPatchCurrentApplicationJSONBody, RESTGetAPIApplicationEmojisResult, RESTPostAPIApplicationEmojiJSONBody, RESTPatchAPIApplicationEmojiJSONBody, RESTPostAPIGuildForumThreadsJSONBody, RESTPostAPIChannelMessageJSONBody, RESTPatchAPIChannelMessageJSONBody, RESTGetAPIChannelMessageReactionUsersQuery, RESTGetAPIChannelMessageReactionUsersResult, RESTPatchAPIChannelJSONBody, RESTGetAPIChannelMessagesQuery, RESTGetAPIChannelMessagesResult, RESTGetAPIChannelPinsResult, RESTPostAPIChannelInviteJSONBody, RESTGetAPIChannelInvitesResult, RESTPostAPIChannelThreadsJSONBody, APIThreadChannel, RESTGetAPIChannelThreadsArchivedQuery, RESTGetAPIChannelUsersThreadsArchivedResult, RESTPostAPIChannelWebhookJSONBody, RESTGetAPIChannelWebhooksResult, RESTPutAPIChannelPermissionJSONBody, RESTGetAPIGuildResult, RESTGetAPIGuildQuery, RESTPostAPIGuildsJSONBody, RESTPatchAPIGuildJSONBody, RESTPutAPIGuildMemberJSONBody, RESTPutAPIGuildMemberResult, RESTGetAPIGuildMembersQuery, RESTGetAPIGuildMembersResult, RESTGetAPIGuildChannelsResult, RESTPostAPIGuildChannelJSONBody, RESTPatchAPIGuildChannelPositionsJSONBody, RESTGetAPIGuildBansQuery, RESTGetAPIGuildBansResult, RESTPutAPIGuildBanJSONBody, RESTPostAPIGuildBulkBanJSONBody, RESTPostAPIGuildBulkBanResult, RESTGetAPIGuildRolesResult, RESTPostAPIGuildRoleJSONBody, RESTPatchAPIGuildRolePositionsJSONBody, RESTPatchAPIGuildRolePositionsResult, RESTPatchAPIGuildRoleJSONBody, GuildMFALevel, RESTGetAPIGuildPruneCountQuery, RESTGetAPIGuildPruneCountResult, RESTPostAPIGuildPruneJSONBody, RESTPostAPIGuildPruneResult, RESTGetAPIGuildVoiceRegionsResult, RESTGetAPIGuildInvitesResult, RESTGetAPIGuildIntegrationsResult, RESTPatchAPIGuildWidgetSettingsJSONBody, RESTGetAPIGuildVanityUrlResult, GuildWidgetStyle, RESTPatchAPIGuildWelcomeScreenJSONBody, RESTPatchAPIGuildVoiceStateUserJSONBody, RESTGetAPIGuildEmojisResult, RESTPostAPIGuildEmojiJSONBody, RESTPatchAPIGuildEmojiJSONBody, RESTGetAPIGuildScheduledEventsQuery, RESTGetAPIGuildScheduledEventsResult, RESTPostAPIGuildScheduledEventJSONBody, RESTGetAPIGuildScheduledEventQuery, RESTPatchAPIGuildScheduledEventJSONBody, RESTGetAPIGuildScheduledEventUsersQuery, RESTGetAPIGuildScheduledEventUsersResult, RESTGetAPIGuildTemplatesResult, RESTPatchAPIGuildTemplateJSONBody, RESTGetAPIGuildStickersResult, RESTPostAPIGuildStickerFormDataBody, RESTPatchAPIGuildStickerJSONBody, RESTGetAPIAuditLogQuery, RESTGetAPIAutoModerationRulesResult, RESTPostAPIAutoModerationRuleJSONBody, RESTPatchAPIAutoModerationRuleJSONBody, RESTGetAPIGuildMembersSearchQuery, RESTGetAPIGuildMembersSearchResult, RESTPatchAPIGuildMemberJSONBody, RESTPostAPIGuildTemplatesJSONBody, RESTGetAPIGuildWebhooksResult, RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, RESTPutAPIGuildOnboardingJSONBody, RESTPatchAPIWebhookJSONBody, RESTPostAPIWebhookWithTokenJSONBody, RESTPostAPIWebhookWithTokenQuery, RESTPostAPIWebhookWithTokenWaitResult, RESTPostAPIWebhookWithTokenSlackQuery, RESTPostAPIWebhookWithTokenGitHubQuery, RESTGetAPIWebhookWithTokenMessageQuery, RESTPatchAPIWebhookWithTokenMessageJSONBody, RESTPatchAPIWebhookWithTokenMessageQuery, APIInteractionResponseCallbackData, APIInteractionResponseDeferredChannelMessageWithSource, APICommandAutocompleteInteractionResponseCallbackData, APIModalInteractionResponseCallbackData, RESTGetAPIInviteQuery, RESTGetAPISKUsResult, RESTGetAPIEntitlementsQuery, RESTGetAPIEntitlementsResult, RESTPostAPIEntitlementJSONBody, RESTOAuth2AuthorizationQuery, RESTPostOAuth2AccessTokenURLEncodedData, RESTPostOAuth2AccessTokenResult, RESTPostOAuth2RefreshTokenURLEncodedData, RESTPostOAuth2ClientCredentialsURLEncodedData, RESTGetAPIOAuth2CurrentApplicationResult, RESTGetAPIOAuth2CurrentAuthorizationResult, RESTPostOAuth2TokenRevocationQuery, RESTGetAPIPollAnswerVotersQuery, RESTGetAPIPollAnswerVotersResult, RESTGetAPIApplicationRoleConnectionMetadataResult, RESTPutAPIApplicationRoleConnectionMetadataJSONBody, RESTPutAPIApplicationRoleConnectionMetadataResult, RESTPostAPIStageInstanceJSONBody, RESTPatchAPIStageInstanceJSONBody, RESTGetStickerPacksResult, APIThreadMember, RESTGetAPIChannelThreadMembersResult, RESTGetAPICurrentUserGuildsQuery, RESTGetAPICurrentUserGuildsResult, RESTPatchAPICurrentUserJSONBody, RESTGetAPICurrentUserConnectionsResult, RESTPutAPICurrentUserApplicationRoleConnectionJSONBody, RESTGetAPIVoiceRegionsResult } from 'discord-api-types/v10';
3
+ import { Snowflake, RESTGetAPIApplicationCommandsQuery, RESTGetAPIApplicationCommandsResult, RESTPostAPIApplicationCommandsJSONBody, RESTPatchAPIApplicationCommandJSONBody, RESTPutAPIApplicationCommandsJSONBody, RESTPutAPIApplicationCommandsResult, RESTGetAPIApplicationGuildCommandsQuery, RESTGetAPIApplicationGuildCommandsResult, RESTPostAPIApplicationGuildCommandsJSONBody, RESTPostAPIApplicationGuildCommandsResult, RESTGetAPIApplicationGuildCommandResult, RESTPatchAPIApplicationGuildCommandJSONBody, RESTPatchAPIApplicationGuildCommandResult, RESTPutAPIApplicationGuildCommandsJSONBody, RESTPutAPIApplicationGuildCommandsResult, RESTGetAPIGuildApplicationCommandsPermissionsResult, RESTPutAPIApplicationCommandPermissionsJSONBody, RESTPatchCurrentApplicationJSONBody, RESTGetAPIApplicationEmojisResult, RESTPostAPIApplicationEmojiJSONBody, RESTPatchAPIApplicationEmojiJSONBody, RESTPostAPIGuildForumThreadsJSONBody, RESTPostAPIChannelMessageJSONBody, RESTPatchAPIChannelMessageJSONBody, RESTGetAPIChannelMessageReactionUsersQuery, RESTGetAPIChannelMessageReactionUsersResult, RESTPatchAPIChannelJSONBody, RESTGetAPIChannelMessagesQuery, RESTGetAPIChannelMessagesResult, RESTGetAPIChannelPinsResult, RESTPostAPIChannelInviteJSONBody, RESTGetAPIChannelInvitesResult, RESTPostAPIChannelThreadsJSONBody, RESTPostAPIChannelThreadsResult, APIThreadChannel, RESTGetAPIChannelThreadsArchivedQuery, RESTGetAPIChannelUsersThreadsArchivedResult, RESTPostAPIChannelWebhookJSONBody, RESTGetAPIChannelWebhooksResult, RESTPutAPIChannelPermissionJSONBody, RESTGetAPIGuildResult, RESTGetAPIGuildQuery, RESTPostAPIGuildsJSONBody, RESTPatchAPIGuildJSONBody, RESTPutAPIGuildMemberJSONBody, RESTPutAPIGuildMemberResult, RESTGetAPIGuildMembersQuery, RESTGetAPIGuildMembersResult, RESTGetAPIGuildChannelsResult, RESTPostAPIGuildChannelJSONBody, RESTPatchAPIGuildChannelPositionsJSONBody, RESTGetAPIGuildBansQuery, RESTGetAPIGuildBansResult, RESTPutAPIGuildBanJSONBody, RESTPostAPIGuildBulkBanJSONBody, RESTPostAPIGuildBulkBanResult, RESTGetAPIGuildRolesResult, RESTPostAPIGuildRoleJSONBody, RESTPatchAPIGuildRolePositionsJSONBody, RESTPatchAPIGuildRolePositionsResult, RESTPatchAPIGuildRoleJSONBody, GuildMFALevel, RESTGetAPIGuildPruneCountQuery, RESTGetAPIGuildPruneCountResult, RESTPostAPIGuildPruneJSONBody, RESTPostAPIGuildPruneResult, RESTGetAPIGuildVoiceRegionsResult, RESTGetAPIGuildInvitesResult, RESTGetAPIGuildIntegrationsResult, RESTPatchAPIGuildWidgetSettingsJSONBody, RESTGetAPIGuildVanityUrlResult, GuildWidgetStyle, RESTPatchAPIGuildWelcomeScreenJSONBody, RESTPatchAPIGuildVoiceStateUserJSONBody, RESTGetAPIGuildEmojisResult, RESTPostAPIGuildEmojiJSONBody, RESTPatchAPIGuildEmojiJSONBody, RESTGetAPIGuildScheduledEventsQuery, RESTGetAPIGuildScheduledEventsResult, RESTPostAPIGuildScheduledEventJSONBody, RESTGetAPIGuildScheduledEventQuery, RESTPatchAPIGuildScheduledEventJSONBody, RESTGetAPIGuildScheduledEventUsersQuery, RESTGetAPIGuildScheduledEventUsersResult, RESTGetAPIGuildTemplatesResult, RESTPatchAPIGuildTemplateJSONBody, RESTGetAPIGuildStickersResult, RESTPostAPIGuildStickerFormDataBody, RESTPatchAPIGuildStickerJSONBody, RESTGetAPIAuditLogQuery, RESTGetAPIAutoModerationRulesResult, RESTPostAPIAutoModerationRuleJSONBody, RESTPatchAPIAutoModerationRuleJSONBody, RESTGetAPIGuildMembersSearchQuery, RESTGetAPIGuildMembersSearchResult, RESTPatchAPIGuildMemberJSONBody, RESTPostAPIGuildTemplatesJSONBody, RESTGetAPIGuildWebhooksResult, RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, RESTPutAPIGuildOnboardingJSONBody, RESTPatchAPIWebhookJSONBody, RESTPostAPIWebhookWithTokenJSONBody, RESTPostAPIWebhookWithTokenQuery, RESTPostAPIWebhookWithTokenWaitResult, RESTPostAPIWebhookWithTokenSlackQuery, RESTPostAPIWebhookWithTokenGitHubQuery, RESTGetAPIWebhookWithTokenMessageQuery, RESTPatchAPIWebhookWithTokenMessageJSONBody, RESTPatchAPIWebhookWithTokenMessageQuery, APIInteractionResponseCallbackData, APIInteractionResponseDeferredChannelMessageWithSource, APICommandAutocompleteInteractionResponseCallbackData, APIModalInteractionResponseCallbackData, RESTGetAPIInviteQuery, RESTGetAPISKUsResult, RESTGetAPIEntitlementsQuery, RESTGetAPIEntitlementsResult, RESTPostAPIEntitlementJSONBody, RESTOAuth2AuthorizationQuery, RESTPostOAuth2AccessTokenURLEncodedData, RESTPostOAuth2AccessTokenResult, RESTPostOAuth2RefreshTokenURLEncodedData, RESTPostOAuth2ClientCredentialsURLEncodedData, RESTGetAPIOAuth2CurrentApplicationResult, RESTGetAPIOAuth2CurrentAuthorizationResult, RESTPostOAuth2TokenRevocationQuery, RESTGetAPIPollAnswerVotersQuery, RESTGetAPIPollAnswerVotersResult, RESTGetAPIApplicationRoleConnectionMetadataResult, RESTPutAPIApplicationRoleConnectionMetadataJSONBody, RESTPutAPIApplicationRoleConnectionMetadataResult, RESTPostAPIStageInstanceJSONBody, RESTPatchAPIStageInstanceJSONBody, RESTGetStickerPacksResult, APIThreadMember, RESTGetAPIChannelThreadMembersResult, RESTGetAPICurrentUserGuildsQuery, RESTGetAPICurrentUserGuildsResult, RESTPatchAPICurrentUserJSONBody, RESTPatchAPICurrentGuildMemberJSONBody, RESTGetAPICurrentUserConnectionsResult, RESTPutAPICurrentUserApplicationRoleConnectionJSONBody, RESTGetAPIVoiceRegionsResult } from 'discord-api-types/v10';
4
4
  export * from 'discord-api-types/v10';
5
5
  import * as discord_api_types_globals from 'discord-api-types/globals';
6
6
 
@@ -190,7 +190,7 @@ declare class ApplicationsAPI {
190
190
  * @param emojiId - The id of the emoji to fetch
191
191
  * @param options - The options for fetching the emoji
192
192
  */
193
- getEmoji(applicationId: Snowflake, emojiId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIEmoji>;
193
+ getEmoji(applicationId: Snowflake, emojiId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIApplicationEmoji>;
194
194
  /**
195
195
  * Creates a new emoji of an application
196
196
  *
@@ -199,7 +199,7 @@ declare class ApplicationsAPI {
199
199
  * @param body - The data for creating the emoji
200
200
  * @param options - The options for creating the emoji
201
201
  */
202
- createEmoji(applicationId: Snowflake, body: RESTPostAPIApplicationEmojiJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIEmoji>;
202
+ createEmoji(applicationId: Snowflake, body: RESTPostAPIApplicationEmojiJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIApplicationEmoji>;
203
203
  /**
204
204
  * Edits an emoji of an application
205
205
  *
@@ -209,7 +209,7 @@ declare class ApplicationsAPI {
209
209
  * @param body - The data for editing the emoji
210
210
  * @param options - The options for editing the emoji
211
211
  */
212
- editEmoji(applicationId: Snowflake, emojiId: Snowflake, body: RESTPatchAPIApplicationEmojiJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIEmoji>;
212
+ editEmoji(applicationId: Snowflake, emojiId: Snowflake, body: RESTPatchAPIApplicationEmojiJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIApplicationEmoji>;
213
213
  /**
214
214
  * Deletes an emoji of an application
215
215
  *
@@ -329,7 +329,7 @@ declare class ChannelsAPI {
329
329
  * @param body - The new channel data
330
330
  * @param options - The options for editing the channel
331
331
  */
332
- edit(channelId: Snowflake, body: RESTPatchAPIChannelJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIChannel>;
332
+ edit(channelId: Snowflake, body: RESTPatchAPIChannelJSONBody, { signal, reason }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APIChannel>;
333
333
  /**
334
334
  * Deletes a channel
335
335
  *
@@ -337,7 +337,7 @@ declare class ChannelsAPI {
337
337
  * @param channelId - The id of the channel to delete
338
338
  * @param options - The options for deleting the channel
339
339
  */
340
- delete(channelId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIChannel>;
340
+ delete(channelId: Snowflake, { signal, reason }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APIChannel>;
341
341
  /**
342
342
  * Fetches the messages of a channel
343
343
  *
@@ -453,7 +453,7 @@ declare class ChannelsAPI {
453
453
  * @param messageId - The id of the message to start the thread from
454
454
  * @param options - The options for starting the thread
455
455
  */
456
- createThread(channelId: Snowflake, body: RESTPostAPIChannelThreadsJSONBody, messageId?: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIChannel>;
456
+ createThread(channelId: Snowflake, body: RESTPostAPIChannelThreadsJSONBody, messageId?: Snowflake, { signal, reason }?: Pick<RequestData, 'reason' | 'signal'>): Promise<RESTPostAPIChannelThreadsResult>;
457
457
  /**
458
458
  * Creates a new forum post
459
459
  *
@@ -462,7 +462,7 @@ declare class ChannelsAPI {
462
462
  * @param body - The data for starting the thread
463
463
  * @param options - The options for starting the thread
464
464
  */
465
- createForumThread(channelId: Snowflake, { message, ...optionsBody }: StartForumThreadOptions, { signal }?: Pick<RequestData, 'signal'>): Promise<APIThreadChannel>;
465
+ createForumThread(channelId: Snowflake, { message, ...optionsBody }: StartForumThreadOptions, { signal, reason }?: Pick<RequestData, 'reason' | 'signal'>): Promise<APIThreadChannel<discord_api_types_v10.ThreadChannelType>>;
466
466
  /**
467
467
  * Fetches the archived threads of a channel
468
468
  *
@@ -555,6 +555,7 @@ declare class GuildsAPI {
555
555
  * @see {@link https://discord.com/developers/docs/resources/guild#create-guild}
556
556
  * @param body - The guild to create
557
557
  * @param options - The options for creating the guild
558
+ * @deprecated API related to guild ownership may no longer be used.
558
559
  */
559
560
  create(body: RESTPostAPIGuildsJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIGuild>;
560
561
  /**
@@ -572,8 +573,9 @@ declare class GuildsAPI {
572
573
  * @see {@link https://discord.com/developers/docs/resources/guild#delete-guild}
573
574
  * @param guildId - The id of the guild to delete
574
575
  * @param options - The options for deleting this guild
576
+ * @deprecated API related to guild ownership may no longer be used.
575
577
  */
576
- delete(guildId: Snowflake, { signal, reason }?: Pick<RequestData, 'reason' | 'signal'>): Promise<void>;
578
+ delete(guildId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<void>;
577
579
  /**
578
580
  * Adds user to the guild
579
581
  *
@@ -734,6 +736,7 @@ declare class GuildsAPI {
734
736
  * @param guildId - The id of the guild to edit the MFA level for
735
737
  * @param level - The new MFA level
736
738
  * @param options - The options for editing the MFA level
739
+ * @deprecated API related to guild ownership may no longer be used.
737
740
  */
738
741
  editMFALevel(guildId: Snowflake, level: GuildMFALevel, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.RESTPostAPIGuildsMFAJSONBody>;
739
742
  /**
@@ -1165,11 +1168,11 @@ declare class GuildsAPI {
1165
1168
  * Creates a new template
1166
1169
  *
1167
1170
  * @see {@link https://discord.com/developers/docs/resources/guild-template#create-guild-template}
1168
- * @param templateCode - The code of the template
1171
+ * @param guildId - The id of the guild
1169
1172
  * @param body - The data for creating the template
1170
1173
  * @param options - The options for creating the template
1171
1174
  */
1172
- createTemplate(templateCode: string, body: RESTPostAPIGuildTemplatesJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APITemplate>;
1175
+ createTemplate(guildId: Snowflake, body: RESTPostAPIGuildTemplatesJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APITemplate>;
1173
1176
  /**
1174
1177
  * Fetches webhooks for a guild
1175
1178
  *
@@ -1822,7 +1825,7 @@ declare class UsersAPI {
1822
1825
  * @param body - The new data for the guild member
1823
1826
  * @param options - The options for editing the guild member
1824
1827
  */
1825
- editCurrentGuildMember(guildId: Snowflake, body?: RESTPatchAPIGuildMemberJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APIGuildMember>;
1828
+ editCurrentGuildMember(guildId: Snowflake, body?: RESTPatchAPICurrentGuildMemberJSONBody, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APIGuildMember>;
1826
1829
  /**
1827
1830
  * Opens a new DM channel with a user
1828
1831
  *
package/dist/http-only.js CHANGED
@@ -507,8 +507,12 @@ var ChannelsAPI = class {
507
507
  * @param body - The new channel data
508
508
  * @param options - The options for editing the channel
509
509
  */
510
- async edit(channelId, body, { signal } = {}) {
511
- return this.rest.patch(import_v103.Routes.channel(channelId), { body, signal });
510
+ async edit(channelId, body, { signal, reason } = {}) {
511
+ return this.rest.patch(import_v103.Routes.channel(channelId), {
512
+ reason,
513
+ body,
514
+ signal
515
+ });
512
516
  }
513
517
  /**
514
518
  * Deletes a channel
@@ -517,8 +521,8 @@ var ChannelsAPI = class {
517
521
  * @param channelId - The id of the channel to delete
518
522
  * @param options - The options for deleting the channel
519
523
  */
520
- async delete(channelId, { signal } = {}) {
521
- return this.rest.delete(import_v103.Routes.channel(channelId), { signal });
524
+ async delete(channelId, { signal, reason } = {}) {
525
+ return this.rest.delete(import_v103.Routes.channel(channelId), { signal, reason });
522
526
  }
523
527
  /**
524
528
  * Fetches the messages of a channel
@@ -674,10 +678,11 @@ var ChannelsAPI = class {
674
678
  * @param messageId - The id of the message to start the thread from
675
679
  * @param options - The options for starting the thread
676
680
  */
677
- async createThread(channelId, body, messageId, { signal } = {}) {
681
+ async createThread(channelId, body, messageId, { signal, reason } = {}) {
678
682
  return this.rest.post(import_v103.Routes.threads(channelId, messageId), {
679
683
  body,
680
- signal
684
+ signal,
685
+ reason
681
686
  });
682
687
  }
683
688
  /**
@@ -688,13 +693,18 @@ var ChannelsAPI = class {
688
693
  * @param body - The data for starting the thread
689
694
  * @param options - The options for starting the thread
690
695
  */
691
- async createForumThread(channelId, { message, ...optionsBody }, { signal } = {}) {
696
+ async createForumThread(channelId, { message, ...optionsBody }, { signal, reason } = {}) {
692
697
  const { files, ...messageBody } = message;
693
698
  const body = {
694
699
  ...optionsBody,
695
700
  message: messageBody
696
701
  };
697
- return this.rest.post(import_v103.Routes.threads(channelId), { files, body, signal });
702
+ return this.rest.post(import_v103.Routes.threads(channelId), {
703
+ files,
704
+ body,
705
+ reason,
706
+ signal
707
+ });
698
708
  }
699
709
  /**
700
710
  * Fetches the archived threads of a channel
@@ -893,6 +903,7 @@ var GuildsAPI = class {
893
903
  * @see {@link https://discord.com/developers/docs/resources/guild#create-guild}
894
904
  * @param body - The guild to create
895
905
  * @param options - The options for creating the guild
906
+ * @deprecated API related to guild ownership may no longer be used.
896
907
  */
897
908
  async create(body, { signal } = {}) {
898
909
  return this.rest.post(import_v105.Routes.guilds(), { body, signal });
@@ -918,9 +929,10 @@ var GuildsAPI = class {
918
929
  * @see {@link https://discord.com/developers/docs/resources/guild#delete-guild}
919
930
  * @param guildId - The id of the guild to delete
920
931
  * @param options - The options for deleting this guild
932
+ * @deprecated API related to guild ownership may no longer be used.
921
933
  */
922
- async delete(guildId, { signal, reason } = {}) {
923
- await this.rest.delete(import_v105.Routes.guild(guildId), { reason, signal });
934
+ async delete(guildId, { signal } = {}) {
935
+ await this.rest.delete(import_v105.Routes.guild(guildId), { signal });
924
936
  }
925
937
  /**
926
938
  * Adds user to the guild
@@ -1143,6 +1155,7 @@ var GuildsAPI = class {
1143
1155
  * @param guildId - The id of the guild to edit the MFA level for
1144
1156
  * @param level - The new MFA level
1145
1157
  * @param options - The options for editing the MFA level
1158
+ * @deprecated API related to guild ownership may no longer be used.
1146
1159
  */
1147
1160
  async editMFALevel(guildId, level, { reason, signal } = {}) {
1148
1161
  return this.rest.post(import_v105.Routes.guildMFA(guildId), {
@@ -1755,12 +1768,12 @@ var GuildsAPI = class {
1755
1768
  * Creates a new template
1756
1769
  *
1757
1770
  * @see {@link https://discord.com/developers/docs/resources/guild-template#create-guild-template}
1758
- * @param templateCode - The code of the template
1771
+ * @param guildId - The id of the guild
1759
1772
  * @param body - The data for creating the template
1760
1773
  * @param options - The options for creating the template
1761
1774
  */
1762
- async createTemplate(templateCode, body, { signal } = {}) {
1763
- return this.rest.post(import_v105.Routes.template(templateCode), { body, signal });
1775
+ async createTemplate(guildId, body, { signal } = {}) {
1776
+ return this.rest.post(import_v105.Routes.guildTemplates(guildId), { body, signal });
1764
1777
  }
1765
1778
  /**
1766
1779
  * Fetches webhooks for a guild
@@ -2878,7 +2891,7 @@ __name(withFiles, "withFiles");
2878
2891
 
2879
2892
  // src/http-only/index.ts
2880
2893
  __reExport(http_only_exports, require("discord-api-types/v10"), module.exports);
2881
- var version = "2.2.0";
2894
+ var version = "2.2.2";
2882
2895
  // Annotate the CommonJS export names for ESM import in node:
2883
2896
  0 && (module.exports = {
2884
2897
  API,