From 63c3bc353dbee9bdb7af2aedc20de726c1a2f99a Mon Sep 17 00:00:00 2001 From: BFlow Date: Sat, 25 Apr 2020 19:33:20 +0200 Subject: [PATCH] add command say --- kabot/kabot/kabot.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/kabot/kabot/kabot.py b/kabot/kabot/kabot.py index 7a255fb..5904349 100644 --- a/kabot/kabot/kabot.py +++ b/kabot/kabot/kabot.py @@ -197,7 +197,7 @@ class Mybot(commands.Cog): except: response = "Unknow error, try: !kaamelott [livre] [character]" await ctx.send(response) - + @commands.command(help="optionnal args : ") async def contrepeterie(self, ctx, *args): response = None @@ -288,6 +288,14 @@ class Mybot(commands.Cog): await asyncio.sleep(0.5) await ctx.channel.send("Tu peux reparler %s!" % member.mention) + @commands.dm_only() + @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] + await channel.send(sentence) + + @tasks.loop(seconds=1.5) async def play_next(self): if self.sounds: