This Discord bot provides users with detailed information about a Minecraft server. By using a simple slash command, users can fetch live data such as the server's status, version, number of players, and more.
- Server Status: Get live information about a Minecraft server.
- Server Information: Displays details like IP address, version, core, and players.
- Offline Handling: If the server is offline, the bot will notify the user that the server is unavailable.
- Programming Language: Python
- Required Libraries: disnake (for interacting with Discord's API), requests (for fetching Minecraft server data) Install the required libraries using pip:
pip3 install disnake requests
- Create a bot on Discord:
- Go to the Discord Developer Portal.
- Create a new application, then a bot, and obtain the bot token.
- Replace the placeholder
INSERT-TOKEN
in the code with your bot token.
- Install Dependencies:
- On your machine, make sure Python 3.8+ is installed. You can check this by running:
python --version
- Install pip if it’s not installed:
sudo apt install python3-pip
- Install the required libraries with pip:
pip3 install disnake requests
- You can run the bot using the following command:
python3 app.py
Make sure you are in the same directory where the app.py file is located or provide the full path to it.
- Deploy: Clone the repository and configure your bot.
- Run: Launch the bot on your server.
- Interaction: Use the slash command
/info <server-ip>
to get detailed information about a Minecraft server.