Skip to content

Commit fa8f7e5

Browse files
Fixes
1 parent fba38c6 commit fa8f7e5

1 file changed

Lines changed: 9 additions & 10 deletions

File tree

‎cogs/colour_selector.py‎

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
logger: "Final[Logger]" = logging.getLogger("TeX-Bot")
2424

2525

26-
COLOUR_ROLE_NAMES: "Final[AbstractSet[str]]" = { # TODO: Make this a config option in the future
26+
COLOUR_ROLE_NAMES: "Final[AbstractSet[str]]" = { # TODO: Make this a config option in the future # noqa: FIX002
2727
"og-green",
2828
"pink",
2929
"orange",
@@ -81,22 +81,19 @@ async def member_colour_select(
8181
if not interaction_member:
8282
await self.command_send_error(
8383
ctx=ctx,
84-
message="Interaction user was None for member-colour-select command execution."
84+
message="Interaction user was None for member-colour-select command run.",
8585
)
8686
return
8787

8888
try:
8989
role_id_int = int(role_id_str)
9090
except ValueError:
9191
await self.command_send_error(
92-
ctx=ctx,
93-
message="Value entered was not a valid role ID."
92+
ctx=ctx, message="Value entered was not a valid role ID."
9493
)
9594
return
9695

97-
role_to_add: discord.Role | None = discord.utils.get(
98-
main_guild.roles, id=role_id_int
99-
)
96+
role_to_add: discord.Role | None = discord.utils.get(main_guild.roles, id=role_id_int)
10097

10198
if not role_to_add:
10299
await ctx.respond(
@@ -107,8 +104,7 @@ async def member_colour_select(
107104

108105
if role_to_add.name not in COLOUR_ROLE_NAMES:
109106
await ctx.respond(
110-
f"{role_to_add.name} is not a valid colour role. "
111-
"Please use the autocomplete."
107+
f"{role_to_add.name} is not a valid colour role. Please use the autocomplete."
112108
)
113109
return
114110

@@ -141,7 +137,10 @@ async def member_colour_select(
141137
)
142138
return
143139

144-
await interaction_member.remove_roles(*roles_to_remove, reason=f"{interaction_member} used TeX-Bot /member_colour_select.")
140+
await interaction_member.remove_roles(
141+
*roles_to_remove,
142+
reason=f"{interaction_member} used TeX-Bot /member_colour_select.",
143+
)
145144

146145
await interaction_member.add_roles(
147146
role_to_add,

0 commit comments

Comments
 (0)