diff --git a/cogs/book.py b/cogs/book.py index 8f8f7ad..7a1ae40 100644 --- a/cogs/book.py +++ b/cogs/book.py @@ -48,10 +48,17 @@ async def book(self, ctx, type, *target): db_ailie.disconnect() return - target = " ".join(target) - exists = False - hero_name = "" - hero_stats = hero_buffs = hero_skill = hero_on_hit = hero_on_normal = {} + if target: + target = " ".join(target) + exists = False + hero_name = "" + hero_stats = ( + hero_buffs + ) = hero_skill = hero_on_hit = hero_on_normal = {} + else: + await ctx.send("No hero or equipment mentioned.") + db_ailie.disconnect() + return if type in ["heroes", "hero", "h"]: exists = True diff --git a/cogs/bot.py b/cogs/bot.py index 874592d..ed08f9c 100644 --- a/cogs/bot.py +++ b/cogs/bot.py @@ -131,14 +131,18 @@ async def feedback(self, ctx, *feedback): db_ailie.disconnect() - # Process complain - feedback = " ".join(feedback) - await self.notifyOwner(ctx, feedback, "agree") + if feedback: + # Process complain + feedback = " ".join(feedback) + await self.notifyOwner(ctx, feedback, "agree") - # Mimic loading animation - await ctx.send( - f"Ding dong, <@{ctx.author.id}>! " + "Your message has been logged." - ) + # Mimic loading animation + await ctx.send( + f"Ding dong, <@{ctx.author.id}>! " + + "Your message has been logged." + ) + else: + await ctx.send("Can't send anything since you put no messages!") # Send error message upon spamming commands @commands.Cog.listener() diff --git a/cogs/pvp.py b/cogs/pvp.py index 4d123d0..063993b 100644 --- a/cogs/pvp.py +++ b/cogs/pvp.py @@ -788,8 +788,7 @@ def confirm_application(message): return except Exception: await ctx.send( - "Looks like your challenge got ignored, " - + f"<@{guardian_id}>. Ouch!" + "Looks like the challenge got ignored. Ouch!" ) db_ailie.disconnect() return