Mute 5er essai

This commit is contained in:
BFlow 2020-04-17 13:19:40 +02:00
parent 8252930ee4
commit 35aaac9baf

View file

@ -223,11 +223,10 @@ class Mybot(commands.Cog):
await ctx.channel.send("Doucement sur le temps!")
return
member = ctx.message.mentions[0]
role = discord.utils.get(ctx.guild.roles, name="muted")
await member.add_roles(role)
await member.edit(mute=True)
await ctx.send("Tu sors %s!" % member.mention)
await asyncio.sleep(mute_time)
await member.remove_roles(role)
await member.edit(mute=False)
await ctx.channel.send("Tu peux reparler %s!" % member.mention)
@tasks.loop(seconds=1.5)