add sleep quand l'autre con il parle

This commit is contained in:
BFlow 2020-04-20 16:35:07 +02:00
parent 1804f6d1e2
commit d89024d32f

View file

@ -107,6 +107,8 @@ class Mybot(commands.Cog):
with open(path, 'r') as f:
lines = f.read().splitlines()
nb_lines = len(lines)
with ctx.channel.typing():
await asyncio.sleep(0.5)
await ctx.channel.send("j'ai %s lignes dans mon stock" % nb_lines)
@commands.command(help='slap this ass')
@ -129,8 +131,12 @@ class Mybot(commands.Cog):
user = ctx.message.mentions[0]
user = user.mention
if user == self.bot.user.mention:
with ctx.channel.typing():
await asyncio.sleep(0.5)
await ctx.channel.send("je tribuche par terre et je sais pas comment")
else:
with ctx.channel.typing():
await asyncio.sleep(len(slap_multiple)/4)
await ctx.channel.send(random.choice(slap_multiple) % user)
@commands.command(help="Interrogation issues")
@ -211,24 +217,36 @@ class Mybot(commands.Cog):
result = sans_verbe
elif piece == "face":
result = avec_verbe
with ctx.channel.typing():
await asyncio.sleep(len(result)/4)
await ctx.send(result)
@commands.command(help="Toi tu fermes ta gueule! Tu la fermes définitivement")
async def mute(self, ctx, member: discord.Member=None, mute_time = 10):
if member.voice.mute:
with ctx.channel.typing():
await asyncio.sleep(1)
await ctx.channel.send("Tu ne vas pas m'avoir si facilement")
return
if not member:
with ctx.channel.typing():
await asyncio.sleep(1)
await ctx.channel.send("Qui veux-tu mute?")
return
if mute_time > 60:
with ctx.channel.typing():
await asyncio.sleep(1)
await ctx.channel.send("Doucement sur le temps!")
return
member = ctx.message.mentions[0]
await member.edit(mute=True)
with ctx.channel.typing():
await asyncio.sleep(1)
await ctx.send("Tu sors %s!" % member.mention)
await asyncio.sleep(mute_time)
await member.edit(mute=False)
with ctx.channel.typing():
await asyncio.sleep(1)
await ctx.channel.send("Tu peux reparler %s!" % member.mention)
@commands.command(help="Appuie sur la detente PUSSY!")
@ -240,12 +258,18 @@ class Mybot(commands.Cog):
if bullet == True:
await self.joke(ctx, "omawa_shindeiru.mp3")
await member.edit(mute=True)
with ctx.channel.typing():
await asyncio.sleep(0.5)
await ctx.channel.send("Perdu, tu es mute pendant 60 secondes!")
else:
with ctx.channel.typing():
await asyncio.sleep(0.5)
await ctx.channel.send("Gagné, tu ne seras pas mute!")
return
await asyncio.sleep(mute_time)
await member.edit(mute=False)
with ctx.channel.typing():
await asyncio.sleep(0.5)
await ctx.channel.send("Tu peux reparler %s!" % member.mention)
@tasks.loop(seconds=1.5)
@ -272,6 +296,8 @@ class Mybot(commands.Cog):
"tu sera DSI chez jacky et Michel",
"tu seras arroseur de plante aquatique.")
choix = random.choice(list_mot)
with ctx.channel.typing():
await asyncio.sleep(len(choix)/4)
await ctx.channel.send(choix)