From 0a60b5d4200219233ad5164da3ae73c5f43955e7 Mon Sep 17 00:00:00 2001 From: shtlrs Date: Sat, 3 Dec 2022 23:37:22 +0100 Subject: do not use name mangling This also renames to method to align more with our fetch or {action} pattern --- bot/exts/info/subscribe.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bot/exts/info/subscribe.py b/bot/exts/info/subscribe.py index 63a23346f..15e7ba347 100644 --- a/bot/exts/info/subscribe.py +++ b/bot/exts/info/subscribe.py @@ -222,7 +222,7 @@ class Subscribe(commands.Cog): self.assignable_roles.sort(key=operator.attrgetter("name")) self.assignable_roles.sort(key=operator.methodcaller("is_currently_available"), reverse=True) - initial_self_assignable_roles_message = await self.__search_for_self_assignable_roles_message() + initial_self_assignable_roles_message = await self._fetch_or_create_self_assignable_roles_message() self.__attach_persistent_roles_view(initial_self_assignable_roles_message) @commands.cooldown(1, 10, commands.BucketType.member) @@ -242,9 +242,9 @@ class Subscribe(commands.Cog): # Keep reference of the message that contains the view to be deleted view.anchor_message = message - async def __search_for_self_assignable_roles_message(self) -> discord.Message: + async def _fetch_or_create_self_assignable_roles_message(self) -> discord.Message: """ - Searches for the message that holds the self assignable roles view. + Fetches the message that holds the self assignable roles view. If the initial message isn't found, a new one will be created. This message will always be needed to attach the persistent view to it -- cgit v1.2.3