async def delete(self, ctx, *, rolename: str): roleobj = discord.utils.get(ctx.guild.roles, name=rolename) if Database.isfunrole(ctx.guild.id, roleobj.id): Database.removefunrole(ctx.guild.id, roleobj) if Database.isfunrole(ctx.guild.id, roleobj.id): return await ctx.message.add_reaction(emoji=redxemoji) else: return await ctx.message.add_reaction(emoji=checkmarkemoji) else: return await ctx.message.add_reaction(emoji=redxemoji)
async def massdelete(self, ctx, *rolename: discord.Role): rolesremoved = [] rolesnotremoved = [] for role in rolename: Database.removefunrole(ctx.guild.id, role) if Database.isfunrole(ctx.guild.id, role.id): rolesnotremoved.append(role.name) else: rolesremoved.append(role.name) await ctx.message.add_reaction(emoji=checkmarkemoji) return await ctx.send(f"Roles successfully removed: {rolesremoved} \n Unsuccesss: {rolesnotremoved}")