Files
Open-Assistant/discord-bot/bot/settings.py
T
Alex Ott 29ffc276f3 Allow user to start work from DMs. (#267)
* merge upstream/main

* update permissions check for guild settings

* add error handler for the bot

* allow users to start work from DMs and broadcast task completion messages to all log channels

* remove print statement
2023-01-03 10:31:33 +00:00

18 lines
647 B
Python

"""Configuration for the bot."""
from pydantic import BaseSettings, Field
class Settings(BaseSettings):
"""Settings for the bot."""
bot_token: str = Field(env="BOT_TOKEN", default="")
declare_global_commands: int = Field(env="DECLARE_GLOBAL_COMMANDS", default=0)
owner_ids: list[int] = Field(env="OWNER_IDS", default_factory=list)
prefix: str = Field(env="PREFIX", default="/")
oasst_api_url: str = Field(env="OASST_API_URL", default="http://localhost:8080")
oasst_api_key: str = Field(env="OASST_API_KEY", default="")
class Config(BaseSettings.Config):
env_file = ".env"
case_sensitive = False