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

Add ciaoruozi command

This commit is contained in:
Steffo 2019-03-29 11:25:21 +01:00
parent 015d459791
commit c77ac7fbc3
2 changed files with 17 additions and 1 deletions

View file

@ -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

View file

@ -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!")