@discordjs/core 2.4.0 → 2.5.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/http-only.d.mts +20 -11
- package/dist/http-only.d.ts +20 -11
- package/dist/http-only.js +16 -2
- package/dist/http-only.js.map +1 -1
- package/dist/http-only.mjs +19 -3
- package/dist/http-only.mjs.map +1 -1
- package/dist/index.d.mts +20 -11
- package/dist/index.d.ts +20 -11
- package/dist/index.js +16 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +19 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +13 -13
package/dist/http-only.d.mts
CHANGED
|
@@ -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,
|
|
3
|
+
import { Snowflake, RESTGetAPIApplicationCommandsQuery, RESTGetAPIApplicationCommandsResult, RESTPostAPIApplicationCommandsJSONBody, RESTPatchAPIApplicationCommandJSONBody, RESTPutAPIApplicationCommandsJSONBody, RESTPutAPIApplicationCommandsResult, RESTGetAPIApplicationGuildCommandsQuery, RESTGetAPIApplicationGuildCommandsResult, RESTPostAPIApplicationGuildCommandsJSONBody, RESTPostAPIApplicationGuildCommandsResult, RESTGetAPIApplicationGuildCommandResult, RESTPatchAPIApplicationGuildCommandJSONBody, RESTPatchAPIApplicationGuildCommandResult, RESTPutAPIApplicationGuildCommandsJSONBody, RESTPutAPIApplicationGuildCommandsResult, RESTGetAPIGuildApplicationCommandsPermissionsResult, RESTPutAPIApplicationCommandPermissionsJSONBody, RESTPatchCurrentApplicationJSONBody, RESTGetAPIApplicationEmojisResult, RESTPostAPIApplicationEmojiJSONBody, RESTPatchAPIApplicationEmojiJSONBody, RESTPostAPIChannelMessageJSONBody, RESTPatchAPIChannelMessageJSONBody, RESTGetAPIChannelMessageReactionUsersQuery, RESTGetAPIChannelMessageReactionUsersResult, RESTPatchAPIChannelJSONBody, RESTGetAPIChannelMessagesQuery, RESTGetAPIChannelMessagesResult, RESTGetAPIChannelPinsResult, RESTPostAPIChannelInviteJSONBody, RESTGetAPIChannelInvitesResult, RESTPostAPIChannelThreadsJSONBody, RESTPostAPIChannelThreadsResult, RESTPostAPIGuildForumThreadsJSONBody, APIThreadChannel, RESTGetAPIChannelThreadsArchivedQuery, RESTGetAPIChannelUsersThreadsArchivedResult, RESTPostAPIChannelWebhookJSONBody, RESTGetAPIChannelWebhooksResult, RESTPutAPIChannelPermissionJSONBody, RESTPostAPISoundboardSendSoundJSONBody, RESTPutAPIChannelRecipientJSONBody, 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, RESTGetAPIGuildMessagesSearchQuery, RESTGetAPIGuildMessagesSearchResult, RESTPatchAPIGuildMemberJSONBody, RESTPostAPIGuildTemplatesJSONBody, RESTGetAPIGuildWebhooksResult, RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, RESTPutAPIGuildOnboardingJSONBody, RESTGetAPIGuildSoundboardSoundsResult, RESTPostAPIGuildSoundboardSoundJSONBody, RESTPatchAPIGuildSoundboardSoundJSONBody, RESTPutAPIGuildIncidentActionsJSONBody, RESTPatchAPIWebhookJSONBody, RESTPostAPIWebhookWithTokenJSONBody, RESTPostAPIWebhookWithTokenQuery, RESTPostAPIWebhookWithTokenWaitResult, RESTPostAPIWebhookWithTokenSlackQuery, RESTPostAPIWebhookWithTokenGitHubQuery, RESTGetAPIWebhookWithTokenMessageQuery, RESTPatchAPIWebhookWithTokenMessageJSONBody, RESTPatchAPIWebhookWithTokenMessageQuery, APIInteractionResponseCallbackData, RESTPostAPIInteractionCallbackQuery, RESTPostAPIInteractionCallbackWithResponseResult, APIInteractionResponseDeferredChannelMessageWithSource, APICommandAutocompleteInteractionResponseCallbackData, APIModalInteractionResponseCallbackData, RESTGetAPIInviteQuery, RESTGetAPISKUsResult, RESTGetAPISKUSubscriptionsQuery, RESTGetAPISKUSubscriptionsResult, RESTGetAPIEntitlementsQuery, RESTGetAPIEntitlementsResult, RESTPostAPIEntitlementJSONBody, RESTOAuth2AuthorizationQuery, RESTPostOAuth2AccessTokenURLEncodedData, RESTPostOAuth2AccessTokenResult, RESTPostOAuth2RefreshTokenURLEncodedData, RESTPostOAuth2ClientCredentialsURLEncodedData, RESTGetAPIOAuth2CurrentAuthorizationResult, RESTPostOAuth2TokenRevocationQuery, RESTGetAPIPollAnswerVotersQuery, RESTGetAPIPollAnswerVotersResult, RESTGetAPIApplicationRoleConnectionMetadataResult, RESTPutAPIApplicationRoleConnectionMetadataJSONBody, RESTPutAPIApplicationRoleConnectionMetadataResult, RESTGetAPISoundboardDefaultSoundsResult, 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
|
|
|
@@ -528,7 +528,7 @@ declare class ChannelsAPI {
|
|
|
528
528
|
* @param body - The data for sending the soundboard sound
|
|
529
529
|
* @param options - The options for sending the soundboard sound
|
|
530
530
|
*/
|
|
531
|
-
sendSoundboardSound(channelId: Snowflake, body: RESTPostAPISoundboardSendSoundJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<
|
|
531
|
+
sendSoundboardSound(channelId: Snowflake, body: RESTPostAPISoundboardSendSoundJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<never>;
|
|
532
532
|
/**
|
|
533
533
|
* Adds a recipient to a group DM channel
|
|
534
534
|
*
|
|
@@ -1167,6 +1167,15 @@ declare class GuildsAPI {
|
|
|
1167
1167
|
* @param options - The options for searching for guild members
|
|
1168
1168
|
*/
|
|
1169
1169
|
searchForMembers(guildId: Snowflake, query: RESTGetAPIGuildMembersSearchQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIGuildMembersSearchResult>;
|
|
1170
|
+
/**
|
|
1171
|
+
* Searches for messages.
|
|
1172
|
+
*
|
|
1173
|
+
* @see {@link https://docs.discord.com/developers/resources/message#search-guild-messages}
|
|
1174
|
+
* @param guildId - The id of the guild to search in
|
|
1175
|
+
* @param query - The query to search for
|
|
1176
|
+
* @param options - The options for searching for messages
|
|
1177
|
+
*/
|
|
1178
|
+
searchForMessages(guildId: Snowflake, query: RESTGetAPIGuildMessagesSearchQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIGuildMessagesSearchResult>;
|
|
1170
1179
|
/**
|
|
1171
1180
|
* Edits a guild member
|
|
1172
1181
|
*
|
|
@@ -1770,7 +1779,7 @@ declare class InvitesAPI {
|
|
|
1770
1779
|
* @param code - The invite code
|
|
1771
1780
|
* @param options - The options for deleting the invite
|
|
1772
1781
|
*/
|
|
1773
|
-
delete(code: string, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<
|
|
1782
|
+
delete(code: string, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APIInvite>;
|
|
1774
1783
|
}
|
|
1775
1784
|
|
|
1776
1785
|
declare class MonetizationAPI {
|
|
@@ -1891,7 +1900,7 @@ declare class OAuth2API {
|
|
|
1891
1900
|
* @see {@link https://discord.com/developers/docs/topics/oauth2#get-current-bot-application-information}
|
|
1892
1901
|
* @param options - The options for the current bot application information request
|
|
1893
1902
|
*/
|
|
1894
|
-
getCurrentBotApplicationInformation({ signal }?: Pick<RequestData, 'signal'>): Promise<
|
|
1903
|
+
getCurrentBotApplicationInformation({ signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIApplication>;
|
|
1895
1904
|
/**
|
|
1896
1905
|
* Fetches the current authorization information
|
|
1897
1906
|
*
|
|
@@ -2277,18 +2286,18 @@ declare function withFiles(files: DescriptiveRawFile[], options: APIInteractionR
|
|
|
2277
2286
|
description: string | undefined;
|
|
2278
2287
|
}[];
|
|
2279
2288
|
flags?: discord_api_types_v10.MessageFlags | undefined;
|
|
2280
|
-
content?: string | undefined;
|
|
2281
|
-
tts?: boolean | undefined;
|
|
2282
|
-
embeds?: discord_api_types_v10.APIEmbed[] | undefined;
|
|
2289
|
+
content?: string | undefined | undefined;
|
|
2290
|
+
tts?: boolean | undefined | undefined;
|
|
2291
|
+
embeds?: discord_api_types_v10.APIEmbed[] | undefined | undefined;
|
|
2283
2292
|
allowed_mentions?: discord_api_types_v10.APIAllowedMentions | undefined;
|
|
2284
|
-
components?: discord_api_types_v10.APIMessageTopLevelComponent[] | undefined;
|
|
2293
|
+
components?: discord_api_types_v10.APIMessageTopLevelComponent[] | undefined | undefined;
|
|
2285
2294
|
poll?: discord_api_types_v10.RESTAPIPoll | undefined;
|
|
2286
|
-
applied_tags?: discord_api_types_globals.Snowflake[] | undefined;
|
|
2287
|
-
thread_name?: string | undefined;
|
|
2295
|
+
applied_tags?: discord_api_types_globals.Snowflake[] | undefined | undefined;
|
|
2296
|
+
thread_name?: string | undefined | undefined;
|
|
2288
2297
|
};
|
|
2289
2298
|
files: {
|
|
2290
2299
|
name: string;
|
|
2291
|
-
data: string | number | boolean | Uint8Array | Buffer
|
|
2300
|
+
data: string | number | boolean | Uint8Array<ArrayBufferLike> | Buffer<ArrayBufferLike>;
|
|
2292
2301
|
}[];
|
|
2293
2302
|
};
|
|
2294
2303
|
|
package/dist/http-only.d.ts
CHANGED
|
@@ -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,
|
|
3
|
+
import { Snowflake, RESTGetAPIApplicationCommandsQuery, RESTGetAPIApplicationCommandsResult, RESTPostAPIApplicationCommandsJSONBody, RESTPatchAPIApplicationCommandJSONBody, RESTPutAPIApplicationCommandsJSONBody, RESTPutAPIApplicationCommandsResult, RESTGetAPIApplicationGuildCommandsQuery, RESTGetAPIApplicationGuildCommandsResult, RESTPostAPIApplicationGuildCommandsJSONBody, RESTPostAPIApplicationGuildCommandsResult, RESTGetAPIApplicationGuildCommandResult, RESTPatchAPIApplicationGuildCommandJSONBody, RESTPatchAPIApplicationGuildCommandResult, RESTPutAPIApplicationGuildCommandsJSONBody, RESTPutAPIApplicationGuildCommandsResult, RESTGetAPIGuildApplicationCommandsPermissionsResult, RESTPutAPIApplicationCommandPermissionsJSONBody, RESTPatchCurrentApplicationJSONBody, RESTGetAPIApplicationEmojisResult, RESTPostAPIApplicationEmojiJSONBody, RESTPatchAPIApplicationEmojiJSONBody, RESTPostAPIChannelMessageJSONBody, RESTPatchAPIChannelMessageJSONBody, RESTGetAPIChannelMessageReactionUsersQuery, RESTGetAPIChannelMessageReactionUsersResult, RESTPatchAPIChannelJSONBody, RESTGetAPIChannelMessagesQuery, RESTGetAPIChannelMessagesResult, RESTGetAPIChannelPinsResult, RESTPostAPIChannelInviteJSONBody, RESTGetAPIChannelInvitesResult, RESTPostAPIChannelThreadsJSONBody, RESTPostAPIChannelThreadsResult, RESTPostAPIGuildForumThreadsJSONBody, APIThreadChannel, RESTGetAPIChannelThreadsArchivedQuery, RESTGetAPIChannelUsersThreadsArchivedResult, RESTPostAPIChannelWebhookJSONBody, RESTGetAPIChannelWebhooksResult, RESTPutAPIChannelPermissionJSONBody, RESTPostAPISoundboardSendSoundJSONBody, RESTPutAPIChannelRecipientJSONBody, 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, RESTGetAPIGuildMessagesSearchQuery, RESTGetAPIGuildMessagesSearchResult, RESTPatchAPIGuildMemberJSONBody, RESTPostAPIGuildTemplatesJSONBody, RESTGetAPIGuildWebhooksResult, RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, RESTPutAPIGuildOnboardingJSONBody, RESTGetAPIGuildSoundboardSoundsResult, RESTPostAPIGuildSoundboardSoundJSONBody, RESTPatchAPIGuildSoundboardSoundJSONBody, RESTPutAPIGuildIncidentActionsJSONBody, RESTPatchAPIWebhookJSONBody, RESTPostAPIWebhookWithTokenJSONBody, RESTPostAPIWebhookWithTokenQuery, RESTPostAPIWebhookWithTokenWaitResult, RESTPostAPIWebhookWithTokenSlackQuery, RESTPostAPIWebhookWithTokenGitHubQuery, RESTGetAPIWebhookWithTokenMessageQuery, RESTPatchAPIWebhookWithTokenMessageJSONBody, RESTPatchAPIWebhookWithTokenMessageQuery, APIInteractionResponseCallbackData, RESTPostAPIInteractionCallbackQuery, RESTPostAPIInteractionCallbackWithResponseResult, APIInteractionResponseDeferredChannelMessageWithSource, APICommandAutocompleteInteractionResponseCallbackData, APIModalInteractionResponseCallbackData, RESTGetAPIInviteQuery, RESTGetAPISKUsResult, RESTGetAPISKUSubscriptionsQuery, RESTGetAPISKUSubscriptionsResult, RESTGetAPIEntitlementsQuery, RESTGetAPIEntitlementsResult, RESTPostAPIEntitlementJSONBody, RESTOAuth2AuthorizationQuery, RESTPostOAuth2AccessTokenURLEncodedData, RESTPostOAuth2AccessTokenResult, RESTPostOAuth2RefreshTokenURLEncodedData, RESTPostOAuth2ClientCredentialsURLEncodedData, RESTGetAPIOAuth2CurrentAuthorizationResult, RESTPostOAuth2TokenRevocationQuery, RESTGetAPIPollAnswerVotersQuery, RESTGetAPIPollAnswerVotersResult, RESTGetAPIApplicationRoleConnectionMetadataResult, RESTPutAPIApplicationRoleConnectionMetadataJSONBody, RESTPutAPIApplicationRoleConnectionMetadataResult, RESTGetAPISoundboardDefaultSoundsResult, 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
|
|
|
@@ -528,7 +528,7 @@ declare class ChannelsAPI {
|
|
|
528
528
|
* @param body - The data for sending the soundboard sound
|
|
529
529
|
* @param options - The options for sending the soundboard sound
|
|
530
530
|
*/
|
|
531
|
-
sendSoundboardSound(channelId: Snowflake, body: RESTPostAPISoundboardSendSoundJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<
|
|
531
|
+
sendSoundboardSound(channelId: Snowflake, body: RESTPostAPISoundboardSendSoundJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<never>;
|
|
532
532
|
/**
|
|
533
533
|
* Adds a recipient to a group DM channel
|
|
534
534
|
*
|
|
@@ -1167,6 +1167,15 @@ declare class GuildsAPI {
|
|
|
1167
1167
|
* @param options - The options for searching for guild members
|
|
1168
1168
|
*/
|
|
1169
1169
|
searchForMembers(guildId: Snowflake, query: RESTGetAPIGuildMembersSearchQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIGuildMembersSearchResult>;
|
|
1170
|
+
/**
|
|
1171
|
+
* Searches for messages.
|
|
1172
|
+
*
|
|
1173
|
+
* @see {@link https://docs.discord.com/developers/resources/message#search-guild-messages}
|
|
1174
|
+
* @param guildId - The id of the guild to search in
|
|
1175
|
+
* @param query - The query to search for
|
|
1176
|
+
* @param options - The options for searching for messages
|
|
1177
|
+
*/
|
|
1178
|
+
searchForMessages(guildId: Snowflake, query: RESTGetAPIGuildMessagesSearchQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIGuildMessagesSearchResult>;
|
|
1170
1179
|
/**
|
|
1171
1180
|
* Edits a guild member
|
|
1172
1181
|
*
|
|
@@ -1770,7 +1779,7 @@ declare class InvitesAPI {
|
|
|
1770
1779
|
* @param code - The invite code
|
|
1771
1780
|
* @param options - The options for deleting the invite
|
|
1772
1781
|
*/
|
|
1773
|
-
delete(code: string, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<
|
|
1782
|
+
delete(code: string, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<discord_api_types_v10.APIInvite>;
|
|
1774
1783
|
}
|
|
1775
1784
|
|
|
1776
1785
|
declare class MonetizationAPI {
|
|
@@ -1891,7 +1900,7 @@ declare class OAuth2API {
|
|
|
1891
1900
|
* @see {@link https://discord.com/developers/docs/topics/oauth2#get-current-bot-application-information}
|
|
1892
1901
|
* @param options - The options for the current bot application information request
|
|
1893
1902
|
*/
|
|
1894
|
-
getCurrentBotApplicationInformation({ signal }?: Pick<RequestData, 'signal'>): Promise<
|
|
1903
|
+
getCurrentBotApplicationInformation({ signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIApplication>;
|
|
1895
1904
|
/**
|
|
1896
1905
|
* Fetches the current authorization information
|
|
1897
1906
|
*
|
|
@@ -2277,18 +2286,18 @@ declare function withFiles(files: DescriptiveRawFile[], options: APIInteractionR
|
|
|
2277
2286
|
description: string | undefined;
|
|
2278
2287
|
}[];
|
|
2279
2288
|
flags?: discord_api_types_v10.MessageFlags | undefined;
|
|
2280
|
-
content?: string | undefined;
|
|
2281
|
-
tts?: boolean | undefined;
|
|
2282
|
-
embeds?: discord_api_types_v10.APIEmbed[] | undefined;
|
|
2289
|
+
content?: string | undefined | undefined;
|
|
2290
|
+
tts?: boolean | undefined | undefined;
|
|
2291
|
+
embeds?: discord_api_types_v10.APIEmbed[] | undefined | undefined;
|
|
2283
2292
|
allowed_mentions?: discord_api_types_v10.APIAllowedMentions | undefined;
|
|
2284
|
-
components?: discord_api_types_v10.APIMessageTopLevelComponent[] | undefined;
|
|
2293
|
+
components?: discord_api_types_v10.APIMessageTopLevelComponent[] | undefined | undefined;
|
|
2285
2294
|
poll?: discord_api_types_v10.RESTAPIPoll | undefined;
|
|
2286
|
-
applied_tags?: discord_api_types_globals.Snowflake[] | undefined;
|
|
2287
|
-
thread_name?: string | undefined;
|
|
2295
|
+
applied_tags?: discord_api_types_globals.Snowflake[] | undefined | undefined;
|
|
2296
|
+
thread_name?: string | undefined | undefined;
|
|
2288
2297
|
};
|
|
2289
2298
|
files: {
|
|
2290
2299
|
name: string;
|
|
2291
|
-
data: string | number | boolean | Uint8Array | Buffer
|
|
2300
|
+
data: string | number | boolean | Uint8Array<ArrayBufferLike> | Buffer<ArrayBufferLike>;
|
|
2292
2301
|
}[];
|
|
2293
2302
|
};
|
|
2294
2303
|
|
package/dist/http-only.js
CHANGED
|
@@ -1779,6 +1779,20 @@ var GuildsAPI = class {
|
|
|
1779
1779
|
signal
|
|
1780
1780
|
});
|
|
1781
1781
|
}
|
|
1782
|
+
/**
|
|
1783
|
+
* Searches for messages.
|
|
1784
|
+
*
|
|
1785
|
+
* @see {@link https://docs.discord.com/developers/resources/message#search-guild-messages}
|
|
1786
|
+
* @param guildId - The id of the guild to search in
|
|
1787
|
+
* @param query - The query to search for
|
|
1788
|
+
* @param options - The options for searching for messages
|
|
1789
|
+
*/
|
|
1790
|
+
async searchForMessages(guildId, query, { signal } = {}) {
|
|
1791
|
+
return this.rest.get(import_v106.Routes.guildMessagesSearch(guildId), {
|
|
1792
|
+
query: (0, import_rest3.makeURLSearchParams)(query),
|
|
1793
|
+
signal
|
|
1794
|
+
});
|
|
1795
|
+
}
|
|
1782
1796
|
/**
|
|
1783
1797
|
* Edits a guild member
|
|
1784
1798
|
*
|
|
@@ -2185,7 +2199,7 @@ var InvitesAPI = class {
|
|
|
2185
2199
|
* @param options - The options for deleting the invite
|
|
2186
2200
|
*/
|
|
2187
2201
|
async delete(code, { reason, signal } = {}) {
|
|
2188
|
-
|
|
2202
|
+
return this.rest.delete(import_v108.Routes.invite(code), { reason, signal });
|
|
2189
2203
|
}
|
|
2190
2204
|
};
|
|
2191
2205
|
|
|
@@ -3075,7 +3089,7 @@ __name(withFiles, "withFiles");
|
|
|
3075
3089
|
|
|
3076
3090
|
// src/http-only/index.ts
|
|
3077
3091
|
__reExport(http_only_exports, require("discord-api-types/v10"), module.exports);
|
|
3078
|
-
var version = "2.
|
|
3092
|
+
var version = "2.5.0";
|
|
3079
3093
|
// Annotate the CommonJS export names for ESM import in node:
|
|
3080
3094
|
0 && (module.exports = {
|
|
3081
3095
|
API,
|