1
0
Fork 0
mirror of synced 2024-05-29 00:39:39 +12:00

Added the ability to add roles to members

This commit is contained in:
phxntxm 2016-07-31 16:14:29 -05:00
parent 3b39a1dc65
commit 3f79d6bd5b

View file

@ -18,13 +18,13 @@ class Roles:
@role.command(name='add', pass_context=True)
@checks.customPermsOrRole(manage_server=True)
async def add_role(self, ctx, *, members: discord.Member = None):
async def add_role(self, ctx):
"""Use this to add a role to multiple members.
Provide the list of members, and I'll ask for the role
If no members are provided, I'll first ask for them"""
server_roles = [role for role in ctx.message.server.roles if not role.is_everyone]
if members is None:
members = ctx.message.mentions
if len(members) == 0:
await self.bot.say("Please provide the list of members you want to add a role to")
msg = await self.bot.wait_for_message(author=ctx.message.author, channel=ctx.message.channel)
if msg is None: