From 0af96829ddb8379218e167f3e6646fdce24401ad Mon Sep 17 00:00:00 2001 From: Aleksandr Antciferov Date: Sun, 2 Jul 2023 00:30:13 +0200 Subject: [PATCH] reapply upgrades, remove confusing settings from toml, rename tg token --- README.md | 2 +- dasbot.py | 2 +- requirements.txt | 6 +++--- settings.toml | 2 -- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index d829f22..5f345e4 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ https://wetterkrank.github.io/dasbot/ ## How to run - Clone the repo -- Set the env variable `DYNACONF_TOKEN="your_Telegram_bot_token"` (can use .env file) +- Set the env variable `DYNACONF_TELEGRAM_TOKEN="your_Telegram_bot_token"` (can use .env file) - Create and activate a virtual environment: `python3 -m venv .venv && source ./.venv/bin/activate` - Install dependencies: `pip install -r requirements.txt` diff --git a/dasbot.py b/dasbot.py index 1728fb9..ca23aab 100644 --- a/dasbot.py +++ b/dasbot.py @@ -29,7 +29,7 @@ if __name__ == '__main__': # Initialize bot & dispatcher - bot = Bot(token=settings.TOKEN) + bot = Bot(token=settings.TELEGRAM_TOKEN) dp = Dispatcher(bot) # /help command handler diff --git a/requirements.txt b/requirements.txt index 0cd334d..add0c8f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,9 +1,9 @@ -aiogram>=2.21 -aiohttp>=3.8.1 +aiogram>=2.25 +aiohttp>=3.8.1,<3.9.0 aiounittest>=1.4.2 dynaconf>=3.1.9 marshmallow>=3.17.0 mongomock>=4.1.2 pymongo>=4.2.0 -pytz>=2022.1 +pytz>=2023.1 watchdog[watchmedo]>=2.1.6 diff --git a/settings.toml b/settings.toml index 989f79e..c63f1ef 100644 --- a/settings.toml +++ b/settings.toml @@ -4,12 +4,10 @@ db_name = 'dasbot' [development] mode = 'polling' -db_address = 'mongodb://127.0.0.1:27017/' broadcast = false debug = true [production] mode = 'webhook' -db_address = 'mongodb://mongo:27017/' broadcast = true debug = false