Added the ability to add roles to members
This commit is contained in:
parent
3b39a1dc65
commit
3f79d6bd5b
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue