Options
Modules
  • Command
  • Localization
  • Logger
All
  • Public
  • Public/Protected
  • All
Menu

Class MessageContext<T>

Context for a sent Message. This context will be given to rules to be used to determine if a command should be run

Type parameters

  • T: Client = Client

Hierarchy

  • MessageContext

Index

Constructors

Properties

Constructors

constructor

  • new MessageContext<T>(client: T, message: Message): MessageContext<T>

Properties

client

client: T

The Client instance your Command is registered with

content

content: string

The content of the message that will be parsed for the command and arguments. This can be modified by rules to affect what will be parsed (to strip a prefix, for example). Assuming a regex or function trigger does not trigger a command, the first string of characters terminated by any whitespace will be parsed as a command identifier, and the remaining (trimmed) content will be parsed as arguments

message

message: Message

The Discord.js Message that triggered the Command

prefixUsed

prefixUsed: boolean

Whether or not a prefix was used. Should be set by rules that check for prefixes (which should then strip the used prefix from content)

Generated using TypeDoc