Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Implements

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>
  • Create a Thread, returns undefined if already in a Thread.

    Parameters

    • options: StartThreadOptions

      The options of the Thread.

    Returns undefined | Promise<ThreadChannel>

    • The resulting Thread.

deleteMessage

  • deleteMessage(timeout?: number): Promise<Message>
  • Deletes the message with an optional timeout.

    Parameters

    • timeout: number = 0

      The time to wait in milliseconds before deleting the message.

    Returns Promise<Message>

    • The deleted message.

react

  • react(...emoji: EmojiIdentifierResolvable[]): Promise<void>
  • Add one or multiple reactions to a message.

    remarks

    React in the order of emoji used.

    Parameters

    • Rest ...emoji: EmojiIdentifierResolvable[]

      The emoji to react with, can be custom or native.

    Returns 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>
  • Sends the help menu of the command from the default HelpCommand command (even if you are not using it).

    Parameters

    • commandName: string = ...

      The name of the command to send the help menu.

    Returns Promise<undefined | Message>

    • The message of the help menu of the command.

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.

handler

handler: typeof CommandHandler

The handler.

message

message: Message

The message that executed the command.

rawArgs

rawArgs: string[]

The arguments in the message.

Constructors

constructor

Generated using TypeDoc