async def mention(self, ctx: commands.Context, role_name): role = Configuration.get_role(ctx, role_name) Mods = discord.utils.get(ctx.guild.roles, id=485125261470203905) if 485125261470203905 not in [role.id for role in ctx.author.roles]: return if role.mentionable: await role.edit(mentionable=False) await ctx.send(f"{role.name} is now unmentionable!") else: await role.edit(mentionable=True) await ctx.send(f"{role.name} is now mentionable!")
async def announce(self, ctx: commands.Context, role_name, *, message): Admins = discord.utils.get(ctx.guild.roles, id=485125261470203905) role = Configuration.get_role(ctx, role_name) channel = Configuration.get_channel(ctx, role_name) if 485125261470203905 not in [role.id for role in ctx.author.roles]: return if role is None: return await ctx.send("This role might have been deleted, oops!") if message != None: await role.edit(mentionable=True) try: await channel.send(f"{role.mention}\n{message}") except discord.Forbidden: await ctx.send("I was not able to send a message. Can you check to make sure I have permission?") await role.edit(mentionable=False) else: await ctx.send("I am unsure of what you are attempting to do.")