From 6c8b592d126ad176347f43ee5f4cb76b2def3c25 Mon Sep 17 00:00:00 2001 From: phxntxm Date: Wed, 21 Sep 2016 14:16:47 -0500 Subject: [PATCH] Rearranged the 'fails' for boops, to not cause an error when none is provided --- cogs/interaction.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cogs/interaction.py b/cogs/interaction.py index a014cb4..e150b28 100644 --- a/cogs/interaction.py +++ b/cogs/interaction.py @@ -169,6 +169,10 @@ class Interaction: async def boop(self, ctx, boopee: discord.Member=None): """Boops the mentioned person""" booper = ctx.message.author + if boopee is None: + ctx.command.reset_cooldown(ctx) + await self.bot.say("You try to boop the air, the air boops back. Be afraid....") + return if boopee.id == booper.id: ctx.command.reset_cooldown(ctx) await self.bot.say("You can't boop yourself! Silly...") @@ -177,9 +181,6 @@ class Interaction: ctx.command.reset_cooldown(ctx) await self.bot.say("Why the heck are you booping me? Get away from me >:c") return - if boopee is None: - await self.bot.say("You try to boop the air, the air boops back. Be afraid....") - return boops = await config.get_content('boops')