Abstract Class: BaseCommandContext<Cached, InGuild>
Defined in: packages/bakit/src/command/CommandContext.ts:16
Extends
Extended by
Type Parameters
Cached
Cached extends boolean
InGuild
InGuild extends boolean
Constructors
Constructor
new BaseCommandContext<
Cached,InGuild>(source):BaseCommandContext<Cached,InGuild>
Defined in: packages/bakit/src/command/CommandContext.ts:17
Parameters
source
ChatInputCommandInteraction<Cached extends true ? "cached" : CacheType> | Message<InGuild>
Returns
BaseCommandContext<Cached, InGuild>
Overrides
Properties
canceled
canceled:
boolean=false
Defined in: packages/bakit/src/base/lifecycle/Context.ts:2
Inherited from
source
source:
ChatInputCommandInteraction<Cachedextendstrue?"cached":CacheType> |Message<InGuild>
Defined in: packages/bakit/src/command/CommandContext.ts:18
Accessors
channel
Get Signature
get channel():
CacheTypeReducer<Cachedextendstrue?"cached":CacheType,null|GuildTextBasedChannel,null|GuildTextBasedChannel,null|GuildTextBasedChannel,null|TextBasedChannel> |If<InGuild,GuildTextBasedChannel,TextBasedChannel>
Defined in: packages/bakit/src/command/CommandContext.ts:27
Returns
CacheTypeReducer<Cached extends true ? "cached" : CacheType, null | GuildTextBasedChannel, null | GuildTextBasedChannel, null | GuildTextBasedChannel, null | TextBasedChannel> | If<InGuild, GuildTextBasedChannel, TextBasedChannel>
channelId
Get Signature
get channelId():
string
Defined in: packages/bakit/src/command/CommandContext.ts:31
Returns
string
client
Get Signature
get client():
BakitClient<true>
Defined in: packages/bakit/src/command/CommandContext.ts:23
Returns
BakitClient<true>
guild
Get Signature
get guild():
CacheTypeReducer<Cachedextendstrue?"cached":CacheType,Guild,null,null|Guild,null|Guild> |If<InGuild,Guild,null>
Defined in: packages/bakit/src/command/CommandContext.ts:35
Returns
CacheTypeReducer<Cached extends true ? "cached" : CacheType, Guild, null, null | Guild, null | Guild> | If<InGuild, Guild, null>
guildId
Get Signature
get guildId():
CacheTypeReducer<Cachedextendstrue?"cached":CacheType,string,string,string,null|string> |If<InGuild,string,null>
Defined in: packages/bakit/src/command/CommandContext.ts:39
Returns
CacheTypeReducer<Cached extends true ? "cached" : CacheType, string, string, string, null | string> | If<InGuild, string, null>
member
Get Signature
get member():
null|GuildMember|CacheTypeReducer<Cachedextendstrue?"cached":CacheType,GuildMember,APIInteractionGuildMember,GuildMember|APIInteractionGuildMember,null|GuildMember|APIInteractionGuildMember>
Defined in: packages/bakit/src/command/CommandContext.ts:43
Returns
null | GuildMember | CacheTypeReducer<Cached extends true ? "cached" : CacheType, GuildMember, APIInteractionGuildMember, GuildMember | APIInteractionGuildMember, null | GuildMember | APIInteractionGuildMember>
user
Get Signature
get user():
User
Defined in: packages/bakit/src/command/CommandContext.ts:61
Returns
User
Methods
cancel()
cancel():
void
Defined in: packages/bakit/src/base/lifecycle/Context.ts:4
Returns
void
Inherited from
inCachedGuild()
inCachedGuild():
this is CommandContext<true, true>
Defined in: packages/bakit/src/command/CommandContext.ts:51
Returns
this is CommandContext<true, true>
inGuild()
inGuild():
this is CommandContext<Cached, true>
Defined in: packages/bakit/src/command/CommandContext.ts:47
Returns
this is CommandContext<Cached, true>
isChatInput()
isChatInput():
this is ChatInputContext<boolean, boolean>
Defined in: packages/bakit/src/command/CommandContext.ts:71
Returns
this is ChatInputContext<boolean, boolean>
isMessage()
isMessage():
this is MessageContext<boolean, boolean>
Defined in: packages/bakit/src/command/CommandContext.ts:75
Returns
this is MessageContext<boolean, boolean>
send()
abstractsend(options):Promise<Message<InGuild>>
Defined in: packages/bakit/src/command/CommandContext.ts:79
Parameters
options
Returns
Promise<Message<InGuild>>