diff --git a/kabot/kabot/kabot.py b/kabot/kabot/kabot.py index 0163fb6..3484194 100644 --- a/kabot/kabot/kabot.py +++ b/kabot/kabot/kabot.py @@ -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')