from redbot.core import commands import discord import os dir_path = os.path.dirname(__file__) class ImgPerms(commands.Cog): @commands.command() async def giveimg(self, ctx, user: discord.Member): if ctx.guild.id == 362503610006765568: if len([x for x in ctx.author.roles if x.id == 794373197713375302]) > 0: await user.add_roles([x for x in ctx.guild.roles if x.id == 366885935289204736][0]) await ctx.send(f"Given image perms to {user.mention}.") @commands.command() async def takeimg(self, ctx, user: discord.Member): if ctx.guild.id == 362503610006765568: if len([x for x in ctx.author.roles if x.id == 794373197713375302]) > 0: await user.remove_roles([x for x in ctx.guild.roles if x.id == 366885935289204736][0]) await ctx.send(f"Taken image perms to {user.mention}.")