fix issue with fleeing
@@ -170,12 +170,15 @@ class MobSpawner(commands.Cog):
)
fight_msg = await ctx.send(embed=embed)
+ user_action: str = None
+ # listen for attack or flee message (or timeout)
+ while user_action not in self.d.mobs_mech.valid_attacks:
try:
- user_action_msg = await self.bot.wait_for(
+ user_action_msg: discord.Message = await self.bot.wait_for(
"message", check=self.attack_check(ctx, initial_attack_msg), timeout=30
)
- user_action = user_action_msg.content.lower()
+ user_action = user_action_msg.content.lstrip(ctx.prefix).lower()
except asyncio.TimeoutError:
timed_out = True
else:
