diff --git a/royalnet/bots/telegram.py b/royalnet/bots/telegram.py index 5f7a070b..e82aa716 100644 --- a/royalnet/bots/telegram.py +++ b/royalnet/bots/telegram.py @@ -81,7 +81,7 @@ class TelegramBot: # Skip inexistent commands command = self.missing_command # Call the command - return await self.Call(message.chat, command, *parameters).run() + return await self.Call(message.chat, command, *parameters, update=update).run() async def handle_net_request(self, message: Message): pass diff --git a/royalnet/commands/ciaoruozi.py b/royalnet/commands/ciaoruozi.py new file mode 100644 index 00000000..4c6d0f13 --- /dev/null +++ b/royalnet/commands/ciaoruozi.py @@ -0,0 +1,16 @@ +from ..utils import Command, CommandArgs, Call +from telegram import Update, User + + +class CiaoruoziCommand(Command): + + command_name = "ciaoruozi" + command_title = "Saluta Ruozi, anche se non è più in RYG." + + async def telegram(self, call: Call, args: CommandArgs): + update: Update = args.kwargs["update"] + user: User = update.effective_user + if user.id == 112437036: + await call.reply("Ciao me!") + else: + await call.reply("Ciao Ruozi!")