def empty_out(self, ctx, *, role: discord.Role):
"""
Empties out a role's permissions.
This effectively turn it into a vanity role.
"""
if role > ctx.guild.me.top_role:
return await ctx.send('My position on the role hierarchy is lower than that role, so I can\'t edit it.')
try:
await role.edit(permissions=discord.Permissions(permissions=0))
await ctx.ok()
except discord.Forbidden:
await ctx.send('I can\'t do that.')
评论列表
文章目录