Minecraft Status Bot for Discord written in Python
- Clone the repository:
git clone https://github.com/Spectroxx/mcstatus.git
- Change Directory
cd mcstatus/
- Install the required dependencies using pip:
pip3 install -r requirements.txt
- Edit the
config.json
file with the following structure:
{
"token": "YOUR_DISCORD_BOT_TOKEN",
"server_ip": "YOUR_MINECRAFT_SERVER_IP",
"server_name": "YOUR_SERVER_NAME",
"channel_id": YOUR_DISCORD_CHANNEL_ID
}
To start the bot, run the following command:
python3 mcstatus.py
- Fetches the Minecraft server status using the mcsrvstat.us API.
- Displays the server's online/offline status and player count in a Discord embedded message.
- Retrieves the list of online players and displays their names.