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