From 231bd32173ec9f3af85450c88468ded8d4a12090 Mon Sep 17 00:00:00 2001 From: Tim-Oliver Husser Date: Wed, 20 Sep 2023 20:59:03 +0200 Subject: [PATCH 1/2] fixed bug --- pyobs/modules/utils/telegram.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pyobs/modules/utils/telegram.py b/pyobs/modules/utils/telegram.py index bf459124..3ba47a12 100644 --- a/pyobs/modules/utils/telegram.py +++ b/pyobs/modules/utils/telegram.py @@ -66,7 +66,6 @@ async def open(self) -> None: # get dispatcher self._application = Application.builder().token("TOKEN").build() - dispatcher = self._updater.dispatcher # type: ignore # add command handler self._application.add_handler(CommandHandler("start", self._command_start)) @@ -83,9 +82,9 @@ async def open(self) -> None: # load storage file try: - dispatcher.bot_data["storage"] = await self.vfs.read_yaml("/pyobs/telegram.yaml") + self._application.bot_data["storage"] = await self.vfs.read_yaml("/pyobs/telegram.yaml") except FileNotFoundError: - dispatcher.bot_data["storage"] = {} + self._application.bot_data["storage"] = {} # start polling self._application.start_polling(poll_interval=0.1) @@ -509,7 +508,7 @@ async def _process_log_entry(self, entry: Event, sender: str) -> bool: # get storage if self._application is None: raise ValueError("No update initialised.") - s = self._updater.dispatcher.bot_data["storage"] # type: ignore + s = self._application.bot_data["storage"] # type: ignore # loop users for user_id, user in s["users"].items(): From dd9c452cec08f7ff9f53c6a758cb61ba66f29f2a Mon Sep 17 00:00:00 2001 From: Tim-Oliver Husser Date: Wed, 20 Sep 2023 20:59:10 +0200 Subject: [PATCH 2/2] v1.5.4 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index afd951b8..c8346561 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [tool.poetry] name = "pyobs-core" packages = [{ include = "pyobs" }] -version = "1.5.3" +version = "1.5.4" description = "robotic telescope software" authors = ["Tim-Oliver Husser "] license = "MIT"