Class

Console

Console(args)

The console class represents a Discord UI console. A console is an embed with options users can interact with by reacting with emojis.
Constructor

# new Console(args)

Parameters:
Name Type Description
args ConsoleInfo

View Source classes/consoles/console.js, line 22

Members

TextChannel | DMChannel

# channel

The channel this console lives in.

View Source classes/consoles/console.js, line 85

ReactionCollector

# collector

View Source classes/consoles/console.js, line 79

ReactionCollectorOptions

# collectorOptions

The collector options.

View Source classes/consoles/console.js, line 61

String

# color

- hex color

View Source classes/consoles/console.js, line 55

String

# description

View Source classes/consoles/console.js, line 38

Collection.<String, Feature>

# features

-

View Source classes/consoles/console.js, line 43

Collection.<String, String>

# fields

The fields this console has, not including feature fields.

View Source classes/consoles/console.js, line 50

Collection.<String, User>

# interacting

Users the console is interacting with;

View Source classes/consoles/console.js, line 74

Message

# message

The message holding the console.

View Source classes/consoles/console.js, line 68

Methods

# async static fromJSON(json, guild) → {Console}

Creates a Console from JSON data.
Parameters:
Name Type Description
json JSON the json data
guild Guild the guild where this console lives

View Source classes/consoles/console.js, line 259

Console

# async addFeature(feature)

Adds a feature to this console.
Parameters:
Name Type Description
feature Feature the feature to add

View Source classes/consoles/console.js, line 153

# async addField(name, value, inlineopt)

Adds a field to this console without adding a feature.
Parameters:
Name Type Attributes Description
name String the new field name
value String the description on this field
inline Boolean <optional>

View Source classes/consoles/console.js, line 197

# async changeColor(color)

Changes the console's color.
Parameters:
Name Type Description
color String the new color in hex

View Source classes/consoles/console.js, line 207

# createReactionCollector(message)

Creates the reaction collector in the message.
Parameters:
Name Type Description
message Message

View Source classes/consoles/console.js, line 122

# delete()

Deletes this console from discord.

View Source classes/consoles/console.js, line 221

# removeFeature(identifier)

Removes a feature from this console. TODO remove from embed too!
Parameters:
Name Type Description
identifier String | Feature feature name, feature emojiName or feature

View Source classes/consoles/console.js, line 176

# async sendConsole(messageTextopt)

Sends the console to a channel
Parameters:
Name Type Attributes Description
messageText String <optional>
text to add to the message used to send the embed

View Source classes/consoles/console.js, line 96

# stopConsole()

Stop the console from interacting with any users.

View Source classes/consoles/console.js, line 214

# toJSON() → {JSON}

Creates a JSON representation of this object

View Source classes/consoles/console.js, line 239

representation of this object as JSON
JSON