1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-23 19:44:20 +00:00

publish: 5.7.1

This commit is contained in:
Steffo 2020-04-08 20:50:37 +02:00
parent 777a262791
commit cdb88ac1ee
3 changed files with 8 additions and 10 deletions

View file

@ -5,7 +5,7 @@
[tool.poetry] [tool.poetry]
name = "royalnet" name = "royalnet"
version = "5.7.0" version = "5.7.1"
description = "A multipurpose bot and web framework" description = "A multipurpose bot and web framework"
authors = ["Stefano Pigozzi <ste.pigozzi@gmail.com>"] authors = ["Stefano Pigozzi <ste.pigozzi@gmail.com>"]
license = "AGPL-3.0+" license = "AGPL-3.0+"

View file

@ -163,14 +163,6 @@ class TelegramSerf(Serf):
for uid in key_uids: for uid in key_uids:
data.unregister_keyboard_key(uid) 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 return TelegramMessageData
def callback_data_factory(self) -> Type[rc.CommandData]: 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) data: rc.CommandData = self.CallbackData(interface=key.interface, loop=self.loop, cbq=cbq)
await self.press(key, data) 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): async def run(self):
await super().run() await super().run()
while True: while True:

View file

@ -1 +1 @@
semantic = "5.7.0" semantic = "5.7.1"