Skip to content

Commit

Permalink
Merge pull request #102 from riazufila/fix-replies
Browse files Browse the repository at this point in the history
Fix replies
  • Loading branch information
riazufila authored May 8, 2021
2 parents 407b876 + 86f0da7 commit 6bb2ff4
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 13 deletions.
15 changes: 11 additions & 4 deletions cogs/book.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 11 additions & 7 deletions cogs/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
3 changes: 1 addition & 2 deletions cogs/pvp.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6bb2ff4

Please sign in to comment.