Skip to content

Commit

Permalink
Create ;admin command for attachment of admin role
Browse files Browse the repository at this point in the history
  • Loading branch information
r-hensley committed Jul 8, 2024
1 parent dc10a71 commit 3adb157
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions cogs/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -1446,6 +1446,20 @@ async def doneq(self, ctx: commands.Context):
except (discord.Forbidden, discord.HTTPException):
pass

@commands.command(hidden=True)
@commands.check(lambda ctx: ctx.author.id in [216848576549093376, 354352443502493706, 202995638860906496]
and ctx.guild.id == SP_SERVER_ID if ctx.guild else False)
async def admin(self, ctx):
"""Allows chosen users to add/remove admin role"""
# Current users: Jaleel, Evil, Ryan
admin_role = ctx.guild.get_role(243854949522472971)
if admin_role in ctx.author.roles:
await ctx.author.remove_roles(admin_role)
await ctx.message.add_reaction('❌')
else:
await ctx.author.add_roles(admin_role)
await ctx.message.add_reaction('✅')


async def setup(bot):
await bot.add_cog(General(bot))

0 comments on commit 3adb157

Please sign in to comment.