From 017c278b440647befac0930b748e1c9b07eef3bc Mon Sep 17 00:00:00 2001 From: Aleksei Krugliak Date: Fri, 1 Apr 2022 23:15:05 +0400 Subject: [PATCH] Prepare to bot creation #1 --- .env.dist | 6 ------ handlers/errors/error_handler.py | 1 - requirements.txt | 2 +- utils/notify_admins.py | 2 +- utils/set_bot_commands.py | 4 ++-- 5 files changed, 4 insertions(+), 11 deletions(-) delete mode 100644 .env.dist diff --git a/.env.dist b/.env.dist deleted file mode 100644 index e8807d4..0000000 --- a/.env.dist +++ /dev/null @@ -1,6 +0,0 @@ -# ЭТО ПРИМЕР ФАЙЛА .env !! ВАМ НАДО ЭТОТ ФАЙЛ ПЕРЕИМЕНОВАТЬ И ВСТАВИТЬ ТУДА ЗНАЧЕНИЯ. -# ЭТИ КОММЕНТАРИИ НАДО УДАЛИТЬ! - -ADMINS=12345678,12345677,12345676 -BOT_TOKEN=123452345243:Asdfasdfasf -ip=localhost diff --git a/handlers/errors/error_handler.py b/handlers/errors/error_handler.py index 761ebd2..d1b6aa1 100644 --- a/handlers/errors/error_handler.py +++ b/handlers/errors/error_handler.py @@ -17,7 +17,6 @@ async def errors_handler(update, exception): :return: stdout logging """ - if isinstance(exception, MessageNotModified): logging.exception('Message is not modified') # do something here? diff --git a/requirements.txt b/requirements.txt index ee44160..0350ad5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ aiogram<3.0 -environs~=8.0.0 \ No newline at end of file +environs==9.5.0 \ No newline at end of file diff --git a/utils/notify_admins.py b/utils/notify_admins.py index 97e1309..3bcdd6d 100644 --- a/utils/notify_admins.py +++ b/utils/notify_admins.py @@ -8,7 +8,7 @@ from data.config import ADMINS async def on_startup_notify(dp: Dispatcher): for admin in ADMINS: try: - await dp.bot.send_message(admin, "Бот Запущен") + await dp.bot.send_message(admin, "Voodoo21-expense started") except Exception as err: logging.exception(err) diff --git a/utils/set_bot_commands.py b/utils/set_bot_commands.py index d9143e3..30f28ed 100644 --- a/utils/set_bot_commands.py +++ b/utils/set_bot_commands.py @@ -4,7 +4,7 @@ from aiogram import types async def set_default_commands(dp): await dp.bot.set_my_commands( [ - types.BotCommand("start", "Запустить бота"), - types.BotCommand("help", "Вывести справку"), + types.BotCommand("start", "Start bot."), + types.BotCommand("help", "Help."), ] )