mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-23 19:44:20 +00:00
Fix update -> message bugs
This commit is contained in:
parent
81a8f791fa
commit
6623853a8d
3 changed files with 6 additions and 8 deletions
|
@ -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!")
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue