diff --git a/app/config/main.py b/app/config/main.py index 936d67e..91069a2 100644 --- a/app/config/main.py +++ b/app/config/main.py @@ -40,7 +40,6 @@ def load_config(config_dir: Path = None) -> Config: bot_token=_bot_token, superusers=frozenset(config_file_data["superusers"]), log=log_config, - dump_chat_id=config_file_data["dump_chat_id"], tg_client=load_tg_client_config( config_file_data["tg_client_config"] | {"bot_token": _bot_token} ), diff --git a/app/handlers/superuser.py b/app/handlers/superuser.py index ee86deb..e84df21 100644 --- a/app/handlers/superuser.py +++ b/app/handlers/superuser.py @@ -3,7 +3,7 @@ from aiogram import Bot, Router from aiogram.filters import Command -from aiogram.types import BufferedInputFile, Message +from aiogram.types import Message from app.models.config import Config @@ -20,13 +20,6 @@ async def leave_chat(message: Message, bot: Bot): await bot.leave_chat(message.chat.id) -async def get_dump(_: Message, config: Config, bot: Bot): - with open(config.db.db_path, "rb") as f: - await bot.send_document( - config.dump_chat_id, BufferedInputFile(f.read(), "karma.db") - ) - - async def show_tagged_users(message: Message): result = "" for e in message.reply_to_message.entities: @@ -44,7 +37,6 @@ def setup_superuser(bot_config: Config) -> Router: router.message.register(exception, Command(commands="exception")) router.message.register(leave_chat, Command(commands="get_out")) - router.message.register(get_dump, Command(commands="dump")) router.message.register( show_tagged_users, Command(commands="entities", prefix="!/") ) diff --git a/app/models/config/__init__.py b/app/models/config/__init__.py index 566f2f5..d7bbb7e 100644 --- a/app/models/config/__init__.py +++ b/app/models/config/__init__.py @@ -19,7 +19,6 @@ class Config: bot_token: str superusers: Iterable[int] log: LogConfig - dump_chat_id: int tg_client: TgClientConfig storage: StorageConfig date_format: str = "%d.%m.%Y" diff --git a/docker-compose.yaml b/docker-compose.yaml index e675e87..e0ade87 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -29,7 +29,7 @@ services: POSTGRES_USER: $POSTGRES_USER POSTGRES_DB: $POSTGRES_DB volumes: - - postgres.data:/var/lib/postgresql/users:rw + - postgres.data:/var/lib/postgresql/data:rw healthcheck: test: ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"] interval: 10s