|
|
@@ -5,14 +5,14 @@ from discord.commands import slash_command
|
|
|
import configparser
|
|
|
|
|
|
|
|
|
-class helpcache(commands.Cog):
|
|
|
+class demotion(commands.Cog):
|
|
|
def __init__(self, bot: discord.Bot):
|
|
|
self.bot = bot
|
|
|
|
|
|
|
|
|
#Command initialization
|
|
|
- @slash_command(name="promotion", description= "Promote a department member to the next rank")
|
|
|
- async def promotion(
|
|
|
+ @slash_command(name="demotion", description= "Demote a department member to the previous rank")
|
|
|
+ async def demotion(
|
|
|
self,
|
|
|
ctx,
|
|
|
user: str = Option(discord.User, "Select User", required=True),
|
|
|
@@ -67,4 +67,8 @@ class helpcache(commands.Cog):
|
|
|
new_rank = ranks[current_rank_index - 1]
|
|
|
await user.remove_roles(user_rank)
|
|
|
await user.add_roles(new_rank)
|
|
|
- await ctx.respond(f"{user.mention} has been demoted to {new_rank.name}!", ephemeral=True)
|
|
|
+ await ctx.respond(f"{user.mention} has been demoted to {new_rank.name}!", ephemeral=True)
|
|
|
+
|
|
|
+
|
|
|
+def setup(bot: discord.Bot):
|
|
|
+ bot.add_cog(demotion(bot))
|