Advertisement
MoogLeaks

discord.py mute

Feb 24th, 2018
1,263
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.65 KB | None | 0 0
  1. @bot.command(pass_context = True)
  2. async def mute(ctx, member: discord.Member):
  3.      if ctx.message.author.server_permissions.administrator or ctx.message.author.id == '194151340090327041':
  4.         role = discord.utils.get(member.server.roles, name='Muted')
  5.         await bot.add_roles(member, role)
  6.         embed=discord.Embed(title="User Muted!", description="**{0}** was muted by **{1}**!".format(member, ctx.message.author), color=0xff00f6)
  7.         await bot.say(embed=embed)
  8.      else:
  9.         embed=discord.Embed(title="Permission Denied.", description="You don't have permission to use this command.", color=0xff00f6)
  10.         await bot.say(embed=embed)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement