This is a Discord bot that can get stats of players on a Minecraft server. The bot has several commands to retrieve stats for different categories such as time played, distance traveled, and items crafted.
This project is under a complete rework, the code is being rewritten to be more efficient and more readable. The new version will be available soon.
To use this bot, you'll need to do the following:
- Install Python 3.6 or above
- Clone the repo
git clone https://github.com/sailingteam4/MinecraftStats-to-DiscordBot
- Install the required dependencies you can do that with
pip install -r requirements.txt
- Set up a Discord bot and obtain its token
- Set up a
.env
file with the following environment variables:DISCORD_TOKEN
- the bot tokenHOST
- the Minecraft server hostUSER
- the SFTP user for the Minecraft serverPASS
- the SFTP password for the Minecraft serverPORT
- the SFTP port for the Minecraft server
- Run the
discordstats.py
file
The following commands are available:
/time <pseudo>
- get the time played by a player/jump <pseudo>
- get the number of jumps made by a player/bell <pseudo>
- get the number of bells rung by a player/mined <pseudo>
- get the number of blocks mined by a player/dead <pseudo>
- get the number of deaths of a player/distance <pseudo>
- get the distance traveled by a player in kilometers/broke <pseudo>
- get the number of tools broken by a player/killed <pseudo>
- get the number of monsters killed by a player/crafted <pseudo>
- get the number of items crafted by a player
Replace <pseudo>
with the Minecraft username of the player you want to retrieve the stats for.
-
/card <pseudo>
- get a card of all the statistics of a player -
/timeld
- display the players time leaderboard -
/jumpld
- display the players jump leaderboard -
It's the same for the other commands
bellld
,brokenld
,distanceld
,minedld
,deadld
,killedld
andcraftedld
If you have any ideas, feel free to suggest modifications