seyfert 4.0.1-dev-20194574398.0 → 4.0.1-dev-20556316054.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/lib/commands/applications/chatcontext.d.ts +1 -0
- package/lib/commands/applications/chatcontext.js +3 -0
- package/lib/commands/applications/entrycontext.d.ts +1 -0
- package/lib/commands/applications/entrycontext.js +3 -0
- package/lib/commands/applications/menucontext.d.ts +1 -0
- package/lib/commands/applications/menucontext.js +3 -0
- package/lib/common/types/resolvables.d.ts +2 -2
- package/lib/structures/Interaction.d.ts +1 -0
- package/lib/structures/Interaction.js +2 -0
- package/package.json +1 -1
|
@@ -26,6 +26,7 @@ export declare class CommandContext<T extends OptionsRecord = {}, M extends keyo
|
|
|
26
26
|
get(locale?: string): import("./shared").DefaultLocale;
|
|
27
27
|
};
|
|
28
28
|
get fullCommandName(): string;
|
|
29
|
+
get deferred(): boolean;
|
|
29
30
|
write<WR extends boolean = false>(body: InteractionCreateBodyRequest, withResponse?: WR): Promise<When<WR, WebhookMessageStructure | When<InferWithPrefix, MessageStructure, never>, void | WebhookMessageStructure | When<InferWithPrefix, MessageStructure, never>>>;
|
|
30
31
|
deferReply<WR extends boolean = false>(ephemeral?: boolean, withResponse?: WR): Promise<When<WR, WebhookMessageStructure | When<InferWithPrefix, MessageStructure, never>, When<InferWithPrefix, MessageStructure, never> | undefined>>;
|
|
31
32
|
editResponse(body: InteractionMessageUpdateBodyRequest): Promise<When<InferWithPrefix, WebhookMessageStructure | MessageStructure, WebhookMessageStructure>>;
|
|
@@ -34,6 +34,9 @@ class CommandContext extends basecontext_1.BaseContext {
|
|
|
34
34
|
get fullCommandName() {
|
|
35
35
|
return this.resolver.fullCommandName;
|
|
36
36
|
}
|
|
37
|
+
get deferred() {
|
|
38
|
+
return !!this.__deferred;
|
|
39
|
+
}
|
|
37
40
|
async write(body, withResponse) {
|
|
38
41
|
if (this.interaction)
|
|
39
42
|
return this.interaction.write(body, withResponse);
|
|
@@ -21,6 +21,7 @@ export declare class EntryPointContext<M extends keyof RegisteredMiddlewares = n
|
|
|
21
21
|
get(locale?: string): import("./shared").DefaultLocale;
|
|
22
22
|
};
|
|
23
23
|
get fullCommandName(): string;
|
|
24
|
+
get deferred(): boolean;
|
|
24
25
|
write<WR extends boolean = false>(body: InteractionCreateBodyRequest, withResponse?: WR): Promise<When<WR, WebhookMessageStructure, void>>;
|
|
25
26
|
modal(body: ModalCreateBodyRequest, options?: undefined): Promise<undefined>;
|
|
26
27
|
modal(body: ModalCreateBodyRequest, options: ModalCreateOptions): Promise<ModalSubmitInteraction | null>;
|
|
@@ -23,6 +23,9 @@ class EntryPointContext extends basecontext_1.BaseContext {
|
|
|
23
23
|
get fullCommandName() {
|
|
24
24
|
return this.command.name;
|
|
25
25
|
}
|
|
26
|
+
get deferred() {
|
|
27
|
+
return !!this.interaction.deferred;
|
|
28
|
+
}
|
|
26
29
|
write(body, withResponse) {
|
|
27
30
|
return this.interaction.write(body, withResponse);
|
|
28
31
|
}
|
|
@@ -22,6 +22,7 @@ export declare class MenuCommandContext<T extends MessageCommandInteraction | Us
|
|
|
22
22
|
get(locale?: string): import("./shared").DefaultLocale;
|
|
23
23
|
};
|
|
24
24
|
get fullCommandName(): string;
|
|
25
|
+
get deferred(): boolean;
|
|
25
26
|
write<WR extends boolean = false>(body: InteractionCreateBodyRequest, withResponse?: WR): Promise<When<WR, WebhookMessageStructure, void>>;
|
|
26
27
|
modal(body: ModalCreateBodyRequest, options?: undefined): Promise<undefined>;
|
|
27
28
|
modal(body: ModalCreateBodyRequest, options: ModalCreateOptions): Promise<ModalSubmitInteraction | null>;
|
|
@@ -37,6 +37,9 @@ class MenuCommandContext extends basecontext_1.BaseContext {
|
|
|
37
37
|
get fullCommandName() {
|
|
38
38
|
return this.command.name;
|
|
39
39
|
}
|
|
40
|
+
get deferred() {
|
|
41
|
+
return !!this.interaction.deferred;
|
|
42
|
+
}
|
|
40
43
|
write(body, withResponse) {
|
|
41
44
|
return this.interaction.write(body, withResponse);
|
|
42
45
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Attachment, AttachmentDataType, AttachmentResolvable } from '../../builders';
|
|
1
|
+
import type { Attachment, AttachmentBuilder, AttachmentDataType, AttachmentResolvable } from '../../builders';
|
|
2
2
|
import type { GuildMember } from '../../structures';
|
|
3
3
|
import type { APIGuildMember, APIPartialEmoji, RESTPostAPIApplicationEmojiJSONBody } from '../../types';
|
|
4
4
|
import type { EmbedColors, OmitInsert } from '..';
|
|
@@ -8,7 +8,7 @@ export type ColorResolvable = `#${string}` | number | keyof typeof EmbedColors |
|
|
|
8
8
|
export type ImageResolvable = {
|
|
9
9
|
data: AttachmentResolvable;
|
|
10
10
|
type: AttachmentDataType;
|
|
11
|
-
} | Attachment;
|
|
11
|
+
} | Attachment | AttachmentBuilder;
|
|
12
12
|
export type ApplicationEmojiResolvable = OmitInsert<RESTPostAPIApplicationEmojiJSONBody, 'image', {
|
|
13
13
|
image: ImageResolvable;
|
|
14
14
|
}>;
|
|
@@ -31,6 +31,7 @@ export declare class BaseInteraction<FromGuild extends boolean = boolean, Type e
|
|
|
31
31
|
channel?: AllChannels;
|
|
32
32
|
message?: MessageStructure;
|
|
33
33
|
replied?: Promise<boolean | RESTPostAPIInteractionCallbackResult | undefined> | boolean;
|
|
34
|
+
deferred?: boolean;
|
|
34
35
|
appPermissions: PermissionsBitField;
|
|
35
36
|
entitlements: EntitlementStructure[];
|
|
36
37
|
constructor(client: UsingClient, interaction: Type, __reply?: __InternalReplyFunction | undefined);
|
|
@@ -24,6 +24,7 @@ class BaseInteraction extends DiscordBase_1.DiscordBase {
|
|
|
24
24
|
channel;
|
|
25
25
|
message;
|
|
26
26
|
replied;
|
|
27
|
+
deferred;
|
|
27
28
|
appPermissions;
|
|
28
29
|
entitlements;
|
|
29
30
|
constructor(client, interaction, __reply) {
|
|
@@ -144,6 +145,7 @@ class BaseInteraction extends DiscordBase_1.DiscordBase {
|
|
|
144
145
|
return result;
|
|
145
146
|
}
|
|
146
147
|
deferReply(flags, withResponse) {
|
|
148
|
+
this.deferred = true;
|
|
147
149
|
return this.reply({
|
|
148
150
|
type: types_1.InteractionResponseType.DeferredChannelMessageWithSource,
|
|
149
151
|
data: {
|