Esdi

Esdi

ES6 Discord bot framework

Constructor

new Esdi(configopt)

Source:
Tutorials:

Initializes a new Esdi server

Parameters:
Name Type Attributes Description
config Object <optional>

configuration object

Properties
Name Type Attributes Default Description
loopInterval Number <optional>
15

loop interval (in seconds)

loadDefaultFiles Boolean <optional>
true

whether to load default files

dbAddress String <optional>
'local'

address of remote database, or local for local database

dbPort String <optional>
5984

port of remote database

dbNamespace String <optional>
'esdi_'

namespace prefix for database names

discordToken String <optional>
process.env.DISCORD_TOKEN

token for Discord bot

botPrefix String <optional>
'esdi!'

prefix for Commands

hookServerPort Number <optional>
8587

port for Hook server

hookServerHost String <optional>
'localhost'

hostname for Hook server

hookServerTls Object | Boolean <optional>
false

false for HTTP, or object with paths to key and cert files for TLS

botOwner String <optional>
'139293101767262208'

Discord ID of bot instance owner

Extends

  • EventEmitter

Methods

determineMemory() → {String}

Source:

Returns formatted memory usage of process

Returns:

formatted memory usage (in megabytes)

Type
String

determineProcessor() → {String}

Source:

Returns formatted processor usage of process

Returns:

formatted processor use percentage

Type
String

determineUptime() → {String}

Source:

Returns formatted uptime of process

Returns:

formatted timestamp

Type
String

load(diropt, typeopt)

Source:

Loads framework files into the Esdi server

Parameters:
Name Type Attributes Default Description
dir String <optional>
__dirname

directory from which to load files

type String <optional>
null

framework file type to load, or null for all types

start()

Source:

Wrapper method that starts the Esdi server

Fires:

stop()

Source:

Wrapper method that stops the Esdi server

Fires:

Events

loop

Source:

Called every Esdi server loop

Listeners of This Event:

start

Source:

Starts the Esdi server

Listeners of This Event:

stop

Source:

Stops the Esdi server

Listeners of This Event: