From ffe62b7e202c1dc4c479caa3a71a0676b3c062da Mon Sep 17 00:00:00 2001 From: penguinboi Date: Tue, 23 Jun 2026 01:48:32 -0400 Subject: [PATCH] Add join matrix section --- bot/extensions/welcome_cog.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/bot/extensions/welcome_cog.py b/bot/extensions/welcome_cog.py index 7195662..1d12786 100644 --- a/bot/extensions/welcome_cog.py +++ b/bot/extensions/welcome_cog.py @@ -17,7 +17,7 @@ def __init__(self, bot): self.bot = bot @property - def help_section(self): + def help_section(self) -> str: return self.__build_section( ["posting_guidelines", "help", "resources"], "### Looking for help?\n" @@ -26,7 +26,7 @@ def help_section(self): ) @property - def project_section(self): + def project_section(self) -> str: return self.__build_section( ["code-society-lab"], "### Looking for projects?\n" @@ -37,7 +37,15 @@ def project_section(self): "- [Matrix.py]()\n", ) - def get_welcome_message(self, member: Member): + @property + def matrix_section(self) -> str: + return self.__build_section( + [], + "### Join our Matrix Server!\n" + "You can also join our [matrix server]()" + ) + + def get_welcome_message(self, member: Member) -> str: """Return the welcome message for the given member. :param member: The member to welcome. @@ -54,6 +62,7 @@ def get_welcome_message(self, member: Member): self.BASE_WELCOME_MESSAGE, self.help_section, self.project_section, + self.matrix_section, ], ) ) @@ -61,7 +70,7 @@ def get_welcome_message(self, member: Member): .format(member_name=member.display_name) ) - def __build_section(self, channel_names, message): + def __build_section(self, channel_names: list[str], message: str): """Builds a section of the welcome message by replacing placeholders with corresponding channel IDs.