diff --git a/src/bot/bot.py b/src/bot/bot.py index e5528d2..14da03f 100644 --- a/src/bot/bot.py +++ b/src/bot/bot.py @@ -14,15 +14,15 @@ class Bot(): def __init__(self, session_file: str, config_file: str, - api_id: str, - api_hash: int, + api_id: int, + api_hash: str, owner_id: int) -> None: self.__config_file = config_file self.__config = None self.__me = None self.__owner_id = owner_id self.__reload() - self.__bot = TelegramClient(session_file, api_id, api_hash) + self.__bot = TelegramClient(session=session_file, api_id=api_id, api_hash=api_hash) self.__weather_queue = Queue() @self.__bot.on(events.NewMessage(incoming=True, pattern='!whoami')) diff --git a/src/main.py b/src/main.py index 73feda5..e8cd135 100644 --- a/src/main.py +++ b/src/main.py @@ -18,12 +18,14 @@ tz_msk = dt.timezone(offset=delta, name="MSK") if __name__ == "__main__": session_file = os.environ['SESSION_FILE'] - api_id = os.environ['TG_APP_ID'] + app_id = int(os.environ['TG_APP_ID']) api_hash = os.environ['TG_APP_HASH'] owner_id = int(os.environ['TG_OWNER_ID']) config_file = os.environ['CONFIG_FILE'] + logger.info(f"SESSION_FILE: {session_file}") + logger.info(f"CONFIG_FILE: {config_file}") bot = Bot(session_file=session_file, - api_id=api_id, + api_id=app_id, api_hash=api_hash, config_file=config_file, owner_id=owner_id) diff --git a/version b/version index f8112eb..25cd22b 100644 --- a/version +++ b/version @@ -1 +1 @@ -0.2.11 \ No newline at end of file +0.2.12 \ No newline at end of file