2020-05-10 22:46:12 +00:00
|
|
|
from typing import *
|
2019-11-11 08:56:08 +00:00
|
|
|
import telegram
|
2020-08-20 01:20:53 +00:00
|
|
|
import royalnet.commands as rc
|
|
|
|
import royalnet.serf.telegram as rst
|
2019-11-11 08:56:08 +00:00
|
|
|
|
|
|
|
|
2020-08-20 01:20:53 +00:00
|
|
|
class CiaoruoziCommand(rc.Command):
|
2019-11-11 08:56:08 +00:00
|
|
|
name: str = "ciaoruozi"
|
|
|
|
|
2020-05-13 22:11:48 +00:00
|
|
|
description: str = "Saluta Ruozi, un leggendario essere che è tornato in Royal Games."
|
2019-11-11 08:56:08 +00:00
|
|
|
|
2020-08-20 01:20:53 +00:00
|
|
|
async def run(self, args: rc.CommandArgs, data: rc.CommandData) -> None:
|
|
|
|
if isinstance(self.serf, rst.TelegramSerf):
|
2020-01-20 18:04:59 +00:00
|
|
|
user: telegram.User = data.message.from_user
|
2019-11-28 01:30:40 +00:00
|
|
|
# Se sei Ruozi, salutati da solo!
|
2019-11-11 08:56:08 +00:00
|
|
|
if user.id == 112437036:
|
|
|
|
await data.reply("👋 Ciao me!")
|
|
|
|
return
|
|
|
|
await data.reply("👋 Ciao Ruozi!")
|