Added the ability to remove a role from the server
This commit is contained in:
parent
379222529b
commit
529225997d
1 changed files with 3 additions and 1 deletions
|
@ -14,6 +14,8 @@ class Roles:
|
|||
@checks.customPermsOrRole(manage_server=True)
|
||||
async def role(self):
|
||||
pass
|
||||
|
||||
|
||||
@role.command(name='delete', aliases=['remove'], pass_context=True)
|
||||
@checks.customPermsOrRole(manage_server=True)
|
||||
async def remove_role(self, ctx, role: discord.Role=None):
|
||||
|
@ -23,7 +25,7 @@ class Roles:
|
|||
fmt = "\n".join(server_roles)
|
||||
|
||||
await self.bot.say("Which role would you like to remove from the server? Here is a list of this server's roles:{}".format(fmt))
|
||||
check = lambda m: len(role for role in server_roles if role.name == msg.content) > 0
|
||||
check = lambda m: discord.utils.get(server_roles,name=m.content) > 0
|
||||
msg = await self.bot.wait_for_message(author=ctx.message.author,channel=ctx.message.channel,check=check)
|
||||
if msg is None:
|
||||
await self.bot.say("You took too long. I'm impatient, don't make me wait")
|
||||
|
|
Loading…
Reference in a new issue