@buape/carbon 0.3.2 → 0.4.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/package.json +3 -2
- package/dist/src/abstracts/AnySelectMenuInteraction.d.ts +2 -1
- package/dist/src/abstracts/AnySelectMenuInteraction.d.ts.map +1 -1
- package/dist/src/abstracts/AnySelectMenuInteraction.js +2 -2
- package/dist/src/abstracts/AnySelectMenuInteraction.js.map +1 -1
- package/dist/src/abstracts/BaseCommand.d.ts +9 -3
- package/dist/src/abstracts/BaseCommand.d.ts.map +1 -1
- package/dist/src/abstracts/BaseCommand.js +11 -3
- package/dist/src/abstracts/BaseCommand.js.map +1 -1
- package/dist/src/abstracts/BaseComponentInteraction.d.ts +6 -2
- package/dist/src/abstracts/BaseComponentInteraction.d.ts.map +1 -1
- package/dist/src/abstracts/BaseComponentInteraction.js +19 -2
- package/dist/src/abstracts/BaseComponentInteraction.js.map +1 -1
- package/dist/src/abstracts/BaseInteraction.d.ts +4 -3
- package/dist/src/abstracts/BaseInteraction.d.ts.map +1 -1
- package/dist/src/abstracts/BaseInteraction.js +5 -9
- package/dist/src/abstracts/BaseInteraction.js.map +1 -1
- package/dist/src/classes/Client.d.ts +5 -0
- package/dist/src/classes/Client.d.ts.map +1 -1
- package/dist/src/classes/Client.js +15 -5
- package/dist/src/classes/Client.js.map +1 -1
- package/dist/src/internals/AutocompleteInteraction.d.ts +2 -2
- package/dist/src/internals/AutocompleteInteraction.d.ts.map +1 -1
- package/dist/src/internals/AutocompleteInteraction.js +2 -3
- package/dist/src/internals/AutocompleteInteraction.js.map +1 -1
- package/dist/src/internals/ButtonInteraction.d.ts +2 -1
- package/dist/src/internals/ButtonInteraction.d.ts.map +1 -1
- package/dist/src/internals/ButtonInteraction.js +2 -2
- package/dist/src/internals/ButtonInteraction.js.map +1 -1
- package/dist/src/internals/ChannelSelectMenuInteraction.d.ts +2 -1
- package/dist/src/internals/ChannelSelectMenuInteraction.d.ts.map +1 -1
- package/dist/src/internals/ChannelSelectMenuInteraction.js +2 -2
- package/dist/src/internals/ChannelSelectMenuInteraction.js.map +1 -1
- package/dist/src/internals/CommandHandler.d.ts.map +1 -1
- package/dist/src/internals/CommandHandler.js +5 -3
- package/dist/src/internals/CommandHandler.js.map +1 -1
- package/dist/src/internals/CommandInteraction.d.ts +2 -2
- package/dist/src/internals/CommandInteraction.d.ts.map +1 -1
- package/dist/src/internals/CommandInteraction.js +2 -2
- package/dist/src/internals/CommandInteraction.js.map +1 -1
- package/dist/src/internals/ComponentHandler.d.ts.map +1 -1
- package/dist/src/internals/ComponentHandler.js +6 -6
- package/dist/src/internals/ComponentHandler.js.map +1 -1
- package/dist/src/internals/MentionableSelectMenuInteraction.d.ts +2 -1
- package/dist/src/internals/MentionableSelectMenuInteraction.d.ts.map +1 -1
- package/dist/src/internals/MentionableSelectMenuInteraction.js +2 -2
- package/dist/src/internals/MentionableSelectMenuInteraction.js.map +1 -1
- package/dist/src/internals/ModalHandler.js +1 -1
- package/dist/src/internals/ModalHandler.js.map +1 -1
- package/dist/src/internals/ModalInteraction.d.ts +8 -2
- package/dist/src/internals/ModalInteraction.d.ts.map +1 -1
- package/dist/src/internals/ModalInteraction.js +20 -2
- package/dist/src/internals/ModalInteraction.js.map +1 -1
- package/dist/src/internals/RoleSelectMenuInteraction.d.ts +2 -1
- package/dist/src/internals/RoleSelectMenuInteraction.d.ts.map +1 -1
- package/dist/src/internals/RoleSelectMenuInteraction.js +2 -2
- package/dist/src/internals/RoleSelectMenuInteraction.js.map +1 -1
- package/dist/src/internals/StringSelectMenuInteraction.d.ts +2 -1
- package/dist/src/internals/StringSelectMenuInteraction.d.ts.map +1 -1
- package/dist/src/internals/StringSelectMenuInteraction.js +2 -2
- package/dist/src/internals/StringSelectMenuInteraction.js.map +1 -1
- package/dist/src/internals/UserSelectMenuInteraction.d.ts +2 -1
- package/dist/src/internals/UserSelectMenuInteraction.d.ts.map +1 -1
- package/dist/src/internals/UserSelectMenuInteraction.js +2 -2
- package/dist/src/internals/UserSelectMenuInteraction.js.map +1 -1
- package/dist/src/structures/Message.d.ts +96 -4
- package/dist/src/structures/Message.d.ts.map +1 -1
- package/dist/src/structures/Message.js +133 -0
- package/dist/src/structures/Message.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type APIApplicationCommandInteraction } from "discord-api-types/v10";
|
|
2
2
|
import type { BaseCommand } from "../abstracts/BaseCommand.js";
|
|
3
|
-
import { BaseInteraction } from "../abstracts/BaseInteraction.js";
|
|
3
|
+
import { BaseInteraction, type InteractionDefaults } from "../abstracts/BaseInteraction.js";
|
|
4
4
|
import type { Client } from "../classes/Client.js";
|
|
5
5
|
import { OptionsHandler } from "./OptionsHandler.js";
|
|
6
6
|
/**
|
|
@@ -12,6 +12,6 @@ export declare class CommandInteraction extends BaseInteraction<APIApplicationCo
|
|
|
12
12
|
* It is only available if the command is a {@link Command} class, and the command is a ChatInput command.
|
|
13
13
|
*/
|
|
14
14
|
options?: OptionsHandler;
|
|
15
|
-
constructor(client: Client, data: APIApplicationCommandInteraction, command?: BaseCommand);
|
|
15
|
+
constructor(client: Client, data: APIApplicationCommandInteraction, defaults: InteractionDefaults, command?: BaseCommand);
|
|
16
16
|
}
|
|
17
17
|
//# sourceMappingURL=CommandInteraction.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommandInteraction.d.ts","sourceRoot":"","sources":["../../../src/internals/CommandInteraction.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,gCAAgC,EAKrC,MAAM,uBAAuB,CAAA;AAC9B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAA;AAC9D,OAAO,
|
|
1
|
+
{"version":3,"file":"CommandInteraction.d.ts","sourceRoot":"","sources":["../../../src/internals/CommandInteraction.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,gCAAgC,EAKrC,MAAM,uBAAuB,CAAA;AAC9B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAA;AAC9D,OAAO,EACN,eAAe,EACf,KAAK,mBAAmB,EACxB,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAElD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAGpD;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,eAAe,CAAC,gCAAgC,CAAC;IACxF;;;OAGG;IACH,OAAO,CAAC,EAAE,cAAc,CAAA;gBAEvB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,gCAAgC,EACtC,QAAQ,EAAE,mBAAmB,EAC7B,OAAO,CAAC,EAAE,WAAW;CAsBtB"}
|
|
@@ -12,8 +12,8 @@ export class CommandInteraction extends BaseInteraction {
|
|
|
12
12
|
* It is only available if the command is a {@link Command} class, and the command is a ChatInput command.
|
|
13
13
|
*/
|
|
14
14
|
options;
|
|
15
|
-
constructor(client, data, command) {
|
|
16
|
-
super(client, data);
|
|
15
|
+
constructor(client, data, defaults, command) {
|
|
16
|
+
super(client, data, defaults);
|
|
17
17
|
if (data.type !== InteractionType.ApplicationCommand) {
|
|
18
18
|
throw new Error("Invalid interaction type was used to create this class");
|
|
19
19
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommandInteraction.js","sourceRoot":"","sources":["../../../src/internals/CommandInteraction.ts"],"names":[],"mappings":"AAAA,OAAO,EAGN,4BAA4B,EAC5B,sBAAsB,EACtB,eAAe,EACf,MAAM,uBAAuB,CAAA;AAE9B,OAAO,
|
|
1
|
+
{"version":3,"file":"CommandInteraction.js","sourceRoot":"","sources":["../../../src/internals/CommandInteraction.ts"],"names":[],"mappings":"AAAA,OAAO,EAGN,4BAA4B,EAC5B,sBAAsB,EACtB,eAAe,EACf,MAAM,uBAAuB,CAAA;AAE9B,OAAO,EACN,eAA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AiB,SAAQ,IAAI;IACzC,UAAU,EAAE,aAAa,EAAE,CAAK;IAChC;;;OAGG;IACH,iBAAiB,CAAC,SAAS,EAAE,aAAa;IAK1C;;;OAGG;IACG,iBAAiB,CAAC,IAAI,EAAE,8BAA8B;
|
|
1
|
+
{"version":3,"file":"ComponentHandler.d.ts","sourceRoot":"","sources":["../../../src/internals/ComponentHandler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEX,8BAA8B,EAE9B,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAC3C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAA;AAclE,qBAAa,gBAAiB,SAAQ,IAAI;IACzC,UAAU,EAAE,aAAa,EAAE,CAAK;IAChC;;;OAGG;IACH,iBAAiB,CAAC,SAAS,EAAE,aAAa;IAK1C;;;OAGG;IACG,iBAAiB,CAAC,IAAI,EAAE,8BAA8B;CA8D5D"}
|
|
@@ -32,37 +32,37 @@ export class ComponentHandler extends Base {
|
|
|
32
32
|
if (!component)
|
|
33
33
|
return false;
|
|
34
34
|
if (component instanceof Button) {
|
|
35
|
-
const interaction = new ButtonInteraction(this.client, data);
|
|
35
|
+
const interaction = new ButtonInteraction(this.client, data, { ephemeral: component.ephemeral });
|
|
36
36
|
if (component.defer)
|
|
37
37
|
await interaction.defer();
|
|
38
38
|
await component.run(interaction);
|
|
39
39
|
}
|
|
40
40
|
else if (component instanceof RoleSelectMenu) {
|
|
41
|
-
const interaction = new RoleSelectMenuInteraction(this.client, data);
|
|
41
|
+
const interaction = new RoleSelectMenuInteraction(this.client, data, { ephemeral: component.ephemeral });
|
|
42
42
|
if (component.defer)
|
|
43
43
|
await interaction.defer();
|
|
44
44
|
await component.run(interaction);
|
|
45
45
|
}
|
|
46
46
|
else if (component instanceof ChannelSelectMenu) {
|
|
47
|
-
const interaction = new ChannelSelectMenuInteraction(this.client, data);
|
|
47
|
+
const interaction = new ChannelSelectMenuInteraction(this.client, data, { ephemeral: component.ephemeral });
|
|
48
48
|
if (component.defer)
|
|
49
49
|
await interaction.defer();
|
|
50
50
|
await component.run(interaction);
|
|
51
51
|
}
|
|
52
52
|
else if (component instanceof MentionableSelectMenu) {
|
|
53
|
-
const interaction = new MentionableSelectMenuInteraction(this.client, data);
|
|
53
|
+
const interaction = new MentionableSelectMenuInteraction(this.client, data, { ephemeral: component.ephemeral });
|
|
54
54
|
if (component.defer)
|
|
55
55
|
await interaction.defer();
|
|
56
56
|
await component.run(interaction);
|
|
57
57
|
}
|
|
58
58
|
else if (component instanceof StringSelectMenu) {
|
|
59
|
-
const interaction = new StringSelectMenuInteraction(this.client, data);
|
|
59
|
+
const interaction = new StringSelectMenuInteraction(this.client, data, { ephemeral: component.ephemeral });
|
|
60
60
|
if (component.defer)
|
|
61
61
|
await interaction.defer();
|
|
62
62
|
await component.run(interaction);
|
|
63
63
|
}
|
|
64
64
|
else if (component instanceof UserSelectMenu) {
|
|
65
|
-
const interaction = new UserSelectMenuInteraction(this.client, data);
|
|
65
|
+
const interaction = new UserSelectMenuInteraction(this.client, data, { ephemeral: component.ephemeral });
|
|
66
66
|
if (component.defer)
|
|
67
67
|
await interaction.defer();
|
|
68
68
|
await component.run(interaction);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComponentHandler.js","sourceRoot":"","sources":["../../../src/internals/ComponentHandler.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAE3C,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AACnE,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAA;AAC3E,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AACjE,OAAO,EAAE,cAAc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A;YACD,IAAI,SAAS,CAAC,KAAK;gBAAE,MAAM,WAAW,CAAC,KAAK,EAAE,CAAA;YAC9C,MAAM,SAAS,CAAC,GAAG,CAAC,WAAW,CAAC,CAAA;QACjC,CAAC;aAAM,IAAI,SAAS,YAAY,gBAAgB,EAAE,CAAC;YAClD,MAAM,WAAW,GAAG,IAAI,2BAA2B,CAClD,IAAI,CAAC,MAAM,EACX,IAAgD,EAChD,EAAE,SAAS,EAAE,SAAS,CAAC,SAAS,EAAE,CAClC,CAAA;YACD,IAAI,SAAS,CAAC,KAAK;gBAAE,MAAM,WAAW,CAAC,KAAK,EAAE,CAAA;YAC9C,MAAM,SAAS,CAAC,GAAG,CAAC,WAAW,CAAC,CAAA;QACjC,CAAC;aAAM,IAAI,SAAS,YAAY,cAAc,EAAE,CAAC;YAChD,MAAM,WAAW,GAAG,IAAI,yBAAyB,CAChD,IAAI,CAAC,MAAM,EACX,IAAgD,EAChD,EAAE,SAAS,EAAE,SAAS,CAAC,SAAS,EAAE,CAClC,CAAA;YACD,IAAI,SAAS,CAAC,KAAK;gBAAE,MAAM,WAAW,CAAC,KAAK,EAAE,CAAA;YAC9C,MAAM,SAAS,CAAC,GAAG,CAAC,WAAW,CAAC,CAAA;QACjC,CAAC;aAAM,CAAC;YACP,MAAM,IAAI,KAAK,CACd,+BAA+B,IAAI,CAAC,IAAI,CAAC,cAAc,kBAAkB,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,CAC9F,CAAA;QACF,CAAC;IACF,CAAC;CACD"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { type APIMessageComponentSelectMenuInteraction } from "discord-api-types/v10";
|
|
2
2
|
import { AnySelectMenuInteraction } from "../abstracts/AnySelectMenuInteraction.js";
|
|
3
|
+
import type { InteractionDefaults } from "../abstracts/BaseInteraction.js";
|
|
3
4
|
import type { Client } from "../classes/Client.js";
|
|
4
5
|
export declare class MentionableSelectMenuInteraction extends AnySelectMenuInteraction {
|
|
5
|
-
constructor(client: Client, data: APIMessageComponentSelectMenuInteraction);
|
|
6
|
+
constructor(client: Client, data: APIMessageComponentSelectMenuInteraction, defaults: InteractionDefaults);
|
|
6
7
|
get values(): string[];
|
|
7
8
|
}
|
|
8
9
|
//# sourceMappingURL=MentionableSelectMenuInteraction.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MentionableSelectMenuInteraction.d.ts","sourceRoot":"","sources":["../../../src/internals/MentionableSelectMenuInteraction.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,wCAAwC,EAG7C,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAA;AACnF,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAElD,qBAAa,gCAAiC,SAAQ,wBAAwB;
|
|
1
|
+
{"version":3,"file":"MentionableSelectMenuInteraction.d.ts","sourceRoot":"","sources":["../../../src/internals/MentionableSelectMenuInteraction.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,wCAAwC,EAG7C,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAA;AACnF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAA;AAC1E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAElD,qBAAa,gCAAiC,SAAQ,wBAAwB;gBAE5E,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,wCAAwC,EAC9C,QAAQ,EAAE,mBAAmB;IAQ9B,IAAI,MAAM,IAAI,MAAM,EAAE,CAGrB;CACD"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ComponentType } from "discord-api-types/v10";
|
|
2
2
|
import { AnySelectMenuInteraction } from "../abstracts/AnySelectMenuInteraction.js";
|
|
3
3
|
export class MentionableSelectMenuInteraction extends AnySelectMenuInteraction {
|
|
4
|
-
constructor(client, data) {
|
|
5
|
-
super(client, data);
|
|
4
|
+
constructor(client, data, defaults) {
|
|
5
|
+
super(client, data, defaults);
|
|
6
6
|
if (data.data.component_type !== ComponentType.MentionableSelect) {
|
|
7
7
|
throw new Error("Invalid component type was used to create this class");
|
|
8
8
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MentionableSelectMenuInteraction.js","sourceRoot":"","sources":["../../../src/internals/MentionableSelectMenuInteraction.ts"],"names":[],"mappings":"AAAA,OAAO,EAGN,aAAa,EACb,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAA;
|
|
1
|
+
{"version":3,"file":"MentionableSelectMenuInteraction.js","sourceRoot":"","sources":["../../../src/internals/MentionableSelectMenuInteraction.ts"],"names":[],"mappings":"AAAA,OAAO,EAGN,aAAa,EACb,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAA;AAInF,MAAM,OAAO,gCAAiC,SAAQ,wBAAwB;IAC7E,YACC,MAAc,EACd,IAA8C,EAC9C,QAA6B;QAE7B,KAAK,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAA;QAC7B,IAAI,IAAI,CAAC,IAAI,CAAC,cAAc,KAAK,aAAa,CAAC,iBAAiB,EAAE,CAAC;YAClE,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CAAA;QACxE,CAAC;IACF,CAAC;IAED,IAAI,MAAM;QACT,OAAQ,IAAI,CAAC,OAAO,CAAC,IAAmD;aACtE,MAAM,CAAA;IACT,CAAC;CACD"}
|
|
@@ -19,7 +19,7 @@ export class ModalHandler extends Base {
|
|
|
19
19
|
const modal = this.modals.find((x) => x.customId === data.data.custom_id);
|
|
20
20
|
if (!modal)
|
|
21
21
|
return false;
|
|
22
|
-
modal.run(new ModalInteraction(this.client, data));
|
|
22
|
+
modal.run(new ModalInteraction(this.client, data, {}));
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
//# sourceMappingURL=ModalHandler.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModalHandler.js","sourceRoot":"","sources":["../../../src/internals/ModalHandler.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAE3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAExD,MAAM,OAAO,YAAa,SAAQ,IAAI;IACrC,MAAM,GAAY,EAAE,CAAA;IACpB;;;OAGG;IACH,aAAa,CAAC,KAAY;QACzB,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC;YAC7D,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;QACxB,CAAC;IACF,CAAC;IACD;;;OAGG;IACH,KAAK,CAAC,iBAAiB,CAAC,IAA+B;QACtD,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;QACzE,IAAI,CAAC,KAAK;YAAE,OAAO,KAAK,CAAA;QAExB,KAAK,CAAC,GAAG,CAAC,IAAI,gBAAgB,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"ModalHandler.js","sourceRoot":"","sources":["../../../src/internals/ModalHandler.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAE3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAExD,MAAM,OAAO,YAAa,SAAQ,IAAI;IACrC,MAAM,GAAY,EAAE,CAAA;IACpB;;;OAGG;IACH,aAAa,CAAC,KAAY;QACzB,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC;YAC7D,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;QACxB,CAAC;IACF,CAAC;IACD;;;OAGG;IACH,KAAK,CAAC,iBAAiB,CAAC,IAA+B;QACtD,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;QACzE,IAAI,CAAC,KAAK;YAAE,OAAO,KAAK,CAAA;QAExB,KAAK,CAAC,GAAG,CAAC,IAAI,gBAAgB,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC,CAAA;IACvD,CAAC;CACD"}
|
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
import { type APIModalSubmitInteraction } from "discord-api-types/v10";
|
|
2
2
|
import { BaseInteraction } from "../abstracts/BaseInteraction.js";
|
|
3
|
-
import type {
|
|
3
|
+
import type { InteractionReplyData, InteractionReplyOptions } from "../abstracts/BaseInteraction.js";
|
|
4
|
+
import type { Client, InteractionDefaults } from "../index.js";
|
|
4
5
|
import { FieldsHandler } from "./FieldsHandler.js";
|
|
5
6
|
export declare class ModalInteraction extends BaseInteraction<APIModalSubmitInteraction> {
|
|
6
7
|
customId: string;
|
|
7
8
|
fields: FieldsHandler;
|
|
8
|
-
constructor(client: Client, data: APIModalSubmitInteraction);
|
|
9
|
+
constructor(client: Client, data: APIModalSubmitInteraction, defaults: InteractionDefaults);
|
|
9
10
|
/**
|
|
10
11
|
* Acknowledge the interaction, the user does not see a loading state.
|
|
11
12
|
* This can only be used for modals triggered from components
|
|
12
13
|
*/
|
|
13
14
|
acknowledge(): Promise<void>;
|
|
15
|
+
/**
|
|
16
|
+
* Update the original message of the component.
|
|
17
|
+
* This can only be used for modals triggered from components
|
|
18
|
+
*/
|
|
19
|
+
update(data: InteractionReplyData, options?: Pick<InteractionReplyOptions, "files">): Promise<void>;
|
|
14
20
|
}
|
|
15
21
|
//# sourceMappingURL=ModalInteraction.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModalInteraction.d.ts","sourceRoot":"","sources":["../../../src/internals/ModalInteraction.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"ModalInteraction.d.ts","sourceRoot":"","sources":["../../../src/internals/ModalInteraction.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,yBAAyB,EAI9B,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAA;AACjE,OAAO,KAAK,EACX,oBAAoB,EACpB,uBAAuB,EACvB,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EAAE,MAAM,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAElD,qBAAa,gBAAiB,SAAQ,eAAe,CAAC,yBAAyB,CAAC;IAC/E,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,aAAa,CAAA;gBAGpB,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,yBAAyB,EAC/B,QAAQ,EAAE,mBAAmB;IAQ9B;;;OAGG;IACG,WAAW;IAYjB;;;OAGG;IACG,MAAM,CACX,IAAI,EAAE,oBAAoB,EAC1B,OAAO,GAAE,IAAI,CAAC,uBAAuB,EAAE,OAAO,CAAM;CAiBrD"}
|
|
@@ -4,8 +4,8 @@ import { FieldsHandler } from "./FieldsHandler.js";
|
|
|
4
4
|
export class ModalInteraction extends BaseInteraction {
|
|
5
5
|
customId;
|
|
6
6
|
fields;
|
|
7
|
-
constructor(client, data) {
|
|
8
|
-
super(client, data);
|
|
7
|
+
constructor(client, data, defaults) {
|
|
8
|
+
super(client, data, defaults);
|
|
9
9
|
this.customId = data.data.custom_id;
|
|
10
10
|
this.fields = new FieldsHandler(client, data);
|
|
11
11
|
}
|
|
@@ -19,6 +19,24 @@ export class ModalInteraction extends BaseInteraction {
|
|
|
19
19
|
type: InteractionResponseType.DeferredMessageUpdate
|
|
20
20
|
}
|
|
21
21
|
});
|
|
22
|
+
this._deferred = true;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Update the original message of the component.
|
|
26
|
+
* This can only be used for modals triggered from components
|
|
27
|
+
*/
|
|
28
|
+
async update(data, options = {}) {
|
|
29
|
+
await this.client.rest.post(Routes.interactionCallback(this.rawData.id, this.rawData.token), {
|
|
30
|
+
body: {
|
|
31
|
+
type: InteractionResponseType.UpdateMessage,
|
|
32
|
+
data: {
|
|
33
|
+
...data,
|
|
34
|
+
embeds: data.embeds?.map((embed) => embed.serialize()),
|
|
35
|
+
components: data.components?.map((row) => row.serialize())
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
files: options.files
|
|
39
|
+
});
|
|
22
40
|
}
|
|
23
41
|
}
|
|
24
42
|
//# sourceMappingURL=ModalInteraction.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModalInteraction.js","sourceRoot":"","sources":["../../../src/internals/ModalInteraction.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"ModalInteraction.js","sourceRoot":"","sources":["../../../src/internals/ModalInteraction.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,uBAAuB,EAEvB,MAAM,EACN,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAA;AAMjE,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAElD,MAAM,OAAO,gBAAiB,SAAQ,eAA0C;IAC/E,QAAQ,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C,KAAK;SACpB,CACD,CAAA;IACF,CAAC;CACD"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { type APIMessageComponentSelectMenuInteraction } from "discord-api-types/v10";
|
|
2
2
|
import { AnySelectMenuInteraction } from "../abstracts/AnySelectMenuInteraction.js";
|
|
3
|
+
import type { InteractionDefaults } from "../abstracts/BaseInteraction.js";
|
|
3
4
|
import type { Client } from "../classes/Client.js";
|
|
4
5
|
export declare class RoleSelectMenuInteraction extends AnySelectMenuInteraction {
|
|
5
|
-
constructor(client: Client, data: APIMessageComponentSelectMenuInteraction);
|
|
6
|
+
constructor(client: Client, data: APIMessageComponentSelectMenuInteraction, defaults: InteractionDefaults);
|
|
6
7
|
get values(): string[];
|
|
7
8
|
}
|
|
8
9
|
//# sourceMappingURL=RoleSelectMenuInteraction.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RoleSelectMenuInteraction.d.ts","sourceRoot":"","sources":["../../../src/internals/RoleSelectMenuInteraction.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,wCAAwC,EAG7C,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAA;AACnF,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAElD,qBAAa,yBAA0B,SAAQ,wBAAwB;
|
|
1
|
+
{"version":3,"file":"RoleSelectMenuInteraction.d.ts","sourceRoot":"","sources":["../../../src/internals/RoleSelectMenuInteraction.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,wCAAwC,EAG7C,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAA;AACnF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAA;AAC1E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAElD,qBAAa,yBAA0B,SAAQ,wBAAwB;gBAErE,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,wCAAwC,EAC9C,QAAQ,EAAE,mBAAmB;IAQ9B,IAAI,MAAM,IAAI,MAAM,EAAE,CAErB;CACD"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ComponentType } from "discord-api-types/v10";
|
|
2
2
|
import { AnySelectMenuInteraction } from "../abstracts/AnySelectMenuInteraction.js";
|
|
3
3
|
export class RoleSelectMenuInteraction extends AnySelectMenuInteraction {
|
|
4
|
-
constructor(client, data) {
|
|
5
|
-
super(client, data);
|
|
4
|
+
constructor(client, data, defaults) {
|
|
5
|
+
super(client, data, defaults);
|
|
6
6
|
if (data.data.component_type !== ComponentType.RoleSelect) {
|
|
7
7
|
throw new Error("Invalid component type was used to create this class");
|
|
8
8
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RoleSelectMenuInteraction.js","sourceRoot":"","sources":["../../../src/internals/RoleSelectMenuInteraction.ts"],"names":[],"mappings":"AAAA,OAAO,EAGN,aAAa,EACb,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAA;
|
|
1
|
+
{"version":3,"file":"RoleSelectMenuInteraction.js","sourceRoot":"","sources":["../../../src/internals/RoleSelectMenuInteraction.ts"],"names":[],"mappings":"AAAA,OAAO,EAGN,aAAa,EACb,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAA;AAInF,MAAM,OAAO,yBAA0B,SAAQ,wBAAwB;IACtE,YACC,MAAc,EACd,IAA8C,EAC9C,QAA6B;QAE7B,KAAK,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAA;QAC7B,IAAI,IAAI,CAAC,IAAI,CAAC,cAAc,KAAK,aAAa,CAAC,UAAU,EAAE,CAAC;YAC3D,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CAAA;QACxE,CAAC;IACF,CAAC;IAED,IAAI,MAAM;QACT,OAAQ,IAAI,CAAC,OAAO,CAAC,IAA4C,CAAC,MAAM,CAAA;IACzE,CAAC;CACD"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { type APIMessageComponentSelectMenuInteraction } from "discord-api-types/v10";
|
|
2
2
|
import { AnySelectMenuInteraction } from "../abstracts/AnySelectMenuInteraction.js";
|
|
3
|
+
import type { InteractionDefaults } from "../abstracts/BaseInteraction.js";
|
|
3
4
|
import type { Client } from "../classes/Client.js";
|
|
4
5
|
export declare class StringSelectMenuInteraction extends AnySelectMenuInteraction {
|
|
5
|
-
constructor(client: Client, data: APIMessageComponentSelectMenuInteraction);
|
|
6
|
+
constructor(client: Client, data: APIMessageComponentSelectMenuInteraction, defaults: InteractionDefaults);
|
|
6
7
|
get values(): string[];
|
|
7
8
|
}
|
|
8
9
|
//# sourceMappingURL=StringSelectMenuInteraction.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StringSelectMenuInteraction.d.ts","sourceRoot":"","sources":["../../../src/internals/StringSelectMenuInteraction.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,wCAAwC,EAG7C,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAA;AACnF,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAElD,qBAAa,2BAA4B,SAAQ,wBAAwB;
|
|
1
|
+
{"version":3,"file":"StringSelectMenuInteraction.d.ts","sourceRoot":"","sources":["../../../src/internals/StringSelectMenuInteraction.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,wCAAwC,EAG7C,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAA;AACnF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAA;AAC1E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAElD,qBAAa,2BAA4B,SAAQ,wBAAwB;gBAEvE,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,wCAAwC,EAC9C,QAAQ,EAAE,mBAAmB;IAQ9B,IAAI,MAAM,IAAI,MAAM,EAAE,CAErB;CACD"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ComponentType } from "discord-api-types/v10";
|
|
2
2
|
import { AnySelectMenuInteraction } from "../abstracts/AnySelectMenuInteraction.js";
|
|
3
3
|
export class StringSelectMenuInteraction extends AnySelectMenuInteraction {
|
|
4
|
-
constructor(client, data) {
|
|
5
|
-
super(client, data);
|
|
4
|
+
constructor(client, data, defaults) {
|
|
5
|
+
super(client, data, defaults);
|
|
6
6
|
if (data.data.component_type !== ComponentType.StringSelect) {
|
|
7
7
|
throw new Error("Invalid component type was used to create this class");
|
|
8
8
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StringSelectMenuInteraction.js","sourceRoot":"","sources":["../../../src/internals/StringSelectMenuInteraction.ts"],"names":[],"mappings":"AAAA,OAAO,EAGN,aAAa,EACb,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAA;
|
|
1
|
+
{"version":3,"file":"StringSelectMenuInteraction.js","sourceRoot":"","sources":["../../../src/internals/StringSelectMenuInteraction.ts"],"names":[],"mappings":"AAAA,OAAO,EAGN,aAAa,EACb,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAA;AAInF,MAAM,OAAO,2BAA4B,SAAQ,wBAAwB;IACxE,YACC,MAAc,EACd,IAA8C,EAC9C,QAA6B;QAE7B,KAAK,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAA;QAC7B,IAAI,IAAI,CAAC,IAAI,CAAC,cAAc,KAAK,aAAa,CAAC,YAAY,EAAE,CAAC;YAC7D,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CAAA;QACxE,CAAC;IACF,CAAC;IAED,IAAI,MAAM;QACT,OAAQ,IAAI,CAAC,OAAO,CAAC,IAA8C,CAAC,MAAM,CAAA;IAC3E,CAAC;CACD"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { type APIMessageComponentSelectMenuInteraction } from "discord-api-types/v10";
|
|
2
2
|
import { AnySelectMenuInteraction } from "../abstracts/AnySelectMenuInteraction.js";
|
|
3
|
+
import type { InteractionDefaults } from "../abstracts/BaseInteraction.js";
|
|
3
4
|
import type { Client } from "../classes/Client.js";
|
|
4
5
|
export declare class UserSelectMenuInteraction extends AnySelectMenuInteraction {
|
|
5
|
-
constructor(client: Client, data: APIMessageComponentSelectMenuInteraction);
|
|
6
|
+
constructor(client: Client, data: APIMessageComponentSelectMenuInteraction, defaults: InteractionDefaults);
|
|
6
7
|
get values(): string[];
|
|
7
8
|
}
|
|
8
9
|
//# sourceMappingURL=UserSelectMenuInteraction.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserSelectMenuInteraction.d.ts","sourceRoot":"","sources":["../../../src/internals/UserSelectMenuInteraction.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,wCAAwC,EAG7C,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAA;AACnF,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAElD,qBAAa,yBAA0B,SAAQ,wBAAwB;
|
|
1
|
+
{"version":3,"file":"UserSelectMenuInteraction.d.ts","sourceRoot":"","sources":["../../../src/internals/UserSelectMenuInteraction.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,wCAAwC,EAG7C,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAA;AACnF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAA;AAC1E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAElD,qBAAa,yBAA0B,SAAQ,wBAAwB;gBAErE,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,wCAAwC,EAC9C,QAAQ,EAAE,mBAAmB;IAQ9B,IAAI,MAAM,IAAI,MAAM,EAAE,CAErB;CACD"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ComponentType } from "discord-api-types/v10";
|
|
2
2
|
import { AnySelectMenuInteraction } from "../abstracts/AnySelectMenuInteraction.js";
|
|
3
3
|
export class UserSelectMenuInteraction extends AnySelectMenuInteraction {
|
|
4
|
-
constructor(client, data) {
|
|
5
|
-
super(client, data);
|
|
4
|
+
constructor(client, data, defaults) {
|
|
5
|
+
super(client, data, defaults);
|
|
6
6
|
if (data.data.component_type !== ComponentType.UserSelect) {
|
|
7
7
|
throw new Error("Invalid component type was used to create this class");
|
|
8
8
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserSelectMenuInteraction.js","sourceRoot":"","sources":["../../../src/internals/UserSelectMenuInteraction.ts"],"names":[],"mappings":"AAAA,OAAO,EAGN,aAAa,EACb,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAA;
|
|
1
|
+
{"version":3,"file":"UserSelectMenuInteraction.js","sourceRoot":"","sources":["../../../src/internals/UserSelectMenuInteraction.ts"],"names":[],"mappings":"AAAA,OAAO,EAGN,aAAa,EACb,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAA;AAInF,MAAM,OAAO,yBAA0B,SAAQ,wBAAwB;IACtE,YACC,MAAc,EACd,IAA8C,EAC9C,QAA6B;QAE7B,KAAK,CAAC,MAAM,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAA;QAC7B,IAAI,IAAI,CAAC,IAAI,CAAC,cAAc,KAAK,aAAa,CAAC,UAAU,EAAE,CAAC;YAC3D,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CAAA;QACxE,CAAC;IACF,CAAC;IAED,IAAI,MAAM;QACT,OAAQ,IAAI,CAAC,OAAO,CAAC,IAA4C,CAAC,MAAM,CAAA;IACzE,CAAC;CACD"}
|
|
@@ -1,22 +1,97 @@
|
|
|
1
|
-
import { type APIMessage, type RESTPostAPIChannelThreadsJSONBody } from "discord-api-types/v10";
|
|
1
|
+
import { type APIAllowedMentions, type APIAttachment, type APIMessage, type APIMessageInteractionMetadata, type APIMessageReference, type APIPoll, type APIReaction, type APISticker, type ChannelType, type MessageFlags, type MessageType, type RESTPostAPIChannelThreadsJSONBody } from "discord-api-types/v10";
|
|
2
2
|
import { Base } from "../abstracts/Base.js";
|
|
3
3
|
import type { Client } from "../classes/Client.js";
|
|
4
4
|
import { GuildThreadChannel } from "./GuildThreadChannel.js";
|
|
5
5
|
import { User } from "./User.js";
|
|
6
|
+
import { Embed } from "../classes/Embed.js";
|
|
7
|
+
import type { Row } from "../classes/Row.js";
|
|
8
|
+
import { Role } from "./Role.js";
|
|
6
9
|
export declare class Message extends Base {
|
|
7
10
|
/**
|
|
8
11
|
* The ID of the message
|
|
9
12
|
*/
|
|
10
|
-
id: string;
|
|
13
|
+
protected id: string;
|
|
11
14
|
/**
|
|
12
15
|
* The ID of the channel the message is in
|
|
13
16
|
*/
|
|
14
|
-
channelId: string;
|
|
17
|
+
protected channelId: string;
|
|
15
18
|
/**
|
|
16
19
|
* Whether the message is a partial message (meaning it does not have all the data).
|
|
17
20
|
* If this is true, you should use {@link Message.fetch} to get the full data of the message.
|
|
18
21
|
*/
|
|
19
|
-
partial: boolean;
|
|
22
|
+
protected partial: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* If this message is a response to an interaction, this is the ID of the interaction's application
|
|
25
|
+
*/
|
|
26
|
+
protected applicationId?: string;
|
|
27
|
+
/**
|
|
28
|
+
* The attachments of the message
|
|
29
|
+
*/
|
|
30
|
+
protected attachments?: APIAttachment[];
|
|
31
|
+
/**
|
|
32
|
+
* The components of the message
|
|
33
|
+
*/
|
|
34
|
+
protected components?: APIMessage["components"];
|
|
35
|
+
/**
|
|
36
|
+
* The content of the message
|
|
37
|
+
*/
|
|
38
|
+
protected content?: string;
|
|
39
|
+
/**
|
|
40
|
+
* If this message was edited, this is the timestamp of the edit
|
|
41
|
+
*/
|
|
42
|
+
protected editedTimestamp?: string | null;
|
|
43
|
+
/**
|
|
44
|
+
* The flags of the message
|
|
45
|
+
*/
|
|
46
|
+
protected flags?: MessageFlags;
|
|
47
|
+
/**
|
|
48
|
+
* The interaction metadata of the message
|
|
49
|
+
*/
|
|
50
|
+
protected interactionMetadata?: APIMessageInteractionMetadata;
|
|
51
|
+
/**
|
|
52
|
+
* Whether the message mentions everyone
|
|
53
|
+
*/
|
|
54
|
+
protected mentionedEveryone?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* The data about the referenced message. You can use {@link Message.referencedMessage} to get the referenced message itself.
|
|
57
|
+
*/
|
|
58
|
+
protected messageReference?: APIMessageReference;
|
|
59
|
+
/**
|
|
60
|
+
* Whether the message is pinned
|
|
61
|
+
*/
|
|
62
|
+
protected pinned?: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* The poll contained in the message
|
|
65
|
+
*/
|
|
66
|
+
protected poll?: APIPoll;
|
|
67
|
+
/**
|
|
68
|
+
* The approximate position of the message in the channel
|
|
69
|
+
*/
|
|
70
|
+
protected position?: number;
|
|
71
|
+
/**
|
|
72
|
+
* The reactions on the message
|
|
73
|
+
*/
|
|
74
|
+
protected reactions?: APIReaction[];
|
|
75
|
+
/**
|
|
76
|
+
* The stickers in the message
|
|
77
|
+
*/
|
|
78
|
+
protected stickers?: APISticker[];
|
|
79
|
+
/**
|
|
80
|
+
* The timestamp of the original message
|
|
81
|
+
*/
|
|
82
|
+
protected timestamp?: string;
|
|
83
|
+
/**
|
|
84
|
+
* Whether the message is a TTS message
|
|
85
|
+
*/
|
|
86
|
+
protected tts?: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* The type of the message
|
|
89
|
+
*/
|
|
90
|
+
protected type?: MessageType;
|
|
91
|
+
/**
|
|
92
|
+
* If a webhook is used to send the message, this is the ID of the webhook
|
|
93
|
+
*/
|
|
94
|
+
protected webhookId?: string;
|
|
20
95
|
private rawData;
|
|
21
96
|
constructor(client: Client, rawDataOrIds: APIMessage | {
|
|
22
97
|
id: string;
|
|
@@ -33,7 +108,13 @@ export declare class Message extends Base {
|
|
|
33
108
|
* Delete this message from Discord
|
|
34
109
|
*/
|
|
35
110
|
delete(): Promise<unknown>;
|
|
111
|
+
/**
|
|
112
|
+
* Get the author of the message
|
|
113
|
+
*/
|
|
36
114
|
get author(): User | null;
|
|
115
|
+
/**
|
|
116
|
+
* Get the channel the message was sent in
|
|
117
|
+
*/
|
|
37
118
|
fetchChannel(): Promise<import("./DmChannel.js").DmChannel | import("./GroupDmChannel.js").GroupDmChannel | import("./GuildTextChannel.js").GuildTextChannel | import("./GuildStageOrVoiceChannel.js").GuildVoiceChannel | import("./GuildCategoryChannel.js").GuildCategoryChannel | import("./GuildAnnouncementChannel.js").GuildAnnouncementChannel | GuildThreadChannel<import("discord-api-types/v10").ThreadChannelType> | import("./GuildStageOrVoiceChannel.js").GuildStageChannel | import("./GuildForumChannel.js").GuildForumChannel | import("./GuildMediaChannel.js").GuildMediaChannel | null>;
|
|
38
119
|
/**
|
|
39
120
|
* Pin this message
|
|
@@ -48,5 +129,16 @@ export declare class Message extends Base {
|
|
|
48
129
|
* If you want to start a thread without a start message, use {@link BaseGuildTextChannel.startThread}
|
|
49
130
|
*/
|
|
50
131
|
startThread(data: RESTPostAPIChannelThreadsJSONBody): Promise<GuildThreadChannel<import("discord-api-types/v10").ThreadChannelType>>;
|
|
132
|
+
get thread(): GuildThreadChannel<ChannelType.PublicThread | ChannelType.AnnouncementThread> | null;
|
|
133
|
+
get embeds(): Embed[];
|
|
134
|
+
edit(data: {
|
|
135
|
+
content?: string;
|
|
136
|
+
embeds?: Embed[];
|
|
137
|
+
allowedMentions?: APIAllowedMentions;
|
|
138
|
+
components?: Row[];
|
|
139
|
+
}): Promise<void>;
|
|
140
|
+
get mentionedUsers(): User[];
|
|
141
|
+
get mentionedRoles(): Role[];
|
|
142
|
+
get referencedMessage(): Message | null;
|
|
51
143
|
}
|
|
52
144
|
//# sourceMappingURL=Message.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Message.d.ts","sourceRoot":"","sources":["../../../src/structures/Message.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Message.d.ts","sourceRoot":"","sources":["../../../src/structures/Message.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAElB,KAAK,UAAU,EACf,KAAK,6BAA6B,EAClC,KAAK,mBAAmB,EACxB,KAAK,OAAO,EACZ,KAAK,WAAW,EAChB,KAAK,UAAU,EAEf,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,iCAAiC,EAEtC,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAC3C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAElD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAC5D,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAA;AAC3C,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAA;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAEhC,qBAAa,OAAQ,SAAQ,IAAI;IAChC;;OAEG;IACH,SAAS,CAAC,EAAE,EAAE,MAAM,CAAA;IACpB;;OAEG;IACH,SAAS,CAAC,SAAS,EAAE,MAAM,CAAA;IAC3B;;;OAGG;I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