diff --git a/pyproject.toml b/pyproject.toml index a235b5ce..a2896fd8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ [tool.poetry] name = "royalnet" - version = "5.7.0" + version = "5.7.1" description = "A multipurpose bot and web framework" authors = ["Stefano Pigozzi "] license = "AGPL-3.0+" diff --git a/royalnet/serf/telegram/telegramserf.py b/royalnet/serf/telegram/telegramserf.py index 9b956920..e3f2168a 100644 --- a/royalnet/serf/telegram/telegramserf.py +++ b/royalnet/serf/telegram/telegramserf.py @@ -163,14 +163,6 @@ class TelegramSerf(Serf): for uid in key_uids: data.unregister_keyboard_key(uid) - @classmethod - def register_keyboard_key(cls, identifier: str, key: rc.KeyboardKey): - self.key_callbacks[identifier] = key - - @classmethod - def unregister_keyboard_key(cls, identifier: str): - del self.key_callbacks[identifier] - return TelegramMessageData def callback_data_factory(self) -> Type[rc.CommandData]: @@ -268,6 +260,12 @@ class TelegramSerf(Serf): data: rc.CommandData = self.CallbackData(interface=key.interface, loop=self.loop, cbq=cbq) await self.press(key, data) + def register_keyboard_key(self, identifier: str, key: rc.KeyboardKey): + self.key_callbacks[identifier] = key + + def unregister_keyboard_key(self, identifier: str): + del self.key_callbacks[identifier] + async def run(self): await super().run() while True: diff --git a/royalnet/version.py b/royalnet/version.py index 56feeb31..d25d2258 100644 --- a/royalnet/version.py +++ b/royalnet/version.py @@ -1 +1 @@ -semantic = "5.7.0" +semantic = "5.7.1"