İçeriğe geç
sern

Context

Since

1.0.0 Provides values shared between Message and ChatInputCommandInteraction

Accessors

channel

get channel(): null | TextBasedChannel

Returns

null | TextBasedChannel

Source

src/core/structures/context.ts:43


channelId

get channelId(): string

Returns

string

Source

src/core/structures/context.ts:47


client

get client(): Client<boolean>

Returns

Client<boolean>

Source

src/core/structures/context.ts:107


createdTimestamp

get createdTimestamp(): number

Returns

number

Source

src/core/structures/context.ts:67


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:75


id

get id(): string

Returns

string

Source

src/core/structures/context.ts:39


inGuild

get inGuild(): boolean

Returns

boolean

Source

src/core/structures/context.ts:111


interaction

get interaction(): ChatInputCommandInteraction<CacheType>

Returns

ChatInputCommandInteraction<CacheType>

Source

src/core/structures/context.ts:99


member

get member(): null | GuildMember | APIInteractionGuildMember

Returns

null | GuildMember | APIInteractionGuildMember

Source

src/core/structures/context.ts:81


message

get message(): Message<boolean>

Returns

Message<boolean>

Source

src/core/structures/context.ts:85


options

get options(): string[] | Omit<CommandInteractionOptionResolver<CacheType>, "getMessage" | "getFocused">

Returns

string[] | Omit<CommandInteractionOptionResolver<CacheType>, "getMessage" | "getFocused">

Source

src/core/structures/context.ts:25


prefix

get prefix(): undefined | string

Returns

undefined | string

Source

src/core/structures/context.ts:36


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:63

Methods

isMessage()

isMessage(): this is Context & Object

Returns

this is Context & Object

Source

src/core/structures/context.ts:91


isSlash()

isSlash(): this is Context & Object

Returns

this is Context & Object

Source

src/core/structures/context.ts:95


reply()

reply(content): Promise<Message<boolean>>

Parameters

content: ReplyOptions

Returns

Promise<Message<boolean>>

Source

src/core/structures/context.ts:115


wrap()

static wrap(wrappable, prefix?): Context

Parameters

wrappable: BaseInteraction<CacheType> | Message<boolean>

prefix?: string

Returns

Context

Source

src/core/structures/context.ts:124