On the application's page, go to the Bot tab, click Add Bot, and confirm.
Enable the SERVER MEMBERS INTENT option under Privileged Gateway Intents on the bot tab as well.
Click copy button under Token on the bot tab.
Stop your server, and install the plugin then open configuration file.
Paste the bot token you copied earlier into the bot-token value.
Click here and paste your bot's Client ID value to the page.
Done! you're now created & invited a new bot and installed the plugin. You can configurie all settings in configuration file.
Usage
Download your papi expansion if you need it. -> /papi ecloud download <expansion> **If you are not familiar with the PlaceholderAPI, you should read this topic** https://spigotmc.org/wiki/placeholderapi-tutorial
Create new stats -> /dcstats create <name> <placeholder>
Check it on your Discord server -> .stats <player>
MYSQL support Thanks to MySQL support, you may want to show the data of more than one server in the same embed message, or you can use it for another purpose.
If you want to show multiple server data in one embed message Connect all servers to the same database
If you don't want to show multiple server data in one embed message Create a new database for each server on MySQL like: 'discordstats_server1, discordstats_server2'
DiscordSRV support
If user's account is linked
If the tagged user's account is linked
Unlinked account
Without DiscordSRV support
Per-stats commands
**DiscordSRV support**
Config
Code (YAML):
# TOKEN bot-token: Your token here.
# Database settings, if set to false, SQLite is used
# 1- If you want to show multiple server data in one embed message # Connect all servers to the same database
# 2- If you don't want to show multiple server data in one embed message # Create a new database for each server on MySQL like: 'discordstats_server1, discordstats_server2' # Otherwise, data may conflict mysql:
enabled: false
host: localhost
port: 3306
database: discordstats_server1
username: root
password: 1234
use-ssl: false
# The character used to separate the stats name and the stats placeholder # You may need to use it when necessary # DO NOT change unless necessary stats-separator: '
%'
# Stats added to this list are ignored. (The data are not saved) stats-filter-list: - 'Example_Stats_Name'
# DO NOT change unless necessary avatar-api: 'https://minotar.net/avatar/
{player
}'
# What should display when there is no player data available no-data-available: '
----'
# The online status content of the embed message online-status: # If player is online, the text to write in the embed message online: Online
online-image: 'https://eylexlive.github.io/green.png'
# If player is offline, the text to write in the embed message offline: Offline
offline-image: 'https://eylexlive.github.io/red.png'
# Per-stats commands # If you enable this option, # A command is defined for each statistic you add per-stats-commands:
enabled: false
command-format: '.s-
{stats_name
}'
embed:
description: '
{stats_name
} stats for player `
{player
}`'
author: '
{online_status
}'
# It can be editable from above color: gray
fields: - '**
{stats_name
}**
%VALUE {stats_value}'
# Stats command's embed stats-embed:
description: 'Stats for player `
{player
}`'
author: '
{online_status
}'
# It can be editable from above color: gray
field-format: '**
{stats_name
}**
%VALUE {stats_value}' custom-fields: # Field limit: 25 enabled: false
fields: - '**Name**
%VALUE {player_name}' # {stats_Kills_value} = The value of the statistic named Kills. - '**Kills**
%VALUE {stats_Kills_value}' # {stats_Deaths_value} = The value of the statistic named Deaths. - '**Deaths**
%VALUE {stats_Deaths_value}'
# {nl} = new line discord-messages:
correct-usage: '> Correct usage
: `
{command
} <player>`'
# For DiscordSRV support account-unlinked: '>
No account linked to your Discord account.
{nl
} > Correct usage: `
{command
} <player | @mention>`'
account-unlinked-target: '>
{target
}, does not have an account linked to a Discord account.'