File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ class InviteLinkCommandCog(TeXBotBaseCog):
2222 name = "invite-link" , description = "Display the invite link to this server."
2323 )
2424 async def invite_link (self , ctx : "TeXBotApplicationContext" ) -> None : # type: ignore[misc]
25- """Definition & callback response of the "invite-link " command."""
25+ """Definition & callback response of the "invite_link " command."""
2626 discord_invite_url : str | None = settings ["CUSTOM_DISCORD_INVITE_URL" ]
2727
2828 if not discord_invite_url :
Original file line number Diff line number Diff line change @@ -743,15 +743,15 @@ def _setup_statistics_days(cls) -> None:
743743 def _setup_statistics_roles (cls ) -> None :
744744 raw_statistics_roles : str = os .getenv ("STATISTICS_ROLES" , default = "" ).strip ()
745745
746- statistics_roles : AbstractSet [ str ] = (
747- {
748- raw_statistics_role . strip ()
749- for raw_statistics_role in raw_statistics_roles . split ( "," )
750- if raw_statistics_role
751- }
752- if raw_statistics_roles
753- else DEFAULT_STATISTICS_ROLES
754- )
746+ if not raw_statistics_roles :
747+ cls . _settings [ "STATISTICS_ROLES" ] = DEFAULT_STATISTICS_ROLES
748+ return
749+
750+ statistics_roles : AbstractSet [ str ] = {
751+ raw_statistics_role . strip ()
752+ for raw_statistics_role in raw_statistics_roles . split ( "," )
753+ if raw_statistics_role . strip ()
754+ }
755755
756756 cls ._settings ["STATISTICS_ROLES" ] = (
757757 statistics_roles if statistics_roles else DEFAULT_STATISTICS_ROLES
You can’t perform that action at this time.
0 commit comments