@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.
- package/dist/http-only.d.mts +5 -5
- package/dist/http-only.d.ts +5 -5
- package/dist/http-only.js +23 -11
- package/dist/http-only.js.map +1 -1
- package/dist/http-only.mjs +23 -11
- package/dist/http-only.mjs.map +1 -1
- package/dist/index.d.mts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +23 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +23 -11
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -374,7 +374,7 @@ declare class ChannelsAPI {
|
|
|
374
374
|
* @param body - The new channel data
|
|
375
375
|
* @param options - The options for editing the channel
|
|
376
376
|
*/
|
|
377
|
-
edit(channelId: Snowflake, body: RESTPatchAPIChannelJSONBody, { auth, signal }?: Pick<RequestData, 'auth' | 'signal'>): Promise<discord_api_types_v10.APIChannel>;
|
|
377
|
+
edit(channelId: Snowflake, body: RESTPatchAPIChannelJSONBody, { auth, signal, reason }?: Pick<RequestData, 'auth' | 'reason' | 'signal'>): Promise<discord_api_types_v10.APIChannel>;
|
|
378
378
|
/**
|
|
379
379
|
* Deletes a channel
|
|
380
380
|
*
|
|
@@ -382,7 +382,7 @@ declare class ChannelsAPI {
|
|
|
382
382
|
* @param channelId - The id of the channel to delete
|
|
383
383
|
* @param options - The options for deleting the channel
|
|
384
384
|
*/
|
|
385
|
-
delete(channelId: Snowflake, { auth, signal }?: Pick<RequestData, 'auth' | 'signal'>): Promise<discord_api_types_v10.APIChannel>;
|
|
385
|
+
delete(channelId: Snowflake, { auth, signal, reason }?: Pick<RequestData, 'auth' | 'reason' | 'signal'>): Promise<discord_api_types_v10.APIChannel>;
|
|
386
386
|
/**
|
|
387
387
|
* Fetches the messages of a channel
|
|
388
388
|
*
|
|
@@ -498,7 +498,7 @@ declare class ChannelsAPI {
|
|
|
498
498
|
* @param messageId - The id of the message to start the thread from
|
|
499
499
|
* @param options - The options for starting the thread
|
|
500
500
|
*/
|
|
501
|
-
createThread(channelId: Snowflake, body: RESTPostAPIChannelThreadsJSONBody, messageId?: Snowflake, { auth, signal }?: Pick<RequestData, 'auth' | 'signal'>): Promise<discord_api_types_v10.APIChannel>;
|
|
501
|
+
createThread(channelId: Snowflake, body: RESTPostAPIChannelThreadsJSONBody, messageId?: Snowflake, { auth, signal, reason }?: Pick<RequestData, 'auth' | 'reason' | 'signal'>): Promise<discord_api_types_v10.APIChannel>;
|
|
502
502
|
/**
|
|
503
503
|
* Creates a new forum post
|
|
504
504
|
*
|
|
@@ -507,7 +507,7 @@ declare class ChannelsAPI {
|
|
|
507
507
|
* @param body - The data for starting the thread
|
|
508
508
|
* @param options - The options for starting the thread
|
|
509
509
|
*/
|
|
510
|
-
createForumThread(channelId: Snowflake, { message, ...optionsBody }: StartForumThreadOptions, { auth, signal }?: Pick<RequestData, 'auth' | 'signal'>): Promise<APIThreadChannel<discord_api_types_v10.ThreadChannelType>>;
|
|
510
|
+
createForumThread(channelId: Snowflake, { message, ...optionsBody }: StartForumThreadOptions, { auth, signal, reason }?: Pick<RequestData, 'auth' | 'reason' | 'signal'>): Promise<APIThreadChannel<discord_api_types_v10.ThreadChannelType>>;
|
|
511
511
|
/**
|
|
512
512
|
* Fetches the archived threads of a channel
|
|
513
513
|
*
|
|
@@ -622,7 +622,7 @@ declare class GuildsAPI {
|
|
|
622
622
|
* @param guildId - The id of the guild to delete
|
|
623
623
|
* @param options - The options for deleting this guild
|
|
624
624
|
*/
|
|
625
|
-
delete(guildId: Snowflake, { auth,
|
|
625
|
+
delete(guildId: Snowflake, { auth, signal }?: Pick<RequestData, 'auth' | 'signal'>): Promise<void>;
|
|
626
626
|
/**
|
|
627
627
|
* Adds user to the guild
|
|
628
628
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -374,7 +374,7 @@ declare class ChannelsAPI {
|
|
|
374
374
|
* @param body - The new channel data
|
|
375
375
|
* @param options - The options for editing the channel
|
|
376
376
|
*/
|
|
377
|
-
edit(channelId: Snowflake, body: RESTPatchAPIChannelJSONBody, { auth, signal }?: Pick<RequestData, 'auth' | 'signal'>): Promise<discord_api_types_v10.APIChannel>;
|
|
377
|
+
edit(channelId: Snowflake, body: RESTPatchAPIChannelJSONBody, { auth, signal, reason }?: Pick<RequestData, 'auth' | 'reason' | 'signal'>): Promise<discord_api_types_v10.APIChannel>;
|
|
378
378
|
/**
|
|
379
379
|
* Deletes a channel
|
|
380
380
|
*
|
|
@@ -382,7 +382,7 @@ declare class ChannelsAPI {
|
|
|
382
382
|
* @param channelId - The id of the channel to delete
|
|
383
383
|
* @param options - The options for deleting the channel
|
|
384
384
|
*/
|
|
385
|
-
delete(channelId: Snowflake, { auth, signal }?: Pick<RequestData, 'auth' | 'signal'>): Promise<discord_api_types_v10.APIChannel>;
|
|
385
|
+
delete(channelId: Snowflake, { auth, signal, reason }?: Pick<RequestData, 'auth' | 'reason' | 'signal'>): Promise<discord_api_types_v10.APIChannel>;
|
|
386
386
|
/**
|
|
387
387
|
* Fetches the messages of a channel
|
|
388
388
|
*
|
|
@@ -498,7 +498,7 @@ declare class ChannelsAPI {
|
|
|
498
498
|
* @param messageId - The id of the message to start the thread from
|
|
499
499
|
* @param options - The options for starting the thread
|
|
500
500
|
*/
|
|
501
|
-
createThread(channelId: Snowflake, body: RESTPostAPIChannelThreadsJSONBody, messageId?: Snowflake, { auth, signal }?: Pick<RequestData, 'auth' | 'signal'>): Promise<discord_api_types_v10.APIChannel>;
|
|
501
|
+
createThread(channelId: Snowflake, body: RESTPostAPIChannelThreadsJSONBody, messageId?: Snowflake, { auth, signal, reason }?: Pick<RequestData, 'auth' | 'reason' | 'signal'>): Promise<discord_api_types_v10.APIChannel>;
|
|
502
502
|
/**
|
|
503
503
|
* Creates a new forum post
|
|
504
504
|
*
|
|
@@ -507,7 +507,7 @@ declare class ChannelsAPI {
|
|
|
507
507
|
* @param body - The data for starting the thread
|
|
508
508
|
* @param options - The options for starting the thread
|
|
509
509
|
*/
|
|
510
|
-
createForumThread(channelId: Snowflake, { message, ...optionsBody }: StartForumThreadOptions, { auth, signal }?: Pick<RequestData, 'auth' | 'signal'>): Promise<APIThreadChannel<discord_api_types_v10.ThreadChannelType>>;
|
|
510
|
+
createForumThread(channelId: Snowflake, { message, ...optionsBody }: StartForumThreadOptions, { auth, signal, reason }?: Pick<RequestData, 'auth' | 'reason' | 'signal'>): Promise<APIThreadChannel<discord_api_types_v10.ThreadChannelType>>;
|
|
511
511
|
/**
|
|
512
512
|
* Fetches the archived threads of a channel
|
|
513
513
|
*
|
|
@@ -622,7 +622,7 @@ declare class GuildsAPI {
|
|
|
622
622
|
* @param guildId - The id of the guild to delete
|
|
623
623
|
* @param options - The options for deleting this guild
|
|
624
624
|
*/
|
|
625
|
-
delete(guildId: Snowflake, { auth,
|
|
625
|
+
delete(guildId: Snowflake, { auth, signal }?: Pick<RequestData, 'auth' | 'signal'>): Promise<void>;
|
|
626
626
|
/**
|
|
627
627
|
* Adds user to the guild
|
|
628
628
|
*
|
package/dist/index.js
CHANGED
|
@@ -577,8 +577,13 @@ var ChannelsAPI = class {
|
|
|
577
577
|
* @param body - The new channel data
|
|
578
578
|
* @param options - The options for editing the channel
|
|
579
579
|
*/
|
|
580
|
-
async edit(channelId, body, { auth, signal } = {}) {
|
|
581
|
-
return this.rest.patch(import_v103.Routes.channel(channelId), {
|
|
580
|
+
async edit(channelId, body, { auth, signal, reason } = {}) {
|
|
581
|
+
return this.rest.patch(import_v103.Routes.channel(channelId), {
|
|
582
|
+
auth,
|
|
583
|
+
reason,
|
|
584
|
+
body,
|
|
585
|
+
signal
|
|
586
|
+
});
|
|
582
587
|
}
|
|
583
588
|
/**
|
|
584
589
|
* Deletes a channel
|
|
@@ -587,8 +592,8 @@ var ChannelsAPI = class {
|
|
|
587
592
|
* @param channelId - The id of the channel to delete
|
|
588
593
|
* @param options - The options for deleting the channel
|
|
589
594
|
*/
|
|
590
|
-
async delete(channelId, { auth, signal } = {}) {
|
|
591
|
-
return this.rest.delete(import_v103.Routes.channel(channelId), { auth, signal });
|
|
595
|
+
async delete(channelId, { auth, signal, reason } = {}) {
|
|
596
|
+
return this.rest.delete(import_v103.Routes.channel(channelId), { auth, signal, reason });
|
|
592
597
|
}
|
|
593
598
|
/**
|
|
594
599
|
* Fetches the messages of a channel
|
|
@@ -749,11 +754,12 @@ var ChannelsAPI = class {
|
|
|
749
754
|
* @param messageId - The id of the message to start the thread from
|
|
750
755
|
* @param options - The options for starting the thread
|
|
751
756
|
*/
|
|
752
|
-
async createThread(channelId, body, messageId, { auth, signal } = {}) {
|
|
757
|
+
async createThread(channelId, body, messageId, { auth, signal, reason } = {}) {
|
|
753
758
|
return this.rest.post(import_v103.Routes.threads(channelId, messageId), {
|
|
754
759
|
auth,
|
|
755
760
|
body,
|
|
756
|
-
signal
|
|
761
|
+
signal,
|
|
762
|
+
reason
|
|
757
763
|
});
|
|
758
764
|
}
|
|
759
765
|
/**
|
|
@@ -764,13 +770,19 @@ var ChannelsAPI = class {
|
|
|
764
770
|
* @param body - The data for starting the thread
|
|
765
771
|
* @param options - The options for starting the thread
|
|
766
772
|
*/
|
|
767
|
-
async createForumThread(channelId, { message, ...optionsBody }, { auth, signal } = {}) {
|
|
773
|
+
async createForumThread(channelId, { message, ...optionsBody }, { auth, signal, reason } = {}) {
|
|
768
774
|
const { files, ...messageBody } = message;
|
|
769
775
|
const body = {
|
|
770
776
|
...optionsBody,
|
|
771
777
|
message: messageBody
|
|
772
778
|
};
|
|
773
|
-
return this.rest.post(import_v103.Routes.threads(channelId), {
|
|
779
|
+
return this.rest.post(import_v103.Routes.threads(channelId), {
|
|
780
|
+
auth,
|
|
781
|
+
files,
|
|
782
|
+
body,
|
|
783
|
+
reason,
|
|
784
|
+
signal
|
|
785
|
+
});
|
|
774
786
|
}
|
|
775
787
|
/**
|
|
776
788
|
* Fetches the archived threads of a channel
|
|
@@ -953,8 +965,8 @@ var GuildsAPI = class {
|
|
|
953
965
|
* @param guildId - The id of the guild to delete
|
|
954
966
|
* @param options - The options for deleting this guild
|
|
955
967
|
*/
|
|
956
|
-
async delete(guildId, { auth,
|
|
957
|
-
await this.rest.delete(import_v104.Routes.guild(guildId), { auth,
|
|
968
|
+
async delete(guildId, { auth, signal } = {}) {
|
|
969
|
+
await this.rest.delete(import_v104.Routes.guild(guildId), { auth, signal });
|
|
958
970
|
}
|
|
959
971
|
/**
|
|
960
972
|
* Adds user to the guild
|
|
@@ -3336,7 +3348,7 @@ __name(withFiles, "withFiles");
|
|
|
3336
3348
|
|
|
3337
3349
|
// src/index.ts
|
|
3338
3350
|
__reExport(index_exports, require("discord-api-types/v10"), module.exports);
|
|
3339
|
-
var version = "3.0.0-dev.
|
|
3351
|
+
var version = "3.0.0-dev.1752279250-1f0fe3915";
|
|
3340
3352
|
// Annotate the CommonJS export names for ESM import in node:
|
|
3341
3353
|
0 && (module.exports = {
|
|
3342
3354
|
API,
|