Skip to content

CommandContext

Extends

Type parameters

Type parameterValue
T extends OptionsRecordObject
M extends keyof RegisteredMiddlewaresnever

Constructors

new CommandContext(client, data, resolver, shardId, command)

1
new CommandContext<T, M>(
2
client: UsingClient,
3
data: Message | ChatInputCommandInteraction<boolean>,
4
resolver: OptionResolver,
5
shardId: number,
6
command: Command | SubCommand): CommandContext<T, M>

Parameters

ParameterType
clientUsingClient
dataMessage | ChatInputCommandInteraction<boolean>
resolverOptionResolver
shardIdnumber
commandCommand | SubCommand

Returns

CommandContext<T, M>

Inherited from

BaseContext.constructor

Source

seyfert/src/commands/applications/chatcontext.ts:30

Properties

PropertyModifierTypeInherited from
clientreadonlyUsingClientBaseContext.client
commandreadonlyCommand | SubCommand-
globalMetadatapublicGlobalMetadata-
interactionpublicChatInputCommandInteraction<boolean>-
messagepublicundefined-
messageResponse?publicnull | Message-
metadatapublicCommandMetadata<UnionToTuple<M, []>>-
optionspublicContextOptions<T>-
resolverreadonlyOptionResolver-
shardIdreadonlynumber-

Accessors

author

1
get author(): User

Returns

User

Source

seyfert/src/commands/applications/chatcontext.ts:169


channelId

1
get channelId(): string

Returns

string

Source

seyfert/src/commands/applications/chatcontext.ts:165


fullCommandName

1
get fullCommandName(): string

Returns

string

Source

seyfert/src/commands/applications/chatcontext.ts:57


guildId

1
get guildId(): undefined | string

Returns

undefined | string

Source

seyfert/src/commands/applications/chatcontext.ts:161


member

1
get member(): undefined | InteractionGuildMember

Returns

undefined | InteractionGuildMember

Source

seyfert/src/commands/applications/chatcontext.ts:173


proxy

1
get proxy(): APIRoutes

Returns

APIRoutes

Source

seyfert/src/commands/applications/chatcontext.ts:49


t

1
get t(): __InternalParseLocale<DefaultLocale> & Object

Returns

__InternalParseLocale<DefaultLocale> & Object

Source

seyfert/src/commands/applications/chatcontext.ts:53

Methods

channel()

channel(mode)

1
channel(mode?: "rest" | "flow"): Promise<AllChannels>
Parameters
ParameterType
mode?"rest" | "flow"
Returns

Promise<AllChannels>

Source

seyfert/src/commands/applications/chatcontext.ts:109

channel(mode)

1
channel(mode?: "cache"): ReturnCache<AllChannels>
Parameters
ParameterType
mode?"cache"
Returns

ReturnCache<AllChannels>

Source

seyfert/src/commands/applications/chatcontext.ts:110


deferReply()

1
deferReply(ephemeral: boolean): Promise<void | Message>

Parameters

ParameterTypeDefault value
ephemeralbooleanfalse

Returns

Promise<void | Message>

Source

seyfert/src/commands/applications/chatcontext.ts:72


deleteResponse()

1
deleteResponse(): Promise<void>

Returns

Promise<void>

Source

seyfert/src/commands/applications/chatcontext.ts:85


editOrReply()

1
editOrReply<FR>(body: Omit<RESTPatchAPIWebhookWithTokenMessageJSONBody, "components" | "embeds"> & ResolverProps | Omit<APIInteractionResponseCallbackData, "components" | "embeds" | "poll"> & SendResolverProps, fetchReply?: FR): Promise<When<FR, Message | WebhookMessage, void | Message | WebhookMessage>>

Type parameters

Type parameterValue
FR extends booleanfalse

Parameters

ParameterType
bodyOmit<RESTPatchAPIWebhookWithTokenMessageJSONBody, "components" | "embeds"> & ResolverProps | Omit<APIInteractionResponseCallbackData, "components" | "embeds" | "poll"> & SendResolverProps
fetchReply?FR

Returns

Promise<When<FR, Message | WebhookMessage, void | Message | WebhookMessage>>

Source

seyfert/src/commands/applications/chatcontext.ts:90


editResponse()

1
editResponse(body: Omit<RESTPatchAPIWebhookWithTokenMessageJSONBody, "components" | "embeds"> & ResolverProps): Promise<Message | WebhookMessage>

Parameters

ParameterType
bodyOmit<RESTPatchAPIWebhookWithTokenMessageJSONBody, "components" | "embeds"> & ResolverProps

Returns

Promise<Message | WebhookMessage>

Source

seyfert/src/commands/applications/chatcontext.ts:80


fetchResponse()

1
fetchResponse(): Promise<undefined | WebhookMessage>

Returns

Promise<undefined | WebhookMessage>

Source

seyfert/src/commands/applications/chatcontext.ts:101


guild()

guild(mode)

1
guild(mode?: "rest" | "flow"): Promise<undefined | Guild<"cached" | "api">>
Parameters
ParameterType
mode?"rest" | "flow"
Returns

Promise<undefined | Guild<"cached" | "api">>

Source

seyfert/src/commands/applications/chatcontext.ts:141

guild(mode)

1
guild(mode?: "cache"): ReturnCache<undefined | Guild<"cached">>
Parameters
ParameterType
mode?"cache"
Returns

ReturnCache<undefined | Guild<"cached">>

Source

seyfert/src/commands/applications/chatcontext.ts:142


isChat()

1
isChat(): this is CommandContext<Object, never>

Returns

this is CommandContext<Object, never>

Inherited from

BaseContext.isChat

Source

seyfert/src/commands/applications/chatcontext.ts:181


isComponent()

1
isComponent(): this is ComponentContext<keyof ComponentCommandInteractionMap>

Returns

this is ComponentContext<keyof ComponentCommandInteractionMap>

Inherited from

BaseContext.isComponent

Source

seyfert/src/commands/basecontex.ts:30


isMenu()

1
isMenu(): this is MenuCommandContext<UserCommandInteraction<boolean> | MessageCommandInteraction<boolean>, never>

Returns

this is MenuCommandContext<UserCommandInteraction<boolean> | MessageCommandInteraction<boolean>, never>

Inherited from

BaseContext.isMenu

Source

seyfert/src/commands/basecontex.ts:18


isMenuMessage()

1
isMenuMessage(): this is MenuCommandContext<MessageCommandInteraction<boolean>, never>

Returns

this is MenuCommandContext<MessageCommandInteraction<boolean>, never>

Inherited from

BaseContext.isMenuMessage

Source

seyfert/src/commands/basecontex.ts:26


isMenuUser()

1
isMenuUser(): this is MenuCommandContext<UserCommandInteraction<boolean>, never>

Returns

this is MenuCommandContext<UserCommandInteraction<boolean>, never>

Inherited from

BaseContext.isMenuUser

Source

seyfert/src/commands/basecontex.ts:22


me()

me(mode)

1
me(mode?: "rest" | "flow"): Promise<GuildMember>
Parameters
ParameterType
mode?"rest" | "flow"
Returns

Promise<GuildMember>

Source

seyfert/src/commands/applications/chatcontext.ts:125

me(mode)

1
me(mode?: "cache"): ReturnCache<undefined | GuildMember>
Parameters
ParameterType
mode?"cache"
Returns

ReturnCache<undefined | GuildMember>

Source

seyfert/src/commands/applications/chatcontext.ts:126


write()

1
write<FR>(body: Omit<APIInteractionResponseCallbackData, "components" | "embeds" | "poll"> & SendResolverProps, fetchReply?: FR): Promise<When<FR, Message | WebhookMessage, void | Message | WebhookMessage>>

Type parameters

Type parameterValue
FR extends booleanfalse

Parameters

ParameterType
bodyOmit<APIInteractionResponseCallbackData, "components" | "embeds" | "poll"> & SendResolverProps
fetchReply?FR

Returns

Promise<When<FR, Message | WebhookMessage, void | Message | WebhookMessage>>

Source

seyfert/src/commands/applications/chatcontext.ts:61