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
|
||||
|
|
|
@ -11,10 +11,10 @@ class RageCommand(Command):
|
|||
description: str = "Arrabbiati per qualcosa, come una software house californiana."
|
||||
|
||||
_MAD = ["MADDEN MADDEN MADDEN MADDEN",
|
||||
"EA bad, praise Geraldo!",
|
||||
"Stai sfogando la tua ira sul bot!",
|
||||
"Basta, io cambio gilda!",
|
||||
"Fondiamo la RRYG!"]
|
||||
"EA bad, praise Geraldo!",
|
||||
"Stai sfogando la tua ira sul bot!",
|
||||
"Basta, io cambio gilda!",
|
||||
"Fondiamo la RRYG!"]
|
||||
|
||||
async def run(self, args: CommandArgs, data: CommandData) -> None:
|
||||
await data.reply(f"😠 {random.sample(self._MAD, 1)[0]}")
|
||||
|
|
Loading…
Reference in a new issue