Global

Members

(constant) Discord

Discord Mod. An extension of the discord.js module to streamline usage of this bot.

Source:

Type Definitions

ConfiguredOption

An option that has been configured by the game leader and has a set value.

Source:
Type:
  • String | Number | Array.<(String|Number)>

GameMetadata

The metadata for a given game.

Properties:
Properties
Name Type Description
id String

The game's unique identifier.

name String

The name of the game.

about String

A short description about the game.

rules String

This game's rules and instructions.

unlockables Boolean

Whether or not the game has unlockables in the shop.

playerCount Object

The number of players that can join this game.

Name Type Description
min number

The minimum required number of players.

max number

The maximum required number of players.

Source:
Type:
  • Object

GameOption

A user-configurable option for a game, modified during a game's init stage.

Properties:
Name Type Attributes Description
friendlyName String

The user-friendly name of this option.

type String

The type of option. Must be one of:

  • checkboxes
  • radio
  • free
  • number
default String | Number | Array.<(String|Number)>

The default value for this option.

choices Array.<String> <optional>

An array of choices the user can pick from. Required for checkboxes and radio types.

note String <optional>

A note displayed during the selection screen

filter function <optional>

A filter function that validates the user's input message, and only accepts the input if the function returns true.

Source:
See:
Type:
  • Object

GameSettings

An object with configurable game settings. This field is currently unused.

Source:
Type:
  • Object

handlePlayerWebResponse(data, UI, client)

Callback to handle the data received from the Web UI

Source:
Parameters:
Name Type Description
data PlayerWebResponse

User input received from the web UI

UI Object

The web UI object itself

client Discord.Client

The discord client that initiated this request

PlayerWebResponse

Properties:
Name Type Description
result *

The user's result

Source:
Type:
  • Object

UserData

Properties:
Name Type Description
userID String

The user's ID

unlockedItems Array.<String>

The list of unlocked items, categorized by ID

Source:
Type:
  • Object

WebUIOptions

The options for this WebUI.

Properties:
Name Type Description
type String

The type of WebUI to generate.

message String

The custom message the user sees on the WebUI.

variables Array.<Array.<String>> | Array.<Array.<RegExp>>

Array of [tag, replacement] pairs to customize webpage content. Accepts RegExp.

duration Number

How long to keep the webpage alive, in seconds

Source:
Type:
  • Object