@discordjs/core 0.5.1-dev.1680609847-0645bf0.0 → 0.5.1-dev.1680653396-6912faa.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.
@@ -179,7 +179,7 @@ declare class ChannelsAPI {
179
179
  */
180
180
  editMessage(channelId: Snowflake, messageId: Snowflake, { files, ...body }: RESTPostAPIChannelMessageJSONBody & {
181
181
  files?: RawFile[];
182
- }, { signal }: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
182
+ }, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
183
183
  /**
184
184
  * Fetches the reactions for a message
185
185
  *
@@ -410,7 +410,7 @@ declare class GuildsAPI {
410
410
  * @param guildId - The id of the guild
411
411
  * @param options - The options for fetching the guild
412
412
  */
413
- get(guildId: string, { signal }: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIGuild>;
413
+ get(guildId: string, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIGuild>;
414
414
  /**
415
415
  * Fetches a guild preview
416
416
  *
@@ -418,7 +418,7 @@ declare class GuildsAPI {
418
418
  * @param guildId - The id of the guild to fetch the preview from
419
419
  * @param options - The options for fetching the guild preview
420
420
  */
421
- getPreview(guildId: Snowflake, { signal }: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIGuildPreview>;
421
+ getPreview(guildId: Snowflake, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIGuildPreview>;
422
422
  /**
423
423
  * Creates a guild
424
424
  *
@@ -426,7 +426,7 @@ declare class GuildsAPI {
426
426
  * @param body - The guild to create
427
427
  * @param options - The options for creating the guild
428
428
  */
429
- create(body: RESTPostAPIGuildsJSONBody, { signal }: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIGuild>;
429
+ create(body: RESTPostAPIGuildsJSONBody, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIGuild>;
430
430
  /**
431
431
  * Edits a guild
432
432
  *
@@ -558,7 +558,7 @@ declare class GuildsAPI {
558
558
  * @param roleId - The id of the role to delete
559
559
  * @param options - The options for deleting the guild role
560
560
  */
561
- deleteRole(guildId: Snowflake, roleId: Snowflake, { reason, signal }: Pick<RequestData, 'reason' | 'signal'>): Promise<void>;
561
+ deleteRole(guildId: Snowflake, roleId: Snowflake, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<void>;
562
562
  /**
563
563
  * Edits the multi-factor-authentication (MFA) level of a guild
564
564
  *
@@ -973,7 +973,7 @@ declare class GuildsAPI {
973
973
  * @param roleId - The id of the role
974
974
  * @param options - The options for removing a role from a guild member
975
975
  */
976
- removeRoleFromMember(guildId: Snowflake, userId: Snowflake, roleId: Snowflake, { reason, signal }: Pick<RequestData, 'reason' | 'signal'>): Promise<void>;
976
+ removeRoleFromMember(guildId: Snowflake, userId: Snowflake, roleId: Snowflake, { reason, signal }?: Pick<RequestData, 'reason' | 'signal'>): Promise<void>;
977
977
  /**
978
978
  * Fetches a guild template
979
979
  *
@@ -1065,7 +1065,7 @@ declare class WebhooksAPI {
1065
1065
  execute(id: Snowflake, token: string, body: RESTPostAPIWebhookWithTokenJSONBody & RESTPostAPIWebhookWithTokenQuery & {
1066
1066
  files?: RawFile[];
1067
1067
  wait: true;
1068
- }, { signal }: Pick<RequestData, 'signal'>): Promise<RESTPostAPIWebhookWithTokenWaitResult>;
1068
+ }, options?: Pick<RequestData, 'signal'>): Promise<RESTPostAPIWebhookWithTokenWaitResult>;
1069
1069
  /**
1070
1070
  * Executes a webhook
1071
1071
  *
@@ -1078,7 +1078,7 @@ declare class WebhooksAPI {
1078
1078
  execute(id: Snowflake, token: string, body: RESTPostAPIWebhookWithTokenJSONBody & RESTPostAPIWebhookWithTokenQuery & {
1079
1079
  files?: RawFile[];
1080
1080
  wait?: false;
1081
- }, { signal }: Pick<RequestData, 'signal'>): Promise<void>;
1081
+ }, options?: Pick<RequestData, 'signal'>): Promise<void>;
1082
1082
  /**
1083
1083
  * Executes a slack webhook
1084
1084
  *
@@ -1207,7 +1207,7 @@ declare class InteractionsAPI {
1207
1207
  * @param interactionToken - The token of the interaction
1208
1208
  * @param options - The options to use when fetching the reply
1209
1209
  */
1210
- getOriginalReply(applicationId: Snowflake, interactionToken: string, { signal }: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
1210
+ getOriginalReply(applicationId: Snowflake, interactionToken: string, { signal }?: Pick<RequestData, 'signal'>): Promise<discord_api_types_v10.APIMessage>;
1211
1211
  /**
1212
1212
  * Deletes the initial reply to an interaction
1213
1213
  *
@@ -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-4cadec53.js';
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-b4a05163.js';
2
2
  export * from 'discord-api-types/v10';
3
3
  import '@discordjs/rest';
4
4
 
package/dist/http-only.js CHANGED
@@ -295,7 +295,7 @@ var ChannelsAPI = class {
295
295
  * @param body - The data to use when editing the message
296
296
  * @param options - The options to use when editing the message
297
297
  */
298
- async editMessage(channelId, messageId, { files, ...body }, { signal }) {
298
+ async editMessage(channelId, messageId, { files, ...body }, { signal } = {}) {
299
299
  return this.rest.patch(import_v102.Routes.channelMessage(channelId, messageId), {
300
300
  files,
301
301
  body,
@@ -612,7 +612,7 @@ var GuildsAPI = class {
612
612
  * @param guildId - The id of the guild
613
613
  * @param options - The options for fetching the guild
614
614
  */
615
- async get(guildId, { signal }) {
615
+ async get(guildId, { signal } = {}) {
616
616
  return this.rest.get(import_v103.Routes.guild(guildId), { signal });
617
617
  }
618
618
  /**
@@ -622,7 +622,7 @@ var GuildsAPI = class {
622
622
  * @param guildId - The id of the guild to fetch the preview from
623
623
  * @param options - The options for fetching the guild preview
624
624
  */
625
- async getPreview(guildId, { signal }) {
625
+ async getPreview(guildId, { signal } = {}) {
626
626
  return this.rest.get(import_v103.Routes.guildPreview(guildId), {
627
627
  signal
628
628
  });
@@ -634,7 +634,7 @@ var GuildsAPI = class {
634
634
  * @param body - The guild to create
635
635
  * @param options - The options for creating the guild
636
636
  */
637
- async create(body, { signal }) {
637
+ async create(body, { signal } = {}) {
638
638
  return this.rest.post(import_v103.Routes.guilds(), { body, signal });
639
639
  }
640
640
  /**
@@ -817,7 +817,7 @@ var GuildsAPI = class {
817
817
  * @param roleId - The id of the role to delete
818
818
  * @param options - The options for deleting the guild role
819
819
  */
820
- async deleteRole(guildId, roleId, { reason, signal }) {
820
+ async deleteRole(guildId, roleId, { reason, signal } = {}) {
821
821
  await this.rest.delete(import_v103.Routes.guildRole(guildId, roleId), { reason, signal });
822
822
  }
823
823
  /**
@@ -1407,7 +1407,7 @@ var GuildsAPI = class {
1407
1407
  * @param roleId - The id of the role
1408
1408
  * @param options - The options for removing a role from a guild member
1409
1409
  */
1410
- async removeRoleFromMember(guildId, userId, roleId, { reason, signal }) {
1410
+ async removeRoleFromMember(guildId, userId, roleId, { reason, signal } = {}) {
1411
1411
  await this.rest.delete(import_v103.Routes.guildMemberRole(guildId, userId, roleId), { reason, signal });
1412
1412
  }
1413
1413
  /**
@@ -1554,7 +1554,7 @@ var InteractionsAPI = class {
1554
1554
  * @param interactionToken - The token of the interaction
1555
1555
  * @param options - The options to use when fetching the reply
1556
1556
  */
1557
- async getOriginalReply(applicationId, interactionToken, { signal }) {
1557
+ async getOriginalReply(applicationId, interactionToken, { signal } = {}) {
1558
1558
  return this.webhooks.getMessage(
1559
1559
  applicationId,
1560
1560
  interactionToken,
@@ -2323,7 +2323,7 @@ __name(withFiles, "withFiles");
2323
2323
 
2324
2324
  // src/http-only/index.ts
2325
2325
  __reExport(http_only_exports, require("discord-api-types/v10"), module.exports);
2326
- var version = "0.5.1-dev.1680609847-0645bf0.0";
2326
+ var version = "0.5.1-dev.1680653396-6912faa.0";
2327
2327
  // Annotate the CommonJS export names for ESM import in node:
2328
2328
  0 && (module.exports = {
2329
2329
  API,