Requires Node v14.
License: MIT
- Show rank stats embed for a player.
!rank
- Stats for player with the Discord user's username or nickname.!rank username
- Stats for playerusername
.!oldrank
- Old stats for player with the Discord user's username or nickname.!oldrank username
- Old stats for playerusername
.
- Posts leaderboard to a channel, editing existing messages.
- Create Discord bot and application using the Discord Developer Portal, as shown in this guide.
- Invite the Discord bot to the desired server, as shown in this guide.
- Install dependencies:
npm install
. - Run with environment variables:
RANKINGS_CHANNEL=id STATS=path/to/ctf_stats OLD_STATS=path/to/ctf_stats.old TOKEN=discord_token npm start
RANKINGS_CHANNEL
- Channel ID for the leaderboard.STATS
- Path to stats file, found inworld/ctf/mod_storage/ctf_stats
.OLD_STATS
- Path to old stats file (!oldrank)TOKEN
- Discord bot token, get from bot page in Discord Developer Portal.
You can grab messages sent with !st via Minetest. See https://github.com/MT-CTF/servermods/blob/master/server_chat/init.lua#L77 for an example