https://github.com/tteeoo/msb
A Minecraft Server Bot (for Discord)
https://github.com/tteeoo/msb
bot discord discord-bot discord-py minecraft python
Last synced: 3 months ago
JSON representation
A Minecraft Server Bot (for Discord)
- Host: GitHub
- URL: https://github.com/tteeoo/msb
- Owner: tteeoo
- License: mit
- Created: 2021-03-12T22:16:35.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2022-01-21T04:26:44.000Z (over 4 years ago)
- Last Synced: 2025-02-24T21:11:50.681Z (over 1 year ago)
- Topics: bot, discord, discord-bot, discord-py, minecraft, python
- Language: Python
- Homepage:
- Size: 18.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# A Minecraft Server Bot (for Discord)
This is a Discord bot designed to provide information about a Minecraft server in Discord.
It can ping a Minecraft server at intervals and note its uptime in a specified channel.
## Commands
* `!up` — Checks if the Minecraft server is up.
* `!on` — Prints how many players are on, and a sample of usernames (may not be all online players).
* `!ping` — Pings the bot (not the Minecraft server).
* `!server` — Prints information about the server being monitored.
* `!mods` — Prints information about the mods on the server.
The prefix (default is exclamation point) can be changed.
## Running
This bot runs with Python versions >= 3.8.
Clone this repository and install the requirements:
```sh
$ git clone https://github.com/tteeoo/msb
$ cd msb/
$ python3 -m pip install -r requirements.txt
```
Create `.env`:
```sh
export MSB_TOKEN="" # From Discord developer pannel
export MSB_HOST="" # IP address or domain name of MC server
export MSB_PORT=25565
export MSB_PREFIX="!"
export MSB_INTERVAL=30 # Interval (seconds) for uptime check
export MSB_CHANNEL="" # Channel for uptime announcment (leave blank for none)
```
Start the bot with:
```sh
$ ./start.sh
```