diff --git a/kabot/kabot/kabot.py b/kabot/kabot/kabot.py index f1e162c..0e28ef0 100644 --- a/kabot/kabot/kabot.py +++ b/kabot/kabot/kabot.py @@ -366,6 +366,13 @@ class Mybot(commands.Cog): cmd = self.bot.get_command(command_name) ctx.channel = channel ctx.guild = guild + for word in sentence.split(): + if word.startswith('@'): + members = guild.members + for member in members: + if member.name == word[1:]: + sentence = sentence.replace(word, member.mention) + ctx.message = sentence await cmd.invoke(ctx) else: for word in sentence.split():