Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Accessors

args

  • get args(): string[]

argsString

  • get argsString(): string

arguments

channel

  • get channel(): TextBasedChannels

client

commandName

  • get commandName(): string

content

  • get content(): string

guild

  • get guild(): null | Guild

isCallingASubCommand

  • get isCallingASubCommand(): boolean

member

  • get member(): null | GuildMember

prefix

  • get prefix(): string

textChannel

  • get textChannel(): undefined | TextChannel | NewsChannel

thread

  • get thread(): undefined | ThreadChannel

user

  • get user(): User

Methods

argument

  • argument<T>(name: string): Promise<null | T>
  • Returns an argument. If the argument is errored or not found it will return null.

    Type parameters

    • T

      The type of the argument.

    Parameters

    • name: string

      The name of the argument.

    Returns Promise<null | T>

    • The argument in a promise or null if the argument is not found or errored or the command has no arguments.

bulkDeleteInChannel

  • bulkDeleteInChannel(number: number, filterOld?: boolean): Promise<Collection<string, Message>>
  • bulkDeleteInChannel(number: Collection<string, Message>, filterOld?: boolean): Promise<Collection<string, Message>>
  • bulkDeleteInChannel(number: readonly MessageResolvable[], filterOld?: boolean): Promise<Collection<string, Message>>

createThread

  • createThread(options: StartThreadOptions): undefined | Promise<ThreadChannel>

deleteMessage

  • deleteMessage(timeout?: number): Promise<Message>

react

  • react(...emoji: EmojiIdentifierResolvable[]): Promise<void>

removeAllReactions

  • removeAllReactions(): Promise<void>

removeReaction

  • removeReaction(...emojis: EmojiIdentifierResolvable[]): Promise<void>

removeSelfReaction

  • removeSelfReaction(...emojis: EmojiIdentifierResolvable[]): Promise<void>

reply

  • reply(options: ReplyOptions): Promise<Message>
  • reply(content: string): Promise<Message>
  • reply(content: string, options: ReplyOptions): Promise<Message>

resolveArgument

resolveArguments

  • resolveArguments<A>(): Promise<undefined | Map<string, ArgumentResolved<A[number]>>>

send

  • send(options: SendOptions): Promise<Message>
  • send(content: string): Promise<Message>
  • send(content: string, options: SendOptions): Promise<Message>

sendGlobalHelpMessage

  • sendGlobalHelpMessage(): Promise<Message>

sendHelpMessage

  • sendHelpMessage(commandName?: string): Promise<undefined | Message>

Properties

Optional argumentParser

argumentParser: ArgumentParser

The argument parser of this context, if the command has no arguments it will be undefined.

command

command: Command

The command itself.

currentArgument

currentArgument: CommandArgument<any>

The current argument.

handler

handler: typeof CommandHandler

The handler.

index

index: number

The index of the current argument in the arguments of the command.

message

message: Message

The message that executed the command.

rawArgs

rawArgs: string[]

The arguments in the message.

Constructors

constructor

Generated using TypeDoc