Mute 5er essai
This commit is contained in:
parent
8252930ee4
commit
35aaac9baf
1 changed files with 2 additions and 3 deletions
|
@ -223,11 +223,10 @@ class Mybot(commands.Cog):
|
||||||
await ctx.channel.send("Doucement sur le temps!")
|
await ctx.channel.send("Doucement sur le temps!")
|
||||||
return
|
return
|
||||||
member = ctx.message.mentions[0]
|
member = ctx.message.mentions[0]
|
||||||
role = discord.utils.get(ctx.guild.roles, name="muted")
|
await member.edit(mute=True)
|
||||||
await member.add_roles(role)
|
|
||||||
await ctx.send("Tu sors %s!" % member.mention)
|
await ctx.send("Tu sors %s!" % member.mention)
|
||||||
await asyncio.sleep(mute_time)
|
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)
|
await ctx.channel.send("Tu peux reparler %s!" % member.mention)
|
||||||
|
|
||||||
@tasks.loop(seconds=1.5)
|
@tasks.loop(seconds=1.5)
|
||||||
|
|
Loading…
Reference in a new issue