Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CommandUsage

Converts usage strings into objects to compare against later

Hierarchy

Index

Constructors

constructor

Properties

Readonly client

client: Client

The client this Usage was created with

since

0.0.1

commands

commands: string

The compiled string for all names/aliases in a usage string

since

0.0.1

customResolvers

customResolvers: Cache<string, CustomUsageArgument> = new Cache<string, CustomUsageArgument>()

Stores one-off custom resolvers for use with the custom type arg

since

0.5.0

deliminatedUsage

deliminatedUsage: string

The usage string re-deliminated with the usageDelim

since

0.0.1

names

names: string[]

All names and aliases for the command

since

0.0.1

nearlyFullUsage

nearlyFullUsage: string

The concatenated string of this.commands and this.deliminatedUsage

since

0.0.1

parsedUsage

parsedUsage: Tag[]

The usage object to compare against later

since

0.0.1

usageDelim

usageDelim: string

The usage delim

since

0.5.0

usageString

usageString: string

The usage string

since

0.0.1

Methods

createCustomResolver

createPrompt

customizeResponse

  • customizeResponse(name: string, response: string | TagResponse): this

fullUsage

  • fullUsage(message: Message): string
  • Creates a full usage string including prefix and commands/aliases for documentation/help purposes

    since

    0.0.1

    Parameters

    • message: Message

      The message context for which to generate usage for

    Returns string

toJSON

  • toJSON(): Tag[]

toString

  • toString(): string

Static tagClose

Generated using TypeDoc