aboutsummaryrefslogtreecommitdiffstats
path: root/arthur/config.py
diff options
context:
space:
mode:
authorGravatar Chris Lovering <[email protected]>2024-02-02 16:17:40 +0000
committerGravatar Chris Lovering <[email protected]>2024-02-02 16:17:40 +0000
commit25b2e539fc99f2c60bbb74d3f4c5e212a741da53 (patch)
treed387537f332dcdac2e3f0ff8b310615d04b3a308 /arthur/config.py
parentEnable all ruff rules (diff)
Mark bot token & CF token as secret strings
This avoids them being printed in logs
Diffstat (limited to 'arthur/config.py')
-rw-r--r--arthur/config.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/arthur/config.py b/arthur/config.py
index 66e89a7..9743667 100644
--- a/arthur/config.py
+++ b/arthur/config.py
@@ -1,5 +1,6 @@
"""Utilities for interacting with the config for King Arthur."""
+import pydantic
from pydantic_settings import BaseSettings
@@ -12,7 +13,7 @@ class Config(
"""Configuration for King Arthur."""
# Discord bot token
- token: str
+ token: pydantic.SecretStr
# Discord bot prefix
prefixes: tuple[str, ...] = ("arthur ", "M-x ")
@@ -21,7 +22,7 @@ class Config(
devops_role: int = 409416496733880320
# Token for authorising with the Cloudflare API
- cloudflare_token: str
+ cloudflare_token: pydantic.SecretStr
# Guild id
guild_id: int = 267624335836053506