Skip to content

Commit 1ec7325

Browse files
fix: use a property for activity configuration
1 parent 29486a0 commit 1ec7325

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

monty/constants.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,6 @@ class ClientCls(BaseSettings):
6565
users=False,
6666
replied_user=True,
6767
)
68-
activity: ClassVar[disnake.Game] = disnake.Game(name=f"Commands: {default_command_prefix}help")
69-
7068
# debug configuration
7169
debug: bool = Field(False, validation_alias="BOT_DEBUG")
7270
proxy: str | None = Field(None, validation_alias="BOT_PROXY_URL")
@@ -120,6 +118,11 @@ def git_ref(self) -> str:
120118
"""Return the git reference to use in URLs."""
121119
return self.git_sha or "main"
122120

121+
@property
122+
def activity(self) -> disnake.Game:
123+
"""Return the bot's activity based on debug status."""
124+
return disnake.Game(name=f"Commands: {self.default_command_prefix}help")
125+
123126

124127
class DatabaseCls(BaseSettings):
125128
postgres_bind: pydantic.PostgresDsn = Field(validation_alias="DB_BIND")

0 commit comments

Comments
 (0)