cogs/color/management.py
async def remove_color(self, ctx, *, color: utils.ColorConverter):
        """Remove a color from a guild's colors."""

        # remove color from db
        db.guilds.update_one(
            {"_id": ctx.guild.id},
            {"$pull": {"colors": color}}
        )

        # remove role if exists
        if color["role"]:
            role = ctx.guild.get_role(color["role"])
            await role.delete()

        await ctx.invoke(bot.get_command("colors"))
Remove a color from a guild's colors.
Remove a color from a guild's colors.
Remove a color from a guild ' s colors .
async def remove_color(self, ctx, *, color: utils.ColorConverter):
        db.guilds.update_one(
            {"_id": ctx.guild.id},
            {"$pull": {"colors": color}}
        )
        if color["role"]:
            role = ctx.guild.get_role(color["role"])
            await role.delete()
        await ctx.invoke(bot.get_command("colors"))
async def remove_color ( self , ctx , * , color : utils . ColorConverter ) : db . guilds . update_one ( { "_id" : ctx . guild . id } , { "$pull" : { "colors" : color } } ) if color [ "role" ] : role = ctx . guild . get_role ( color [ "role" ] ) await role . delete ( ) await ctx . invoke ( bot . get_command ( "colors" ) )
Remove a color from a guild's colors.
Remove a color from a guild ' s colors .
"""Remove a color from a guild's colors.""" # remove color from db # remove role if exists
self
ctx
color
utils.ColorConverter