Bot become a Community Guard & Post send manager
added: dictionary support for censore message/user management with dict triggers
This commit is contained in:
@@ -5,6 +5,7 @@ from dataclasses import dataclass
|
||||
class Config:
|
||||
bot_token: str
|
||||
database_url: str
|
||||
metrics_port: int = 8000
|
||||
log_level: str = os.getenv("LOG_LEVEL", "INFO")
|
||||
|
||||
def load_config() -> "Config":
|
||||
@@ -20,4 +21,5 @@ def load_config() -> "Config":
|
||||
user = os.getenv("DB_USER", "postgres")
|
||||
pwd = os.getenv("DB_PASSWORD", "postgres")
|
||||
db_url = f"postgresql+psycopg://{user}:{pwd}@{host}:{port}/{name}"
|
||||
return Config(bot_token=bot_token, database_url=db_url)
|
||||
metric_port = int(os.getenv("METRICS_PORT", 9010))
|
||||
return Config(bot_token=bot_token, database_url=db_url, metrics_port=metric_port)
|
||||
Reference in New Issue
Block a user