Resolver

Resolver

Resolver manager for resolving usages

Constructor

new Resolver(client)

Source:

Creates a new Resolver instance

Parameters:
Name Type Description
client Client

Client instance

Methods

getUsage(usageopt, data) → {String}

Source:

Gets a command usage

Parameters:
Name Type Attributes Default Description
usage Array.<CommandUsage> <optional>
this.usage

Array of CommandUsage objects

data Object

Additional data

Properties
Name Type Description
prefix String

The client's prefix

command String

The command trigger

Returns:
Type
String

load(usage)

Source:

Loads a command usage locally

Parameters:
Name Type Description
usage CommandUsage

CommandUsage object to be loaded

loadResolvers(path) → {Promise.<ResolverObject>}

Source:

Loads ResolverObjects from a file path

Parameters:
Name Type Description
path String

File path to load resolvers from

Returns:
Type
Promise.<ResolverObject>

resolve(message, args, data, usageopt) → {Promise.<Object>}

Source:

Resolves a message

Parameters:
Name Type Attributes Default Description
message external:"Eris.Message"

Eris message

args Array.<String>

Array of strings, by default a message split by spaces, without command trigger and prefix

data Object

Additional data

Properties
Name Type Description
prefix String

The client's prefix

command String

The command trigger

usage Array.<CommandUsage> <optional>
this.usage

Array of CommandUsage objects

Returns:
Type
Promise.<Object>

verify(usage)

Source:

Verifies a CommandUsage

Parameters:
Name Type Description
usage CommandUsage

CommandUsage object to be verified

Returns:

CommandUsage