diff --git a/galaxy/galaxy.py b/galaxy/galaxy.py index d566b48..6cb0d37 100644 --- a/galaxy/galaxy.py +++ b/galaxy/galaxy.py @@ -18,9 +18,13 @@ class Galaxy(commands.Cog): @commands.command() async def lwaccess(self, ctx): """You shouldn't be able to see this!""" - role = await bot.get_role(1083210988888784996) - await ctx.author.add_roles(role, reason="Requested through -lwaccess") - await ctx.send(content="Higher Access role granted.") + role = await ctx.guild.get_role(1083210988888784996) + if role in ctx.author.roles: + await ctx.author.removeroles(role, reaason="Requested through -lwaccess") + await ctx.send(content="Higher Access role removed.") + else: + await ctx.author.add_roles(role, reason="Requested through -lwaccess") + await ctx.send(content="Higher Access role added.") @commands.Cog.listener('on_message') async def cocoreact(self, message):