Skip to content

Commit

Permalink
src/leaders.py: Change important leaders reminders to target all Robo…
Browse files Browse the repository at this point in the history
…tX 2024 members
  • Loading branch information
cbrxyz committed Sep 30, 2024
1 parent fef9b2f commit f35ab86
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
8 changes: 8 additions & 0 deletions src/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ class MILBot(commands.Bot):

# Roles
egn4912_role: discord.Role
robotx_2024_role: discord.Role
leaders_role: discord.Role
sys_leads_role: discord.Role
software_leads_role: discord.Role
Expand Down Expand Up @@ -412,6 +413,13 @@ async def fetch_vars(self) -> None:
assert isinstance(egn4912_role, discord.Role)
self.egn4912_role = egn4912_role

robotx_2024_role = discord.utils.get(
self.active_guild.roles,
name="RobotX 2024",
)
assert isinstance(robotx_2024_role, discord.Role)
self.robotx_2024_role = robotx_2024_role

leaders_role = discord.utils.get(
self.active_guild.roles,
name="Leaders",
Expand Down
6 changes: 3 additions & 3 deletions src/leaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ async def notes_reminder(self):
discord.ui.Button(label="Meeting Notes", url=LEADERS_MEETING_NOTES_URL),
)
await self.bot.leaders_channel.send(
f"{self.bot.leaders_role.mention}",
f"{self.bot.robotx_2024_role.mention}",
embed=embed,
view=view,
)
Expand All @@ -325,7 +325,7 @@ async def pre_reminder(self):
)
view.add_item(discord.ui.Button(label="Meeting Link", url=LEADERS_MEETING_URL))
await self.bot.leaders_channel.send(
f"{self.bot.leaders_role.mention}",
f"{self.bot.robotx_2024_role.mention}",
embed=embed,
view=view,
)
Expand All @@ -349,7 +349,7 @@ async def at_reminder(self):
)
view.add_item(discord.ui.Button(label="Meeting Link", url=LEADERS_MEETING_URL))
await self.bot.leaders_channel.send(
f"{self.bot.leaders_role.mention}",
f"{self.bot.robotx_2024_role.mention}",
embed=embed,
view=view,
)
Expand Down
2 changes: 1 addition & 1 deletion src/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ async def testing(
inline=False,
)
mention = (
self.bot.leaders_role.mention
self.bot.robotx_2024_role.mention
if interaction.channel == self.bot.leaders_channel
else self.bot.egn4912_role.mention
)
Expand Down

0 comments on commit f35ab86

Please sign in to comment.