From 4577eb321f0c56de2dbcca36e148c4ff7a4e89f8 Mon Sep 17 00:00:00 2001 From: Minh Duong Date: Fri, 6 Sep 2024 12:31:53 -0500 Subject: [PATCH] Improve role messages --- src/cogs/ctfs/ctfs.py | 22 +++++++++++----------- src/cogs/roles/roles.py | 8 ++++---- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/cogs/ctfs/ctfs.py b/src/cogs/ctfs/ctfs.py index 5a55876..d07f7a6 100644 --- a/src/cogs/ctfs/ctfs.py +++ b/src/cogs/ctfs/ctfs.py @@ -10,38 +10,38 @@ class CTFs(Extension): @subcommand() async def optin(self, ctx: SlashContext): - '''Get the CTF role. Requires the UIUC role.''' + '''Add yourself to the CTF Team. Requires the UIUC role.''' if (ctx.guild == None): - await ctx.send(":x: Must be used inside a guild.") + await ctx.send(":x: You can only run this command in a server.", ephemeral=True) return user = ctx.guild.get_member(ctx.user.id) if (user == None): - await ctx.send(":x: User not in guild. This should be impossible.") + await ctx.send(":x: You aren't in the server! Are you a ghost?", ephemeral=True) return if (not any(user.has_role(role) for role in UIUC_ROLES)): - await ctx.send(":x: Must be UIUC verified.") + await ctx.send(":x: You need to be UIUC verified to use this command. Verify yourself at .", ephemeral=True) return if (any(user.has_role(role) for role in CTF_ROLES)): - await ctx.send(":x: You already have the CTF role.") + await ctx.send(f":x: You already have the **:red_circle: CTF Team** role.", ephemeral=True) return await user.add_roles(CTF_ROLES) - await ctx.send("Added CTF role.") + await ctx.send(f":white_check_mark: Added to **:red_circle: CTF Team**.") @subcommand() async def optout(self, ctx: SlashContext): - '''Remove the CTF role''' + '''Remove yourself from the CTF Team.''' if (ctx.guild == None): - await ctx.send(":x: Must be used inside a guild.") + await ctx.send(":x: You can only run this command in a server.", ephemeral=True) return user = ctx.guild.get_member(ctx.user.id) if (user == None): - await ctx.send(":x: User not in guild. This should be impossible.") + await ctx.send(":x: You aren't in the server! Are you a ghost?", ephemeral=True) return if (not any(user.has_role(role) for role in CTF_ROLES)): - await ctx.send(":x: You do not have the CTF role.") + await ctx.send(f":x: You do not have the **:red_circle: CTF Team** role.", ephemeral=True) return await user.remove_roles(CTF_ROLES) - await ctx.send("Removed CTF role.") + await ctx.send(f":white_check_mark: Removed from **:red_circle: CTF Team**.") diff --git a/src/cogs/roles/roles.py b/src/cogs/roles/roles.py index f905be4..9f41fa5 100644 --- a/src/cogs/roles/roles.py +++ b/src/cogs/roles/roles.py @@ -13,7 +13,7 @@ def __init__(self, _): @subcommand(role={"description": "Role to add","autocomplete": True}) async def add(self, ctx: SlashContext, role: str) -> None: - """Add a private role. Requires the UIUC role.""" + """Add yourself to a team role. Requires the UIUC role.""" if (ctx.guild == None): await ctx.send(":x: You can only run this command in a server.", ephemeral=True) return @@ -34,13 +34,13 @@ async def add(self, ctx: SlashContext, role: str) -> None: await ctx.send(f":x: You already have the **{role}** role.", ephemeral=True) return await user.add_role(valid_role_id) - await ctx.send(f":white_check_mark: Added you to **{role}**.", ephemeral=True) + await ctx.send(f":white_check_mark: Added to **{role}**.") return await ctx.send(":x: Invalid role.") @subcommand(role={"description": "Role to remove","autocomplete": True}) async def remove(self, ctx: SlashContext, role: str) -> None: - """Removes a private role.""" + """Remove yourself from a team role.""" if (ctx.guild == None): await ctx.send(":x: You can only run this command in a server.", ephemeral=True) return @@ -58,7 +58,7 @@ async def remove(self, ctx: SlashContext, role: str) -> None: await ctx.send(f":x: You do not have the **{role}** role.", ephemeral=True) return await user.remove_role(valid_role_id) - await ctx.send(f":white_check_mark: Removed you from **{role}**.", ephemeral=True) + await ctx.send(f":white_check_mark: Removed from **{role}**.") return await ctx.send(":x: Invalid role.")