Mute 1er essai
This commit is contained in:
parent
3836b06f5c
commit
c357efd459
1 changed files with 15 additions and 0 deletions
|
@ -214,6 +214,21 @@ class Mybot(commands.Cog):
|
|||
result = avec_verbe
|
||||
await ctx.send(result)
|
||||
|
||||
@commands.command(help="Toi tu fermes ta gueule! Tu la fermes définitivement")
|
||||
async def mute(ctx, member: discord.Member=None, mute_time = 10):
|
||||
if not member:
|
||||
await ctx.channel.send("Qui veux-tu mute?")
|
||||
return
|
||||
if mute_time > 60:
|
||||
await ctx.channel.send("Doucement sur le temps!")
|
||||
return
|
||||
role = discord.utils.get(ctx.guild.roles, name="muted")
|
||||
await member.add_roles(role)
|
||||
await ctx.send("Tu sors %s!" % member.mention)
|
||||
await asyncio.sleep(mute_time)
|
||||
await member.remove_roles(role)
|
||||
await ctx.channel.send("Tu peux reparler %s!" % member.mention)
|
||||
|
||||
@tasks.loop(seconds=1.5)
|
||||
async def play_next(self):
|
||||
if self.sounds:
|
||||
|
|
Loading…
Reference in a new issue