1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-27 13:34:28 +00:00

Fix update -> message bugs

This commit is contained in:
Steffo 2020-01-20 19:04:59 +01:00
parent 81a8f791fa
commit 6623853a8d
3 changed files with 6 additions and 8 deletions

View file

@ -9,8 +9,7 @@ class CiaoruoziCommand(Command):
async def run(self, args: CommandArgs, data: CommandData) -> None:
if self.interface.name == "telegram":
update: telegram.Update = data.update
user: telegram.User = update.effective_user
user: telegram.User = data.message.from_user
# Se sei Ruozi, salutati da solo!
if user.id == 112437036:
await data.reply("👋 Ciao me!")

View file

@ -38,8 +38,7 @@ class DiarioCommand(Command):
async def run(self, args: CommandArgs, data: CommandData) -> None:
if self.interface.name == "telegram":
update: telegram.Update = data.update
message: telegram.Message = update.message
message: telegram.Message = data.message
reply: telegram.Message = message.reply_to_message
creator = await data.get_author()
# noinspection PyUnusedLocal