/Discord-Minecraft-whitelist-bot

A discord bot used to whitelist users on any minecraft server that has rcon

Primary LanguagePythonMIT LicenseMIT

DISCORD-MINECRAFT-WHITELIST-BOT

DISCORD-MINECRAFT-WHITELIST-BOT is discord bot that will allow discord users to whitelist themselves.

Installation and Dependency's

Clone the repository

git clone https://github.com/ryanhubler/Discord-Minecraft-whitelist-bot.git

Install dependency's

pip3 install mcrcon

Seting up rcon on your minecraft server

  1. In your mincecraft servers files a file called server.properties in this file there are two line you will need to change.
rcon.password= <PUT A STRONG PASSWORD HERE YOU WILL NEED IT LATER>
enable-rcon=true

Usage

  1. To use the bot in discord you must create a bot in the discord developer portal and add its token to this line in main.py
TOKEN = 'YOUR TOKEN GOES HERE'
  1. Adding your hostname (server ip address or domain) and your strong password from earlier
with MCRcon("HOSTNAMEOFMCSERVER", "PASSWORDGOESHERE") as mcr: #send the whitelist command to minecraft server
  1. Once your bot is in discord run main.py
  2. Then in discord use #whitelist <Minecraft Username>
  3. The default prefix # can be changed by changing this line in main.py
bot = commands.Bot(command_prefix='#', help_command=None) #sets your prefix

License

MIT