4.7 KiB
id, title, sidebar_label, sidebar_position, custom_edit_url
| id | title | sidebar_label | sidebar_position | custom_edit_url |
|---|---|---|---|---|
| Context | Class: Context | Context | 0 | null |
Provides values shared between Message and ChatInputCommandInteraction
Constructors
constructor
• Private new Context(oMsg?, oInterac?)
Parameters
| Name | Type | Default value |
|---|---|---|
oMsg |
Option<Message<boolean>> |
None |
oInterac |
Option<ChatInputCommandInteraction<CacheType>> |
None |
Defined in
src/handler/structures/context.ts:31
Accessors
channel
• get channel(): Nullish<TextBasedChannel>
Returns
Nullish<TextBasedChannel>
Defined in
src/handler/structures/context.ts:63
client
• get client(): Client<boolean>
Returns
Client<boolean>
Defined in
src/handler/structures/context.ts:108
createdTimestamp
• get createdTimestamp(): number
Returns
number
Defined in
src/handler/structures/context.ts:77
guild
• get guild(): Guild
Returns
Guild
Defined in
src/handler/structures/context.ts:84
guildId
• get guildId(): string
Returns
string
Defined in
src/handler/structures/context.ts:91
id
• get id(): string
Returns
string
Defined in
src/handler/structures/context.ts:56
inGuild
• get inGuild(): boolean
Returns
boolean
Defined in
src/handler/structures/context.ts:115
interaction
• get interaction(): ChatInputCommandInteraction<CacheType>
Getting the ChatInputCommandInteraction object. Crashes if module type is CommandType.Text or the event fired in a Both command was Message
Returns
ChatInputCommandInteraction<CacheType>
Defined in
src/handler/structures/context.ts:52
member
• get member(): Nullish<GuildMember | APIGuildMember>
Returns
Nullish<GuildMember | APIGuildMember>
Defined in
src/handler/structures/context.ts:101
message
• get message(): Message<boolean>
Getting the Message object. Crashes if module type is CommandType.Slash or the event fired in a Both command was ChatInputCommandInteraction
Returns
Message<boolean>
Defined in
src/handler/structures/context.ts:44
user
• get user(): User
Returns
User
Defined in
src/handler/structures/context.ts:70
Methods
isEmpty
▸ isEmpty(): boolean
Returns
boolean
Defined in
src/handler/structures/context.ts:129
reply
▸ reply(content): Promise<Message<boolean>>
Parameters
| Name | Type |
|---|---|
content |
string | Omit<InteractionReplyOptions, "fetchReply"> | ReplyMessageOptions |
Returns
Promise<Message<boolean>>
Defined in
src/handler/structures/context.ts:133
wrap
▸ Static wrap(wrappable): Context
Parameters
| Name | Type |
|---|---|
wrappable |
Message<boolean> | ChatInputCommandInteraction<CacheType> |