correction cmd say

This commit is contained in:
BFlow 2020-09-04 23:01:24 +02:00
parent ec84a18e76
commit ef4ebf1c35

View file

@ -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():