From 1e0c015400058a350b846c4e41c1f1d1e00ba6fe Mon Sep 17 00:00:00 2001 From: Irdumb Date: Fri, 22 Apr 2016 08:58:02 +1000 Subject: [PATCH] Prompts for updates (#160) --- red.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/red.py b/red.py index 3b292a1be..f53b07670 100644 --- a/red.py +++ b/red.py @@ -524,9 +524,20 @@ def main(): print("Owner has not been set yet. Do '{}set owner' in chat to set yourself as owner.".format(bot.command_prefix[0])) else: owner.hidden = True # Hides the set owner command from help + print("-- Logging in.. --") + print("Make sure to keep your bot updated by using: git pull") + print("and: pip3 install --upgrade git+https://github.com/Rapptz/discord.py@async") if settings.login_type == "token": _token.hidden = True - yield from bot.login(settings.email) + try: + yield from bot.login(settings.email) + except TypeError as e: + print(e) + msg = "\n" + msg += "You are using an outdated discord.py.\n" + msg += "update your discord.py with by running this in your cmd prompt/terminal.\n" + msg += "pip3 install --upgrade git+https://github.com/Rapptz/discord.py@async" + sys.exit(msg) else: yield from bot.login(settings.email, settings.password) yield from bot.connect()