diff --git a/src/bot.py b/src/bot.py index 67592d5..0b64bf8 100644 --- a/src/bot.py +++ b/src/bot.py @@ -93,9 +93,13 @@ class MILBot(commands.Bot): member_services_channel: discord.TextChannel errors_channel: discord.TextChannel software_github_channel: discord.TextChannel + electrical_github_channel: discord.TextChannel + mechanical_github_channel: discord.TextChannel + leads_github_channel: discord.TextChannel software_projects_channel: discord.TextChannel mechanical_category_channel: discord.CategoryChannel electrical_category_channel: discord.CategoryChannel + leaders_category_channel: discord.CategoryChannel software_category_channel: discord.CategoryChannel operations_leaders_channel: discord.TextChannel software_leaders_channel: discord.TextChannel @@ -327,6 +331,13 @@ async def fetch_vars(self) -> None: assert isinstance(electrical_category_channel, discord.CategoryChannel) self.electrical_category_channel = electrical_category_channel + leads_category_channel = discord.utils.get( + self.active_guild.categories, + name="Leadership", + ) + assert isinstance(leads_category_channel, discord.CategoryChannel) + self.leads_category_channel = leads_category_channel + mechanical_category_channel = discord.utils.get( self.active_guild.categories, name="Mechanical", @@ -358,6 +369,14 @@ async def fetch_vars(self) -> None: assert isinstance(mech_github_updates_channel, discord.TextChannel) self.mechanical_github_channel = mech_github_updates_channel + leads_github_updates_channel = discord.utils.get( + self.active_guild.text_channels, + name="github-updates", + category=self.leads_category_channel, + ) + assert isinstance(leads_github_updates_channel, discord.TextChannel) + self.leads_github_channel = leads_github_updates_channel + errors_channel = discord.utils.get( self.active_guild.text_channels, name="bot-errors", diff --git a/src/webhooks.py b/src/webhooks.py index 037f5c9..cb5407a 100644 --- a/src/webhooks.py +++ b/src/webhooks.py @@ -87,6 +87,8 @@ def updates_channel(self, repository_or_login: dict | str) -> discord.TextChanne return self.bot.electrical_github_channel if login.startswith("uf-mil-mechanical"): return self.bot.mechanical_github_channel + if login.startswith("uf-mil-leadership"): + return self.bot.leads_github_channel return self.bot.software_github_channel def leaders_channel(self, repository_or_login: dict | str) -> discord.TextChannel: @@ -99,6 +101,8 @@ def leaders_channel(self, repository_or_login: dict | str) -> discord.TextChanne return self.bot.electrical_leaders_channel if login.startswith("uf-mil-mechanical"): return self.bot.mechanical_leaders_channel + if login.startswith("uf-mil-leadership"): + return self.bot.leads_github_channel return self.bot.software_leaders_channel def category_channel(self, login: str) -> discord.CategoryChannel: @@ -106,6 +110,8 @@ def category_channel(self, login: str) -> discord.CategoryChannel: return self.bot.electrical_category_channel if login.startswith("uf-mil-mechanical"): return self.bot.mechanical_category_channel + if login.startswith("uf-mil-leadership"): + return self.bot.leads_category_channel return self.bot.software_category_channel def notify_channels(self, labels: list[dict]) -> list[discord.TextChannel]: