Context
Since
1.0.0 Provides values shared between Message and ChatInputCommandInteraction
Extends
CoreContext<Message,ChatInputCommandInteraction>
Accessors
channel
getchannel():null|TextBasedChannel
Returns
null | TextBasedChannel
Source
src/core/structures/context.ts:39
channelId
getchannelId():string
Returns
string
Source
src/core/structures/context.ts:45
client
getclient():Client<boolean>
Returns
Client<boolean>
Source
src/core/structures/context.ts:91
createdTimestamp
getcreatedTimestamp():number
Returns
number
Source
src/core/structures/context.ts:65
guild
getguild():null|Guild
Returns
null | Guild
Source
src/core/structures/context.ts:71
guildId
getguildId():null|string
Returns
null | string
Source
src/core/structures/context.ts:77
id
getid():string
Returns
string
Source
src/core/structures/context.ts:33
inGuild
getinGuild():boolean
Returns
boolean
Source
src/core/structures/context.ts:97
interaction
getinteraction():I
Returns
I
Source
src/core/structures/core-context.ts:15
member
getmember():null|GuildMember|APIInteractionGuildMember
Returns
null | GuildMember | APIInteractionGuildMember
Source
src/core/structures/context.ts:85
message
getmessage():M
Returns
M
Source
src/core/structures/core-context.ts:12
options
getoptions():Omit<CommandInteractionOptionResolver<CacheType>,"getMessage"|"getFocused">
Returns
Omit<CommandInteractionOptionResolver<CacheType>, "getMessage" | "getFocused">
Source
src/core/structures/context.ts:26
user
getuser():User
If context is holding a message, message.author else, interaction.user
Returns
User
Source
src/core/structures/context.ts:55
userId
getuserId():string
Returns
string
Source
src/core/structures/context.ts:61
Methods
isMessage()
isMessage():
this is CoreContext<Message<boolean>, never>
Returns
this is CoreContext<Message<boolean>, never>
Inherited from
CoreContext.isMessage
Source
src/core/structures/core-context.ts:19
isSlash()
isSlash():
this is CoreContext<never, ChatInputCommandInteraction<CacheType>>
Returns
this is CoreContext<never, ChatInputCommandInteraction<CacheType>>
Inherited from
CoreContext.isSlash
Source
src/core/structures/core-context.ts:23
reply()
reply(
content):Promise<Message<boolean>>
Parameters
• content: ReplyOptions
Returns
Promise<Message<boolean>>
Source
src/core/structures/context.ts:103
wrap()
staticwrap(wrappable):Context
Parameters
• wrappable: Message<boolean> | BaseInteraction<CacheType>
Returns
Overrides
CoreContext.wrap