ComponentContext

Signature

@Mixins(ExtendContext)export declare class ComponentContext<Type extends keyof ContextComponentCommandInteractionMap, M extends keyof ResolvedRegisteredMiddlewares = never, StringSelectValues extends string[] = string[]> extends BaseContext

Properties

tGetter
get t(): SeyfertLocale;

Gets the language object for the interaction's locale.

customIdGetter
get customId(): string;

Gets the custom ID of the interaction.

guildIdGetter
get guildId(): string | undefined;

Gets the ID of the guild of the interaction.

get channelId(): string;

Gets the ID of the channel of the interaction.

Methods

deferReply<FR extends boolean = false>(ephemeral?: boolean, fetchReply?: FR): Promise<When<FR, WebhookMessageStructure, undefined>>;

Defers the reply to the interaction.

Parameters
ephemeral
Whether the reply should be ephemeral or not.
deferUpdate(): Promise<undefined>;

ACK an interaction and edit the original message later; the user does not see a loading state

deleteResponse(): Promise<void>;

Deletes the response of the interaction.

Returns

A promise that resolves when the response is deleted.

channel(mode?: 'rest' | 'flow'): Promise<AllChannels>;channel(mode: 'cache'): ReturnCache<AllChannels>;

Gets the channel of the interaction.

Parameters
mode
The mode to fetch the channel.
Returns

A promise that resolves to the channel.

me(mode?: 'rest' | 'flow'): Promise<GuildMemberStructure | undefined>;me(mode: 'cache'): ReturnCache<GuildMemberStructure | undefined>;

Gets the bot member in the guild of the interaction.

Parameters
mode
The mode to fetch the member.
Returns

A promise that resolves to the bot member.