From 6088b9b0997d48c83feb0528985282e92b48f7fb Mon Sep 17 00:00:00 2001 From: Tim-Oliver Husser Date: Wed, 20 Sep 2023 21:11:20 +0200 Subject: [PATCH 1/2] fixed bug --- pyobs/modules/utils/telegram.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pyobs/modules/utils/telegram.py b/pyobs/modules/utils/telegram.py index 3ba47a12..3ed56618 100644 --- a/pyobs/modules/utils/telegram.py +++ b/pyobs/modules/utils/telegram.py @@ -65,7 +65,7 @@ async def open(self) -> None: self._loop = asyncio.get_running_loop() # get dispatcher - self._application = Application.builder().token("TOKEN").build() + self._application = Application.builder().token(self._token).build() # add command handler self._application.add_handler(CommandHandler("start", self._command_start)) @@ -87,7 +87,9 @@ async def open(self) -> None: self._application.bot_data["storage"] = {} # start polling - self._application.start_polling(poll_interval=0.1) + await self._application.initialize() + await self._application.updater.start_polling() + await self._application.start() # listen to log events await self.comm.register_event(LogEvent, self._process_log_entry) @@ -98,7 +100,9 @@ async def close(self) -> None: # stop telegram if self._application is not None: + await self._application.updater.stop() await self._application.stop() + await self._application.shutdown() async def _save_storage(self, context: CallbackContext) -> None: """Save storage file. From 9dbebd55fedcf1b09b69a3154b3740b1bde68315 Mon Sep 17 00:00:00 2001 From: Tim-Oliver Husser Date: Wed, 20 Sep 2023 21:11:34 +0200 Subject: [PATCH 2/2] v1.5.5 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c8346561..a910432a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [tool.poetry] name = "pyobs-core" packages = [{ include = "pyobs" }] -version = "1.5.4" +version = "1.5.5" description = "robotic telescope software" authors = ["Tim-Oliver Husser "] license = "MIT"