DISCORD-MINECRAFT-WHITELIST-BOT is discord bot that will allow discord users to whitelist themselves.
Clone the repository
git clone https://github.com/ryanhubler/Discord-Minecraft-whitelist-bot.git
Install dependency's
pip3 install mcrcon
- 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
- 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'
- 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
- Once your bot is in discord run main.py
- Then in discord use
#whitelist <Minecraft Username>
- The default prefix
#
can be changed by changing this line in main.py
bot = commands.Bot(command_prefix='#', help_command=None) #sets your prefix