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:39
channelId
get
channelId():string
Returns
string
Source
src/core/structures/context.ts:45
client
get
client():Client
<boolean
>
Returns
Client
<boolean
>
Source
src/core/structures/context.ts:91
createdTimestamp
get
createdTimestamp():number
Returns
number
Source
src/core/structures/context.ts:65
guild
get
guild():null
|Guild
Returns
null
| Guild
Source
src/core/structures/context.ts:71
guildId
get
guildId():null
|string
Returns
null
| string
Source
src/core/structures/context.ts:77
id
get
id():string
Returns
string
Source
src/core/structures/context.ts:33
inGuild
get
inGuild():boolean
Returns
boolean
Source
src/core/structures/context.ts:97
interaction
get
interaction():I
Returns
I
Source
src/core/structures/core-context.ts:15
member
get
member():null
|GuildMember
|APIInteractionGuildMember
Returns
null
| GuildMember
| APIInteractionGuildMember
Source
src/core/structures/context.ts:85
message
get
message():M
Returns
M
Source
src/core/structures/core-context.ts:12
options
get
options():Omit
<CommandInteractionOptionResolver
<CacheType
>,"getMessage"
|"getFocused"
>
Returns
Omit
<CommandInteractionOptionResolver
<CacheType
>, "getMessage"
| "getFocused"
>
Source
src/core/structures/context.ts:26
user
get
user():User
If context is holding a message, message.author else, interaction.user
Returns
User
Source
src/core/structures/context.ts:55
userId
get
userId():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()
static
wrap(wrappable
):Context
Parameters
• wrappable: Message
<boolean
> | BaseInteraction
<CacheType
>
Returns
Overrides
CoreContext.wrap