From 73a1b4fd36149657ed5a007a8a891ac71bee179f Mon Sep 17 00:00:00 2001 From: Alastair Holland Date: Sun, 3 May 2020 18:07:13 +0100 Subject: [PATCH] Added command infor to readme --- README.md | 11 +++++++++++ lib/bot.py | 2 ++ 2 files changed, 13 insertions(+) diff --git a/README.md b/README.md index 68b2b39..7bc3a19 100755 --- a/README.md +++ b/README.md @@ -26,6 +26,17 @@ If this doesn't happen, please report it as an issue and install them manually. ### Hardware You can run this bot on just about any hardware that can run Python but if you don't have a device that can keep this bot hosted 24/7, I would recommend using a [Raspberry Pi](https://www.raspberrypi.org/). They run Linux, are low cost, use very little power and are capable of running this code without an issue. +### Default commands +* map - Displays the online map if you have one installed on your server +* server - Displays the public server address +* help - Displays all default bot commands +* download - Allows users to download the worlds if you have them publicly hosted +* status - Checks to see if the server is up and lists online players +* minecraftNickname - Sets the nickname to be used for 'status' +* source - Displays the source code of this bot + +#### You can add your own commands in the custom file which is created on setup + ## Setting up the Discord bot 1) Go to the [Discord developer site](https://discordapp.com/developers/applications) diff --git a/lib/bot.py b/lib/bot.py index d878b44..67d5884 100755 --- a/lib/bot.py +++ b/lib/bot.py @@ -52,6 +52,8 @@ async def on_message(message): '''Checking which command has been issued''' if message.author == client.user: #Make sure that the bot doesn't reply to itself return + elif message.content.startswith(prefix + 'source'): + msg = "https://github.coventry.ac.uk/hollan84/MinecraftDiscord" elif message.content.startswith(prefix + 'map'): msg = os.environ['MAP'] elif message.content.startswith(prefix + 'server'):