correction cmd say
This commit is contained in:
parent
6b3e0a0b4f
commit
ec84a18e76
1 changed files with 2 additions and 1 deletions
|
@ -360,15 +360,16 @@ class Mybot(commands.Cog):
|
|||
async def say(self, ctx, *message):
|
||||
sentence = ' '.join(message)
|
||||
channel = [x for x in self.bot.get_all_channels() if x.name == "général"][0]
|
||||
guild = self.bot.guilds[0]
|
||||
if sentence.startswith('!'):
|
||||
command_name = sentence.split()[0].replace('!', '')
|
||||
cmd = self.bot.get_command(command_name)
|
||||
ctx.channel = channel
|
||||
ctx.guild = guild
|
||||
await cmd.invoke(ctx)
|
||||
else:
|
||||
for word in sentence.split():
|
||||
if word.startswith('@'):
|
||||
guild = self.bot.guilds[0]
|
||||
members = guild.members
|
||||
for member in members:
|
||||
if member.name == word[1:]:
|
||||
|
|
Loading…
Reference in a new issue