diakonos/cherubim/imgperms.py

21 lines
903 B
Python
Raw Permalink Normal View History

2024-01-17 00:20:44 -05:00
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}.")