From 386c70f8036de0a9a6344219235e12658f45024b Mon Sep 17 00:00:00 2001 From: BFlow Date: Fri, 17 Apr 2020 16:24:43 +0200 Subject: [PATCH] roulette 1er essai --- kabot/kabot/kabot.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/kabot/kabot/kabot.py b/kabot/kabot/kabot.py index 971a65e..52747d8 100644 --- a/kabot/kabot/kabot.py +++ b/kabot/kabot/kabot.py @@ -232,6 +232,23 @@ class Mybot(commands.Cog): await member.edit(mute=False) await ctx.channel.send("Tu peux reparler %s!" % member.mention) + @commands.command(help="Appuie sur la detente PUSSY!") + async def roulette(self, ctx): + mute_time = 60 + member = ctx.message.author + barillet = [False, False, True, False, False, False] + bullet = random.choice(barillet) + if bullet == True: + await member.edit(mute=True) + await ctx.channel.send("Perdu, tu es mute pendant 10 secondes!") + return + else: + await ctx.channel.send("Gagné, tu ne seras pas mute!") + return + await asyncio.sleep(mute_time) + await member.edit(False) + await ctx.channel.send("Tu peux reparler %s!" % member.mention) + @tasks.loop(seconds=1.5) async def play_next(self): if self.sounds: