@discordjs/core 2.2.0 → 2.2.1
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 +8 -8
- package/dist/http-only.d.ts +8 -8
- package/dist/http-only.js +21 -11
- package/dist/http-only.js.map +1 -1
- package/dist/http-only.mjs +21 -11
- package/dist/http-only.mjs.map +1 -1
- package/dist/index.d.mts +8 -8
- package/dist/index.d.ts +8 -8
- package/dist/index.js +21 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +21 -11
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -7
package/dist/http-only.mjs
CHANGED
|
@@ -470,8 +470,12 @@ var ChannelsAPI = class {
|
|
|
470
470
|
* @param body - The new channel data
|
|
471
471
|
* @param options - The options for editing the channel
|
|
472
472
|
*/
|
|
473
|
-
async edit(channelId, body, { signal } = {}) {
|
|
474
|
-
return this.rest.patch(Routes3.channel(channelId), {
|
|
473
|
+
async edit(channelId, body, { signal, reason } = {}) {
|
|
474
|
+
return this.rest.patch(Routes3.channel(channelId), {
|
|
475
|
+
reason,
|
|
476
|
+
body,
|
|
477
|
+
signal
|
|
478
|
+
});
|
|
475
479
|
}
|
|
476
480
|
/**
|
|
477
481
|
* Deletes a channel
|
|
@@ -480,8 +484,8 @@ var ChannelsAPI = class {
|
|
|
480
484
|
* @param channelId - The id of the channel to delete
|
|
481
485
|
* @param options - The options for deleting the channel
|
|
482
486
|
*/
|
|
483
|
-
async delete(channelId, { signal } = {}) {
|
|
484
|
-
return this.rest.delete(Routes3.channel(channelId), { signal });
|
|
487
|
+
async delete(channelId, { signal, reason } = {}) {
|
|
488
|
+
return this.rest.delete(Routes3.channel(channelId), { signal, reason });
|
|
485
489
|
}
|
|
486
490
|
/**
|
|
487
491
|
* Fetches the messages of a channel
|
|
@@ -637,10 +641,11 @@ var ChannelsAPI = class {
|
|
|
637
641
|
* @param messageId - The id of the message to start the thread from
|
|
638
642
|
* @param options - The options for starting the thread
|
|
639
643
|
*/
|
|
640
|
-
async createThread(channelId, body, messageId, { signal } = {}) {
|
|
644
|
+
async createThread(channelId, body, messageId, { signal, reason } = {}) {
|
|
641
645
|
return this.rest.post(Routes3.threads(channelId, messageId), {
|
|
642
646
|
body,
|
|
643
|
-
signal
|
|
647
|
+
signal,
|
|
648
|
+
reason
|
|
644
649
|
});
|
|
645
650
|
}
|
|
646
651
|
/**
|
|
@@ -651,13 +656,18 @@ var ChannelsAPI = class {
|
|
|
651
656
|
* @param body - The data for starting the thread
|
|
652
657
|
* @param options - The options for starting the thread
|
|
653
658
|
*/
|
|
654
|
-
async createForumThread(channelId, { message, ...optionsBody }, { signal } = {}) {
|
|
659
|
+
async createForumThread(channelId, { message, ...optionsBody }, { signal, reason } = {}) {
|
|
655
660
|
const { files, ...messageBody } = message;
|
|
656
661
|
const body = {
|
|
657
662
|
...optionsBody,
|
|
658
663
|
message: messageBody
|
|
659
664
|
};
|
|
660
|
-
return this.rest.post(Routes3.threads(channelId), {
|
|
665
|
+
return this.rest.post(Routes3.threads(channelId), {
|
|
666
|
+
files,
|
|
667
|
+
body,
|
|
668
|
+
reason,
|
|
669
|
+
signal
|
|
670
|
+
});
|
|
661
671
|
}
|
|
662
672
|
/**
|
|
663
673
|
* Fetches the archived threads of a channel
|
|
@@ -886,8 +896,8 @@ var GuildsAPI = class {
|
|
|
886
896
|
* @param guildId - The id of the guild to delete
|
|
887
897
|
* @param options - The options for deleting this guild
|
|
888
898
|
*/
|
|
889
|
-
async delete(guildId, { signal
|
|
890
|
-
await this.rest.delete(Routes5.guild(guildId), {
|
|
899
|
+
async delete(guildId, { signal } = {}) {
|
|
900
|
+
await this.rest.delete(Routes5.guild(guildId), { signal });
|
|
891
901
|
}
|
|
892
902
|
/**
|
|
893
903
|
* Adds user to the guild
|
|
@@ -2867,7 +2877,7 @@ __name(withFiles, "withFiles");
|
|
|
2867
2877
|
|
|
2868
2878
|
// src/http-only/index.ts
|
|
2869
2879
|
export * from "discord-api-types/v10";
|
|
2870
|
-
var version = "2.2.
|
|
2880
|
+
var version = "2.2.1";
|
|
2871
2881
|
export {
|
|
2872
2882
|
API,
|
|
2873
2883
|
ApplicationCommandsAPI,
|