Skip to content

Commit

Permalink
Add report_award_cleanup_delfay to config
Browse files Browse the repository at this point in the history
  • Loading branch information
Desiders committed Nov 25, 2023
1 parent 41b1d78 commit ab00915
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/config/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@
from dotenv import load_dotenv

from app.models.config import Config, TgClientConfig

from .db import load_db_config
from .karmic_restriction import load_karmic_restriction_config
from .log import load_log_config
from .logging_config import logging_setup
from .storage import load_storage
from .webhook import load_webhook_config
from .logging_config import logging_setup


@lru_cache
Expand Down Expand Up @@ -40,5 +41,6 @@ def load_config(config_dir: Path = None) -> Config:
tg_client=TgClientConfig(bot_token=_bot_token),
storage=load_storage(config_file_data["storage"]),
report_karma_award=config_file_data.get("report_karma_award", 0),
report_award_cleanup_delay=config_file_data.get("report_award_cleanup_delay", 3600),
callback_query_answer_cache_time=config_file_data.get("callback_query_answer_cache_time", 3600)
)
1 change: 1 addition & 0 deletions app/models/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class Config:
time_to_cancel_actions: int = 60
time_to_remove_temp_messages: int = 30
report_karma_award: int = 0
report_award_cleanup_delay: int = 3600 # If time in seconds less than 1, then messages will not be deleted
callback_query_answer_cache_time: int = 3600


Expand Down

0 comments on commit ab00915

Please sign in to comment.