CommandContext
Signature
export interface CommandContext<T extends OptionsRecord = {}, M extends keyof ResolvedRegisteredMiddlewares = never> extends BaseContext, ExtendContextProperties
18Methods
26Properties
readonly client: UsingClient;readonly resolver: OptionResolverStructure;readonly shardId: number;readonly command: Command | SubCommand;message: If<InferWithPrefix, MessageStructure | undefined, undefined>;interaction: If<InferWithPrefix, ChatInputCommandInteraction | undefined, ChatInputCommandInteraction>;messageResponse?: If<InferWithPrefix, MessageStructure | undefined, undefined>;options: ContextOptions<T>;metadata: CommandMetadata<M>;globalMetadata: GlobalMetadata;tGetterget t(): SeyfertLocale;fullCommandNameGetterget fullCommandName(): string;deferredGetterget deferred(): boolean;guildIdGetterget guildId(): string | undefined;channelIdGetterget channelId(): string;authorGetterget author(): UserStructure;memberGetterget member(): If<InferWithPrefix, GuildMemberStructure | InteractionGuildMemberStructure | undefined, InteractionGuildMemberStructure | undefined>;proxyGetterget proxy(): APIRoutes;Gets the proxy object.
Methods
write<WR extends boolean = false>(body: InteractionCreateBodyRequest, withResponse?: WR): Promise<When<WR, WebhookMessageStructure | When<InferWithPrefix, MessageStructure, never>, void>>;modal(body: ModalCreateBodyRequest, options?: undefined): Promise<undefined>;modal(body: ModalCreateBodyRequest, options: ModalCreateOptions): Promise<ModalSubmitInteraction | null>;deferReply<WR extends boolean = false>(ephemeral?: boolean, withResponse?: WR): Promise<When<WR, WebhookMessageStructure | When<InferWithPrefix, MessageStructure, never>, When<InferWithPrefix, MessageStructure, never> | undefined>>;editResponse(body: InteractionMessageUpdateBodyRequest): Promise<When<InferWithPrefix, WebhookMessageStructure | MessageStructure, WebhookMessageStructure>>;deleteResponse(): Promise<void>;editOrReply<WR extends boolean = false>(body: InteractionCreateBodyRequest | InteractionMessageUpdateBodyRequest, withResponse?: WR): Promise<When<WR, WebhookMessageStructure | When<InferWithPrefix, MessageStructure, never>, void>>;followup(body: MessageWebhookCreateBodyRequest): Promise<If<InferWithPrefix, WebhookMessageStructure | MessageStructure, WebhookMessageStructure>>;fetchResponse(): Promise<If<InferWithPrefix, WebhookMessageStructure | MessageStructure, WebhookMessageStructure>>;channel(mode?: 'rest' | 'flow'): Promise<AllChannels>;channel(mode: 'cache'): ReturnCache<If<InferWithPrefix, AllChannels | undefined, AllChannels>>;me(mode?: 'rest' | 'flow'): Promise<GuildMemberStructure | undefined>;me(mode: 'cache'): ReturnCache<GuildMemberStructure | undefined>;fetchMember(mode?: 'rest' | 'flow'): Promise<GuildMemberStructure | undefined>;fetchMember(mode: 'cache'): ReturnCache<GuildMemberStructure | undefined>;guild(mode?: 'rest' | 'flow', query?: RESTGetAPIGuildQuery): Promise<GuildStructure<'cached' | 'api'> | undefined>;guild(mode: 'cache', query?: RESTGetAPIGuildQuery): ReturnCache<GuildStructure<'cached'> | undefined>;isChat(): this is CommandContext<T, M>;inGuild(): this is GuildCommandContext<T, M>;isMenu(): this is MenuCommandContext<UserCommandInteraction | MessageCommandInteraction>;isMenuUser(): this is MenuCommandContext<UserCommandInteraction>;isMenuMessage(): this is MenuCommandContext<MessageCommandInteraction>;isComponent(): this is ComponentContext<keyof ContextComponentCommandInteractionMap>;isModal(): this is ModalContext;isButton(): this is ComponentContext<'Button'>;isChannelSelectMenu(): this is ComponentContext<'ChannelSelect'>;isRoleSelectMenu(): this is ComponentContext<'RoleSelect'>;isMentionableSelectMenu(): this is ComponentContext<'MentionableSelect'>;isUserSelectMenu(): this is ComponentContext<'UserSelect'>;isStringSelectMenu(): this is ComponentContext<'StringSelect'>;isEntryPoint(): this is EntryPointContext;