correction cmd say
This commit is contained in:
parent
9fd12991b6
commit
6b3e0a0b4f
1 changed files with 2 additions and 1 deletions
|
@ -359,9 +359,11 @@ class Mybot(commands.Cog):
|
|||
@commands.command(help="Faire dire des choses au bot")
|
||||
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]
|
||||
if sentence.startswith('!'):
|
||||
command_name = sentence.split()[0].replace('!', '')
|
||||
cmd = self.bot.get_command(command_name)
|
||||
ctx.channel = channel
|
||||
await cmd.invoke(ctx)
|
||||
else:
|
||||
for word in sentence.split():
|
||||
|
@ -371,7 +373,6 @@ class Mybot(commands.Cog):
|
|||
for member in members:
|
||||
if member.name == word[1:]:
|
||||
sentence = sentence.replace(word, member.mention)
|
||||
channel = [x for x in self.bot.get_all_channels() if x.name == "général"][0]
|
||||
await channel.send(sentence)
|
||||
|
||||
@commands.command(help='slap this ass')
|
||||
|
|
Loading…
Reference in a new issue