Skip to main content

Configuration

This bot is highly configurable, there are a ton of settings you can change to make the bot work exactly how you want it to. Below are all the settings you can change, and what they do.

Multiple Database Support

The bot supports multiple databases, this means you can select multiple stats from multiple database to display into one. This is useful if you want to display stats from multiple plugins into one leaderboard or stats page.

To make this work the bot uses bpPaths in the configuration file, this is basically a path to the database column so the bot knows where to get the data from. Below is an example of a bpPath:

Config option: lethalquests>lethalquests_stats>Name

This bpPath will get the Name column from the lethalquests_stats table in the lethalquests database.

danger

Please keep in mind that each step is separated by a > and that the first step is the database name, the second step is the table name and the third step is the column name.

Configuration File

The configurable is structured into sections so its easier to read, below is each section explained in detail.

General

The general section contains all the general settings for the bot, below is a list of all the settings and what they do.

SettingDescription
tokenThe bot token, this is used to login to discord. you can get this token in the discord developer portal
licenseKeyThe license key, this is used to verify your license. you can get this key from the license page
guildIdThe discord server id, this is used to get the guild the bot is in. you can get this id by enabling developer mode in discord

databases

The databases section contains all the databases the bot will use. In this section is a list of all the databases and their settings.

SettingDescription
hostThe database host. by default this is 'localhost'
userThe database user. by default this is 'root'
portThe database port. by default this is '3306'
passwordThe database password.
databaseThe database name.
tablesThe database tables that the bot uses

Here are the options for the tables setting:

SettingDescription
nameThe table name.
identifierColumnThe column that the bot need to determine the player, most of the time this is the steam id column in the table

Linking

The bot supports linking discord accounts to game accounts, this is useful if you want to display your stats based on your discord account. Below is a list of all the settings and what they do.

SettingDescription
hostThe database host. by default this is 'localhost'
userThe database user. by default this is 'root'
portThe database port. by default this is '3306'
passwordThe database password.
databaseThe database name.
linkingTableThe name of the table that contains the linking data
discordIdColumnThe name of the column that contains the discord id
identifierColumnThe name of the column that contains the identifier

Commands

The bot supports custom commands, this is useful if you want to add custom commands to the bot. Below is a list of all the settings and what they do.

Stats Command

SettingDescription
commandNameThe name of the command
shortenStatsWhen enabled this will shorten the stats. example: 1555000 -> 1.56m
localizeStatsWhen enabled this will localize the stats. example: 1555000 -> 1,555,000
ephemeralWhen enabled this will make the response only visible to the user
playerNameDbPathPath to the player name in the database (database>table>column)
tribeNameDbPathPath to the tribe name in the database (database>table>column)

Pages settings:

The stats command has pages, this allows you to display multiple stats on grouped pages. Below is a list of all the settings and what they do.

SettingDescription
titleThe title of the page
descriptionThe description of the page
footerThe footer of the page
colorThe color of the embed
thumbnailThe thumbnail of the embed
timestampWhen enabled this will add a timestamp to the embed

Stats settings:

Each stat is a field on the page that displays the stat. Below is a list of all the settings and what they do.

SettingDescription
dbPathPath to the stat in the database (database>table>column)
nameThe name of the stat, this will be the field name
valueThe value of the stat, this will be the field value
inlineWhen enabled this will make the field inline

Leaderboard Command

SettingDescription
commandNameThe name of the command
ephemeralWhen enabled this will make the response only visible to the user

Leaderboards

The bot supports leaderboards, this is useful if you want to display the top players based on a stat. Below is a list of all the settings and what they do.

SettingDescription
nameThe name of the leaderboard
identifierThe identifier of the leaderboard. (this must be unique)
enabledWhen enabled this will enable the leaderboard
channelIdThe channel id where the leaderboard will be displayed and updated
tribeStatsWhen enabled this leaderboard will display tribe stats

Formatting settings:

SettingDescription
userCountThe amount of users to display on the leaderboard.
fieldInlineWhen enabled this will make the fields inline.
shortenStatsWhen enabled this will shorten the stats. example: 1555000 -> 1.56m
localizeStatsWhen enabled this will localize the stats. example: 1555000 -> 1,555,000
displayTypeThe display type can be 'fields' or 'table'
dataFormatWhen display type is 'fields' this will format the data.
playerNameDbPathPath to the player name in the database (database>table>column)
tribeNameDbPathPath to the tribe name in the database (database>table>column)

Message settings:

SettingDescription
titleThe title of the message
descriptionThe description of the message
footerThe footer of the message
colorThe color of the embed
thumbnailThe thumbnail of the embed
timestampWhen enabled this will add a timestamp to the embed

Stats settings:

SettingDescription
dbPathPath to the stat in the database (database>table>column)
nameThe name of the stat, this will be the field name
valueThe value of the stat, this will be the field value