From 9dd3a349ca66b4b760fd3cbdd77cfee64faf458f Mon Sep 17 00:00:00 2001 From: Dustin Pianalto Date: Thu, 14 Jun 2018 10:34:16 -0800 Subject: [PATCH] changed order of checks --- src/cogs/bot_management.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cogs/bot_management.py b/src/cogs/bot_management.py index d1580e8..df7076b 100644 --- a/src/cogs/bot_management.py +++ b/src/cogs/bot_management.py @@ -8,6 +8,8 @@ class BotManager: @commands.command(name='claim', alaises=['makemine', 'gimme']) async def _claim_bot(self, ctx, bot: discord.Member=None, prefix: str=None): + if not bot.bot: + raise RuntimeError('You can only claim bots.') if not bot: raise RuntimeError('You must include the name of the bot you are trying to claim... Be exact.') if not prefix: @@ -15,8 +17,6 @@ class BotManager: prefix = bot.display_name.split(']')[0].strip('[') else: raise RuntimeError('Prefix not provided and can\'t be found in bot name.') - if not bot.bot: - raise RuntimeError('You can only claim bots.') em = discord.Embed() @@ -63,10 +63,10 @@ class BotManager: @commands.command(name='unclaim') async def _unclaim_bot(self, ctx, bot: discord.Member=None): - if not bot: - raise RuntimeError('You must include the name of the bot you are trying to claim... Be exact.') if not bot.bot: raise RuntimeError('You can only unclaim bots.') + if not bot: + raise RuntimeError('You must include the name of the bot you are trying to claim... Be exact.') em = discord.Embed()