add message

pull/14/head
bobloy 7 years ago
parent 2e3f9691cd
commit ef183232c1

@ -21,18 +21,18 @@ class ForceMention:
@checks.admin_or_permissions(manage_roles=True) @checks.admin_or_permissions(manage_roles=True)
@commands.command() @commands.command()
async def forcemention(self, ctx: commands.Context, role: str): async def forcemention(self, ctx: commands.Context, role: str, *, message):
""" """
Mentions that role, regardless if it's unmentionable Mentions that role, regardless if it's unmentionable
""" """
role = get(ctx.guild.roles, name=role) role_obj = get(ctx.guild.roles, name=role)
if role is None: if role_obj is None:
await ctx.maybe_send_embed("Couldn't find role with that name") await ctx.maybe_send_embed("Couldn't find role named {}".format(role))
return return
if not role.mentionable: if not role_obj.mentionable:
await role.edit(mentionable=True) await role_obj.edit(mentionable=True)
await ctx.send(role.mention) await ctx.send("{}\n{}".format(role_obj.mention, message))
await role.edit(mentionable=False) await role_obj.edit(mentionable=False)
else: else:
await ctx.send(role.mention) await ctx.send(role_obj.mention)

Loading…
Cancel
Save