Discord bot for Fullmetal Minecrafters server
Go to file
Joseph Montanaro 372513cfdd
All checks were successful
continuous-integration/drone/push Build is passing
add build badge to readme
2020-12-30 08:53:01 -08:00
heavynode use remember_web cookie instead of pterodactyl_session 2020-10-29 23:10:58 -07:00
.drone.yml add build badge to readme 2020-12-30 08:53:01 -08:00
.gitignore initial commit 2020-05-08 21:39:28 -07:00
bot.py add back server id configuration, but better this time 2020-12-28 20:21:19 -08:00
Dockerfile add dockerfile 2020-12-24 21:23:24 -08:00
lib.py add back server id configuration, but better this time 2020-12-28 20:21:19 -08:00
README.md add build badge to readme 2020-12-30 08:53:01 -08:00

Minebot

Build Status

Discord bot for controlling a Heavynode minecraft server.

Currently implemented commands:

  • !add - adds a player to the whitelist
  • !remove - removes a player from the whitelist

Developing

This bot is built on discord.py, a Python library for Discord bots. Discord.py makes heavy use of asynchronous Python (via the asyncio module). It's worth a look if you've never experimented with that side of Python.

Running

To run the bot, first install its dependencies:

pip install discord.py 'python-socketio>=4.0,<5.0'

It also expects the following environment variables:

  • DISCORD_TOKEN: Discord API token
  • DISCORD_SERVER_ID (Optional, may be excluded if the bot is only joined to one server)
  • HEAVYNODE_TOKEN: Heavynode API token
  • HEAVYNODE_COOKIE_NAME: Name of Heavynode remember_web cookie
  • HEAVYNODE_COOKIE_VALUE: Value of Heavynode remember_web cookie

Any of these items may be read from a file instead of the environment, by appending _FILE to the environment variable and setting its value to the path of the file. E.g. export DISCORD_TOKEN_FILE=/path/to/token/file

You can then run the bot directly:

python bot.py