Module

Module

Built-in module class

Constructor

(abstract) new Module()

Source:

Extends

Methods

deleteMessages(…messages) → {Promise}

Source:
Inherited From:

Deletes multiple messages if there are sufficient permissions

Parameters:
Name Type Attributes Description
messages external:"Eris.Message" <repeatable>

The messages to delete

Returns:
Type
Promise

edit(message, content, optionsopt) → {Promise}

Source:
Inherited From:

Edits a message with updated content

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

The message to edit

content String

The content to edit the message with

options Object <optional>

Options object

Properties
Name Type Attributes Description
lang String <optional>

Locale of content

delay Number <optional>

Delay to edit the message

Returns:
Type
Promise

hasPermissions(channel, user, …perms) → {Boolean}

Source:
Inherited From:

Checks if a user has certain permissions in a channel

Parameters:
Name Type Attributes Description
channel external:"Eris.GuildChannel"

The channel to check in

user external:"Eris.User"

The user to check

perms String <repeatable>

The permission(s) to check

Returns:
Type
Boolean

init()

Source:

Initialises the module

send(channel, content, optionsopt) → {Promise.<(external:"Eris.Message"|null)>}

Source:
Inherited From:

Sends a message to a channel

Parameters:
Name Type Attributes Description
channel external:"Eris.GuildChannel"

The channel to send the message in

content String

The string to send

options Object <optional>

Message options

Properties
Name Type Attributes Default Description
lang String <optional>

Message locale

delay Number <optional>
0

Delay to send the message, set to 0 for no delay

deleteDelay Number <optional>
0

Delay to delete the message after it's sent, set to 0 for no deletion

file Object <optional>

A file object

Properties
Name Type Attributes Description
name String <optional>

Name of file

file Buffer <optional>

Buffer containing file data

embed Object <optional>

Embed object, see official Discord API documentation

Returns:
Type
Promise.<(external:"Eris.Message"|null)>

t(content, langopt, tagsopt)

Source:
Inherited From:

Parses a string for localisation

Parameters:
Name Type Attributes Default Description
content String

The string to parse

lang String <optional>
'en'

The locale name

tags Object <optional>

Additional interpolation tags

unload()

Source:

Unloads the module