@discordjs/core 3.0.0-dev.1752020078-bc6005f44 → 3.0.0-dev.1752279250-1f0fe3915

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.
@@ -371,7 +371,7 @@ declare class ChannelsAPI {
371
371
  * @param body - The new channel data
372
372
  * @param options - The options for editing the channel
373
373
  */
374
- edit(channelId: Snowflake, body: RESTPatchAPIChannelJSONBody, { auth, signal }?: Pick<RequestData, 'auth' | 'signal'>): Promise<discord_api_types_v10.APIChannel>;
374
+ edit(channelId: Snowflake, body: RESTPatchAPIChannelJSONBody, { auth, signal, reason }?: Pick<RequestData, 'auth' | 'reason' | 'signal'>): Promise<discord_api_types_v10.APIChannel>;
375
375
  /**
376
376
  * Deletes a channel
377
377
  *
@@ -379,7 +379,7 @@ declare class ChannelsAPI {
379
379
  * @param channelId - The id of the channel to delete
380
380
  * @param options - The options for deleting the channel
381
381
  */
382
- delete(channelId: Snowflake, { auth, signal }?: Pick<RequestData, 'auth' | 'signal'>): Promise<discord_api_types_v10.APIChannel>;
382
+ delete(channelId: Snowflake, { auth, signal, reason }?: Pick<RequestData, 'auth' | 'reason' | 'signal'>): Promise<discord_api_types_v10.APIChannel>;
383
383
  /**
384
384
  * Fetches the messages of a channel
385
385
  *
@@ -495,7 +495,7 @@ declare class ChannelsAPI {
495
495
  * @param messageId - The id of the message to start the thread from
496
496
  * @param options - The options for starting the thread
497
497
  */
498
- createThread(channelId: Snowflake, body: RESTPostAPIChannelThreadsJSONBody, messageId?: Snowflake, { auth, signal }?: Pick<RequestData, 'auth' | 'signal'>): Promise<discord_api_types_v10.APIChannel>;
498
+ createThread(channelId: Snowflake, body: RESTPostAPIChannelThreadsJSONBody, messageId?: Snowflake, { auth, signal, reason }?: Pick<RequestData, 'auth' | 'reason' | 'signal'>): Promise<discord_api_types_v10.APIChannel>;
499
499
  /**
500
500
  * Creates a new forum post
501
501
  *
@@ -504,7 +504,7 @@ declare class ChannelsAPI {
504
504
  * @param body - The data for starting the thread
505
505
  * @param options - The options for starting the thread
506
506
  */
507
- createForumThread(channelId: Snowflake, { message, ...optionsBody }: StartForumThreadOptions, { auth, signal }?: Pick<RequestData, 'auth' | 'signal'>): Promise<APIThreadChannel<discord_api_types_v10.ThreadChannelType>>;
507
+ createForumThread(channelId: Snowflake, { message, ...optionsBody }: StartForumThreadOptions, { auth, signal, reason }?: Pick<RequestData, 'auth' | 'reason' | 'signal'>): Promise<APIThreadChannel<discord_api_types_v10.ThreadChannelType>>;
508
508
  /**
509
509
  * Fetches the archived threads of a channel
510
510
  *
@@ -619,7 +619,7 @@ declare class GuildsAPI {
619
619
  * @param guildId - The id of the guild to delete
620
620
  * @param options - The options for deleting this guild
621
621
  */
622
- delete(guildId: Snowflake, { auth, reason, signal }?: Pick<RequestData, 'auth' | 'reason' | 'signal'>): Promise<void>;
622
+ delete(guildId: Snowflake, { auth, signal }?: Pick<RequestData, 'auth' | 'signal'>): Promise<void>;
623
623
  /**
624
624
  * Adds user to the guild
625
625
  *
@@ -371,7 +371,7 @@ declare class ChannelsAPI {
371
371
  * @param body - The new channel data
372
372
  * @param options - The options for editing the channel
373
373
  */
374
- edit(channelId: Snowflake, body: RESTPatchAPIChannelJSONBody, { auth, signal }?: Pick<RequestData, 'auth' | 'signal'>): Promise<discord_api_types_v10.APIChannel>;
374
+ edit(channelId: Snowflake, body: RESTPatchAPIChannelJSONBody, { auth, signal, reason }?: Pick<RequestData, 'auth' | 'reason' | 'signal'>): Promise<discord_api_types_v10.APIChannel>;
375
375
  /**
376
376
  * Deletes a channel
377
377
  *
@@ -379,7 +379,7 @@ declare class ChannelsAPI {
379
379
  * @param channelId - The id of the channel to delete
380
380
  * @param options - The options for deleting the channel
381
381
  */
382
- delete(channelId: Snowflake, { auth, signal }?: Pick<RequestData, 'auth' | 'signal'>): Promise<discord_api_types_v10.APIChannel>;
382
+ delete(channelId: Snowflake, { auth, signal, reason }?: Pick<RequestData, 'auth' | 'reason' | 'signal'>): Promise<discord_api_types_v10.APIChannel>;
383
383
  /**
384
384
  * Fetches the messages of a channel
385
385
  *
@@ -495,7 +495,7 @@ declare class ChannelsAPI {
495
495
  * @param messageId - The id of the message to start the thread from
496
496
  * @param options - The options for starting the thread
497
497
  */
498
- createThread(channelId: Snowflake, body: RESTPostAPIChannelThreadsJSONBody, messageId?: Snowflake, { auth, signal }?: Pick<RequestData, 'auth' | 'signal'>): Promise<discord_api_types_v10.APIChannel>;
498
+ createThread(channelId: Snowflake, body: RESTPostAPIChannelThreadsJSONBody, messageId?: Snowflake, { auth, signal, reason }?: Pick<RequestData, 'auth' | 'reason' | 'signal'>): Promise<discord_api_types_v10.APIChannel>;
499
499
  /**
500
500
  * Creates a new forum post
501
501
  *
@@ -504,7 +504,7 @@ declare class ChannelsAPI {
504
504
  * @param body - The data for starting the thread
505
505
  * @param options - The options for starting the thread
506
506
  */
507
- createForumThread(channelId: Snowflake, { message, ...optionsBody }: StartForumThreadOptions, { auth, signal }?: Pick<RequestData, 'auth' | 'signal'>): Promise<APIThreadChannel<discord_api_types_v10.ThreadChannelType>>;
507
+ createForumThread(channelId: Snowflake, { message, ...optionsBody }: StartForumThreadOptions, { auth, signal, reason }?: Pick<RequestData, 'auth' | 'reason' | 'signal'>): Promise<APIThreadChannel<discord_api_types_v10.ThreadChannelType>>;
508
508
  /**
509
509
  * Fetches the archived threads of a channel
510
510
  *
@@ -619,7 +619,7 @@ declare class GuildsAPI {
619
619
  * @param guildId - The id of the guild to delete
620
620
  * @param options - The options for deleting this guild
621
621
  */
622
- delete(guildId: Snowflake, { auth, reason, signal }?: Pick<RequestData, 'auth' | 'reason' | 'signal'>): Promise<void>;
622
+ delete(guildId: Snowflake, { auth, signal }?: Pick<RequestData, 'auth' | 'signal'>): Promise<void>;
623
623
  /**
624
624
  * Adds user to the guild
625
625
  *
package/dist/http-only.js CHANGED
@@ -576,8 +576,13 @@ var ChannelsAPI = class {
576
576
  * @param body - The new channel data
577
577
  * @param options - The options for editing the channel
578
578
  */
579
- async edit(channelId, body, { auth, signal } = {}) {
580
- return this.rest.patch(import_v103.Routes.channel(channelId), { auth, body, signal });
579
+ async edit(channelId, body, { auth, signal, reason } = {}) {
580
+ return this.rest.patch(import_v103.Routes.channel(channelId), {
581
+ auth,
582
+ reason,
583
+ body,
584
+ signal
585
+ });
581
586
  }
582
587
  /**
583
588
  * Deletes a channel
@@ -586,8 +591,8 @@ var ChannelsAPI = class {
586
591
  * @param channelId - The id of the channel to delete
587
592
  * @param options - The options for deleting the channel
588
593
  */
589
- async delete(channelId, { auth, signal } = {}) {
590
- return this.rest.delete(import_v103.Routes.channel(channelId), { auth, signal });
594
+ async delete(channelId, { auth, signal, reason } = {}) {
595
+ return this.rest.delete(import_v103.Routes.channel(channelId), { auth, signal, reason });
591
596
  }
592
597
  /**
593
598
  * Fetches the messages of a channel
@@ -748,11 +753,12 @@ var ChannelsAPI = class {
748
753
  * @param messageId - The id of the message to start the thread from
749
754
  * @param options - The options for starting the thread
750
755
  */
751
- async createThread(channelId, body, messageId, { auth, signal } = {}) {
756
+ async createThread(channelId, body, messageId, { auth, signal, reason } = {}) {
752
757
  return this.rest.post(import_v103.Routes.threads(channelId, messageId), {
753
758
  auth,
754
759
  body,
755
- signal
760
+ signal,
761
+ reason
756
762
  });
757
763
  }
758
764
  /**
@@ -763,13 +769,19 @@ var ChannelsAPI = class {
763
769
  * @param body - The data for starting the thread
764
770
  * @param options - The options for starting the thread
765
771
  */
766
- async createForumThread(channelId, { message, ...optionsBody }, { auth, signal } = {}) {
772
+ async createForumThread(channelId, { message, ...optionsBody }, { auth, signal, reason } = {}) {
767
773
  const { files, ...messageBody } = message;
768
774
  const body = {
769
775
  ...optionsBody,
770
776
  message: messageBody
771
777
  };
772
- return this.rest.post(import_v103.Routes.threads(channelId), { auth, files, body, signal });
778
+ return this.rest.post(import_v103.Routes.threads(channelId), {
779
+ auth,
780
+ files,
781
+ body,
782
+ reason,
783
+ signal
784
+ });
773
785
  }
774
786
  /**
775
787
  * Fetches the archived threads of a channel
@@ -952,8 +964,8 @@ var GuildsAPI = class {
952
964
  * @param guildId - The id of the guild to delete
953
965
  * @param options - The options for deleting this guild
954
966
  */
955
- async delete(guildId, { auth, reason, signal } = {}) {
956
- await this.rest.delete(import_v104.Routes.guild(guildId), { auth, reason, signal });
967
+ async delete(guildId, { auth, signal } = {}) {
968
+ await this.rest.delete(import_v104.Routes.guild(guildId), { auth, signal });
957
969
  }
958
970
  /**
959
971
  * Adds user to the guild
@@ -3111,7 +3123,7 @@ __name(withFiles, "withFiles");
3111
3123
 
3112
3124
  // src/http-only/index.ts
3113
3125
  __reExport(http_only_exports, require("discord-api-types/v10"), module.exports);
3114
- var version = "3.0.0-dev.1752020078-bc6005f44";
3126
+ var version = "3.0.0-dev.1752279250-1f0fe3915";
3115
3127
  // Annotate the CommonJS export names for ESM import in node:
3116
3128
  0 && (module.exports = {
3117
3129
  API,