Global

Members


<private, constant> self

Wrapper for logging functions that normally reference SubModule.error and similar.
Source:
To Do:
  • Obtain reference to SubModule to be able to remove this.

<nullable> sqlCon :sql.ConnectionConfig

The object describing the connection with the SQL server.
Type:
  • sql.ConnectionConfig
Source:

Methods


<private> __stack()

Gets the stack trace of the current function call.
Source:
Returns:
Error stack for logging.
Type
Stack

<private> unhandledRejection(args)

Handler for an unhandledRejection or uncaughtException, to prevent the bot from silently crashing without an error.
Parameters:
Name Type Argument Description
args * <repeatable>
All information to log.
Source:
Listens to Events:
  • Process#event:unhandledRejection
  • Process#event:uncaughtException

Type Definitions


commandHandler(msg)

The function to call when a command is triggered.
Parameters:
Name Type Description
msg Discord~Message The message sent in Discord.
Source:

HGStatGroupUserSelectOptions

Options for fetching a group of user stats.
Type:
  • object
Properties:
Name Type Argument Default Description
sort string <optional>
'wins' Column to sort data by.
ascending boolean <optional>
false Sort ascending or descending order.
limit number <optional>
10 Limit the number of fetched users.
offset number <optional>
0 Offset start index of found users.
Source:

HGStatMetadata

Metadata to store along with a HungryGames~StatGroup object. These values are user-defined and are not necessarily correct and are not trustworthy for any processing.
Type:
  • object
Properties:
Name Type Argument Description
name string <optional>
The user-defined name of this stats object.
startTime Date <optional>
The timestamp at which this stats object starts to include information.
endTime Date <optional>
The timestamp of the last time this object includes information for.
createDate Date The timestamp at which this stats object was created.
modifiedDate Date The timestamp at which this stats object was last modified.
Source:

LoginState

The current OAuth2 access information for a single session.
Properties:
Name Type Argument Description
access_token string The current token for api requests.
token_type string The type of token (Usually 'Bearer').
expires_in number Number of seconds after the token is authorized at which it becomes invalid.
refresh_token string Token used to refresh the expired access_token.
scope string The scopes that the access_token has access to.
expires_at number The unix timestamp when the access_token expires.
expiration_date number The unix timestamp when we consider the session to have expired, and the session is deleted.
session string The 64 byte base64 string that identifies this session to the client.
refreshTimeout Timeout <nullable>
The current timeout registered for refreshing the access_token.
Source: