DataClient

DataClient

new DataClient(token, optionsopt)

Class representing a DataClient.

Parameters:
Name Type Attributes Description
token String

The Discord bot token.

options DataClientOptions <optional>

The DataClient options.

Extends

  • Client

Members

commands :ExtendedMap.<string, Command.<this>>

Type:
  • ExtendedMap.<string, Command.<this>>

dbm :DatabaseManager

ora :Orator

Type:

permissions :ExtendedMap.<string, Permission>

Type:

sm :StatusManager

Methods

addCommands(…commands) → {DataClient}

Add commands to store.

Parameters:
Name Type Attributes Description
commands string | Command.<this> | Array.<(string|Command.<this>)> <repeatable>

Commands to add to store.

Returns:

Current state of DataClient.

Type
DataClient

addEvents(…events) → {DataClient}

Add events to store.

Parameters:
Name Type Attributes Description
events string | DiscordEvent | Array.<(string|DiscordEvent)> <repeatable>

Events to add to store.

Returns:

Current state of DataClient.

Type
DataClient

addPermissions(…permissions) → {DataClient}

Add permissions to store.

Parameters:
Name Type Attributes Description
permissions string | Permission | Array.<(string|Permission)> <repeatable>

Permissions to add to store.

Returns:

Current state of DataClient.

Type
DataClient

addSettingCommands(…commands) → {DataClient}

Add settings commands to store.

Parameters:
Name Type Attributes Description
commands string | Command.<this> | Array.<(string|Command.<this>)> <repeatable>

Commands to add to store.

Returns:

Current state of DataClient.

Type
DataClient

(async) connect() → {Promise.<void>}

Connect to discord.

Returns:
Type
Promise.<void>

findCommand(name, commands) → {Command.<this>|void}

Find a command from commands.

Parameters:
Name Type Description
name string

Name of command to search.

commands ExtendedMap.<string, Command.<this>>

A collection of commands to search instead of the build in commands.

Returns:
Type
Command.<this> | void