@discordjs/core 0.7.0-dev.1683763756-1edd01a.0 → 0.7.0-dev.1684065875-590f5bc.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/{files-7932138f.d.ts → files-5bae27a9.d.ts} +14 -4
- package/dist/http-only.d.ts +1 -1
- package/dist/http-only.js +20 -5
- package/dist/http-only.js.map +1 -1
- package/dist/http-only.mjs +20 -5
- package/dist/http-only.mjs.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +20 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +20 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -7
|
@@ -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, RESTGetAPIGuildApplicationCommandsPermissionsResult, RESTPutAPIApplicationCommandPermissionsJSONBody, RESTPostAPIChannelMessageJSONBody, RESTPatchAPIChannelMessageJSONBody, RESTGetAPIChannelMessageReactionUsersQuery, RESTGetAPIChannelMessageReactionUsersResult, RESTPatchAPIChannelJSONBody, RESTGetAPIChannelMessagesQuery, RESTGetAPIChannelMessagesResult, RESTGetAPIChannelPinsResult, RESTPostAPIChannelInviteJSONBody, RESTGetAPIChannelInvitesResult, RESTGetAPIChannelThreadsArchivedQuery, RESTGetAPIChannelUsersThreadsArchivedResult, RESTGetAPIChannelWebhooksResult, RESTPostAPIGuildsJSONBody, RESTPatchAPIGuildJSONBody, RESTGetAPIGuildMembersQuery, RESTGetAPIGuildMembersResult, RESTGetAPIGuildChannelsResult, RESTPostAPIGuildChannelJSONBody, RESTPatchAPIGuildChannelPositionsJSONBody, RESTGetAPIGuildBansResult, RESTPutAPIGuildBanJSONBody, RESTGetAPIGuildRolesResult, RESTPostAPIGuildRoleJSONBody, RESTPatchAPIGuildRolePositionsJSONBody, RESTPatchAPIGuildRolePositionsResult, RESTPatchAPIGuildRoleJSONBody, GuildMFALevel, RESTGetAPIGuildPruneCountQuery, RESTGetAPIGuildPruneCountResult, RESTPostAPIGuildPruneJSONBody, 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, RESTPostAPITemplateCreateGuildJSONBody, RESTGetAPIGuildWebhooksResult, RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, RESTPostAPIChannelWebhookJSONBody, RESTPatchAPIWebhookJSONBody, RESTPostAPIWebhookWithTokenJSONBody, RESTPostAPIWebhookWithTokenQuery, RESTPostAPIWebhookWithTokenWaitResult, RESTPostAPIWebhookWithTokenSlackQuery, RESTPostAPIWebhookWithTokenGitHubQuery, RESTGetAPIWebhookWithTokenMessageQuery, RESTPatchAPIWebhookWithTokenMessageJSONBody, APIInteractionResponseCallbackData, APIInteractionResponseDeferredChannelMessageWithSource, APICommandAutocompleteInteractionResponseCallbackData, APIModalInteractionResponseCallbackData, RESTGetAPIInviteQuery, RESTOAuth2AuthorizationQuery, RESTPostOAuth2AccessTokenURLEncodedData, RESTPostOAuth2AccessTokenResult, RESTPostOAuth2RefreshTokenURLEncodedData, RESTPostOAuth2ClientCredentialsURLEncodedData, RESTGetAPIOAuth2CurrentApplicationResult, RESTGetAPIOAuth2CurrentAuthorizationResult, RESTGetAPIApplicationRoleConnectionMetadataResult, RESTPutAPIApplicationRoleConnectionMetadataJSONBody, RESTPutAPIApplicationRoleConnectionMetadataResult, RESTGetNitroStickerPacksResult, RESTPostAPIGuildForumThreadsJSONBody, APIThreadChannel, RESTPostAPIChannelThreadsJSONBody, APIThreadMember, RESTGetAPIChannelThreadMembersResult, RESTGetAPICurrentUserGuildsQuery, RESTGetAPICurrentUserGuildsResult, RESTPatchAPICurrentUserJSONBody, RESTGetAPICurrentUserConnectionsResult, RESTPutAPICurrentUserApplicationRoleConnectionJSONBody, RESTGetAPIVoiceRegionsResult } from 'discord-api-types/v10';
|
|
3
|
+
import { Snowflake, RESTGetAPIApplicationCommandsQuery, RESTGetAPIApplicationCommandsResult, RESTPostAPIApplicationCommandsJSONBody, RESTPatchAPIApplicationCommandJSONBody, RESTPutAPIApplicationCommandsJSONBody, RESTPutAPIApplicationCommandsResult, RESTGetAPIApplicationGuildCommandsQuery, RESTGetAPIGuildApplicationCommandsPermissionsResult, RESTPutAPIApplicationCommandPermissionsJSONBody, RESTPostAPIChannelMessageJSONBody, RESTPatchAPIChannelMessageJSONBody, RESTGetAPIChannelMessageReactionUsersQuery, RESTGetAPIChannelMessageReactionUsersResult, RESTPatchAPIChannelJSONBody, RESTGetAPIChannelMessagesQuery, RESTGetAPIChannelMessagesResult, RESTGetAPIChannelPinsResult, RESTPostAPIChannelInviteJSONBody, RESTGetAPIChannelInvitesResult, RESTGetAPIChannelThreadsArchivedQuery, RESTGetAPIChannelUsersThreadsArchivedResult, RESTGetAPIChannelWebhooksResult, RESTPostAPIGuildsJSONBody, RESTPatchAPIGuildJSONBody, RESTGetAPIGuildMembersQuery, RESTGetAPIGuildMembersResult, RESTGetAPIGuildChannelsResult, RESTPostAPIGuildChannelJSONBody, RESTPatchAPIGuildChannelPositionsJSONBody, RESTGetAPIGuildBansQuery, RESTGetAPIGuildBansResult, RESTPutAPIGuildBanJSONBody, RESTGetAPIGuildRolesResult, RESTPostAPIGuildRoleJSONBody, RESTPatchAPIGuildRolePositionsJSONBody, RESTPatchAPIGuildRolePositionsResult, RESTPatchAPIGuildRoleJSONBody, GuildMFALevel, RESTGetAPIGuildPruneCountQuery, RESTGetAPIGuildPruneCountResult, RESTPostAPIGuildPruneJSONBody, 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, RESTPostAPITemplateCreateGuildJSONBody, RESTGetAPIGuildWebhooksResult, RESTPatchAPIGuildVoiceStateCurrentMemberJSONBody, RESTPostAPIChannelWebhookJSONBody, RESTPatchAPIWebhookJSONBody, RESTPostAPIWebhookWithTokenJSONBody, RESTPostAPIWebhookWithTokenQuery, RESTPostAPIWebhookWithTokenWaitResult, RESTPostAPIWebhookWithTokenSlackQuery, RESTPostAPIWebhookWithTokenGitHubQuery, RESTGetAPIWebhookWithTokenMessageQuery, RESTPatchAPIWebhookWithTokenMessageJSONBody, APIInteractionResponseCallbackData, APIInteractionResponseDeferredChannelMessageWithSource, APICommandAutocompleteInteractionResponseCallbackData, APIModalInteractionResponseCallbackData, RESTGetAPIInviteQuery, RESTOAuth2AuthorizationQuery, RESTPostOAuth2AccessTokenURLEncodedData, RESTPostOAuth2AccessTokenResult, RESTPostOAuth2RefreshTokenURLEncodedData, RESTPostOAuth2ClientCredentialsURLEncodedData, RESTGetAPIOAuth2CurrentApplicationResult, RESTGetAPIOAuth2CurrentAuthorizationResult, RESTGetAPIApplicationRoleConnectionMetadataResult, RESTPutAPIApplicationRoleConnectionMetadataJSONBody, RESTPutAPIApplicationRoleConnectionMetadataResult, RESTGetNitroStickerPacksResult, RESTPostAPIGuildForumThreadsJSONBody, APIThreadChannel, RESTPostAPIChannelThreadsJSONBody, APIThreadMember, RESTGetAPIChannelThreadMembersResult, RESTGetAPICurrentUserGuildsQuery, RESTGetAPICurrentUserGuildsResult, RESTPatchAPICurrentUserJSONBody, RESTGetAPICurrentUserConnectionsResult, RESTPutAPICurrentUserApplicationRoleConnectionJSONBody, RESTGetAPIVoiceRegionsResult } from 'discord-api-types/v10';
|
|
4
4
|
|
|
5
5
|
declare class ApplicationCommandsAPI {
|
|
6
6
|
private readonly rest;
|
|
@@ -490,11 +490,21 @@ declare class GuildsAPI {
|
|
|
490
490
|
/**
|
|
491
491
|
* Fetches a guild member ban
|
|
492
492
|
*
|
|
493
|
-
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild-
|
|
493
|
+
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild-ban}
|
|
494
494
|
* @param guildId - The id of the guild to fetch the ban from
|
|
495
|
-
* @param
|
|
495
|
+
* @param userId - The id of the user to fetch the ban
|
|
496
|
+
* @param options - The options for fetching the ban
|
|
497
|
+
*/
|
|
498
|
+
getMemberBan(guildId: Snowflake, userId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIBan>;
|
|
499
|
+
/**
|
|
500
|
+
* Fetches guild member bans
|
|
501
|
+
*
|
|
502
|
+
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild-bans}
|
|
503
|
+
* @param guildId - The id of the guild to fetch the bans from
|
|
504
|
+
* @param query - The query options for fetching the bans
|
|
505
|
+
* @param options - The options for fetching the bans
|
|
496
506
|
*/
|
|
497
|
-
getMemberBans(guildId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIGuildBansResult>;
|
|
507
|
+
getMemberBans(guildId: Snowflake, query?: RESTGetAPIGuildBansQuery, { signal }?: Pick<RequestData, 'signal'>): Promise<RESTGetAPIGuildBansResult>;
|
|
498
508
|
/**
|
|
499
509
|
* Bans a user from a guild
|
|
500
510
|
*
|
package/dist/http-only.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as API, a as ApplicationCommandsAPI, C as ChannelsAPI, D as DescriptiveRawFile, G as GuildsAPI, I as InteractionsAPI, b as InvitesAPI, O as OAuth2API, R as RoleConnectionsAPI, c as StartForumThreadOptions, S as StickersAPI, T as ThreadsAPI, U as UsersAPI, V as VoiceAPI, W as WebhooksAPI, w as withFiles } from './files-
|
|
1
|
+
export { A as API, a as ApplicationCommandsAPI, C as ChannelsAPI, D as DescriptiveRawFile, G as GuildsAPI, I as InteractionsAPI, b as InvitesAPI, O as OAuth2API, R as RoleConnectionsAPI, c as StartForumThreadOptions, S as StickersAPI, T as ThreadsAPI, U as UsersAPI, V as VoiceAPI, W as WebhooksAPI, w as withFiles } from './files-5bae27a9.js';
|
|
2
2
|
export * from 'discord-api-types/v10';
|
|
3
3
|
import '@discordjs/rest';
|
|
4
4
|
|
package/dist/http-only.js
CHANGED
|
@@ -727,12 +727,27 @@ var GuildsAPI = class {
|
|
|
727
727
|
/**
|
|
728
728
|
* Fetches a guild member ban
|
|
729
729
|
*
|
|
730
|
-
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild-
|
|
730
|
+
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild-ban}
|
|
731
731
|
* @param guildId - The id of the guild to fetch the ban from
|
|
732
|
-
* @param
|
|
732
|
+
* @param userId - The id of the user to fetch the ban
|
|
733
|
+
* @param options - The options for fetching the ban
|
|
733
734
|
*/
|
|
734
|
-
async
|
|
735
|
-
return this.rest.get(import_v103.Routes.
|
|
735
|
+
async getMemberBan(guildId, userId, { signal } = {}) {
|
|
736
|
+
return this.rest.get(import_v103.Routes.guildBan(guildId, userId), { signal });
|
|
737
|
+
}
|
|
738
|
+
/**
|
|
739
|
+
* Fetches guild member bans
|
|
740
|
+
*
|
|
741
|
+
* @see {@link https://discord.com/developers/docs/resources/guild#get-guild-bans}
|
|
742
|
+
* @param guildId - The id of the guild to fetch the bans from
|
|
743
|
+
* @param query - The query options for fetching the bans
|
|
744
|
+
* @param options - The options for fetching the bans
|
|
745
|
+
*/
|
|
746
|
+
async getMemberBans(guildId, query = {}, { signal } = {}) {
|
|
747
|
+
return this.rest.get(import_v103.Routes.guildBans(guildId), {
|
|
748
|
+
query: (0, import_rest3.makeURLSearchParams)(query),
|
|
749
|
+
signal
|
|
750
|
+
});
|
|
736
751
|
}
|
|
737
752
|
/**
|
|
738
753
|
* Bans a user from a guild
|
|
@@ -2331,7 +2346,7 @@ __name(withFiles, "withFiles");
|
|
|
2331
2346
|
|
|
2332
2347
|
// src/http-only/index.ts
|
|
2333
2348
|
__reExport(http_only_exports, require("discord-api-types/v10"), module.exports);
|
|
2334
|
-
var version = "0.7.0-dev.
|
|
2349
|
+
var version = "0.7.0-dev.1684065875-590f5bc.0";
|
|
2335
2350
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2336
2351
|
0 && (module.exports = {
|
|
2337
2352
|
API,
|