Context
Since
1.0.0 Provides values shared between Message and ChatInputCommandInteraction
Extends
CoreContext
<Message
,ChatInputCommandInteraction
>
Accessors
channel
get
channel():null
|TextBasedChannel
Returns
null
| TextBasedChannel
Source
src/core/structures/context.ts:49
channelId
get
channelId():string
Returns
string
Source
src/core/structures/context.ts:53
client
get
client():Client
<boolean
>
Returns
Client
<boolean
>
Source
src/core/structures/context.ts:108
createdTimestamp
get
createdTimestamp():number
Returns
number
Source
src/core/structures/context.ts:73
guild
get
guild():null
|Guild
Returns
null
| Guild
Source
src/core/structures/context.ts:79
guildId
get
guildId():null
|string
Returns
null
| string
Source
src/core/structures/context.ts:85
id
get
id():string
Returns
string
Source
src/core/structures/context.ts:43
inGuild
get
inGuild():boolean
Returns
boolean
Source
src/core/structures/context.ts:114
interaction
get
interaction():ChatInputCommandInteraction
<CacheType
>
Returns
ChatInputCommandInteraction
<CacheType
>
Source
src/core/structures/context.ts:103
member
get
member():null
|GuildMember
|APIInteractionGuildMember
Returns
null
| GuildMember
| APIInteractionGuildMember
Source
src/core/structures/context.ts:93
message
get
message():Message
<boolean
>
Returns
Message
<boolean
>
Source
src/core/structures/context.ts:99
options
get
options():string
[] |Omit
<CommandInteractionOptionResolver
<CacheType
>,"getMessage"
|"getFocused"
>
Returns
string
[] | Omit
<CommandInteractionOptionResolver
<CacheType
>, "getMessage"
| "getFocused"
>
Source
src/core/structures/context.ts:26
prefix
get
prefix():undefined
|string
Returns
undefined
| string
Source
src/core/structures/context.ts:40
user
get
user():User
If context is holding a message, message.author else, interaction.user
Returns
User
Source
src/core/structures/context.ts:63
userId
get
userId():string
Returns
string
Source
src/core/structures/context.ts:69
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:11
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:15
reply()
reply(
content
):Promise
<Message
<boolean
>>
Parameters
• content: ReplyOptions
Returns
Promise
<Message
<boolean
>>
Source
src/core/structures/context.ts:120
wrap()
static
wrap(wrappable
,prefix
?):Context
Parameters
• wrappable: BaseInteraction
<CacheType
> | Message
<boolean
>
• prefix?: string