mirror of
https://github.com/wassname/Open-Assistant.git
synced 2026-06-27 16:10:30 +08:00
29ffc276f3
* 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
18 lines
647 B
Python
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
|