add attack_check and update engage_check
@@ -16,7 +16,16 @@ class MobSpawner:
if m.content.lower().lstrip(ctx.prefix) not in self.d.mobs_mech.valid_attacks:
return False
- return m.channel.id == ctx.channel.id and not ctx.author.bot and ctx.author.id not in self.bot.ban_cache
+ return m.channel == ctx.channel and not ctx.author.bot and ctx.author.id not in self.bot.ban_cache
+
+ return commands.check(predicate)
+
+ def attack_check(self, ctx, engage_msg):
+ def predicate(m):
+ if m.content.lower().lstrip(ctx.prefix) not in self.d.mobs_mech.valid_attacks and m.content.lower().lstrip(ctx.prefix) not in self.d.mobs_mech.valid_flees:
+ return False
+
+ return m.channel == engage_msg.channel and m.author == engage_msg.author
return commands.check(predicate)
