1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-23 19:44:20 +00:00
royalnet/royalpack/commands/ciao.py

28 lines
970 B
Python
Raw Normal View History

2021-04-15 00:40:51 +00:00
import royalnet.engineer as engi
2021-04-17 02:19:11 +00:00
import royalnet.engineer.conversation as c
2021-04-15 00:40:51 +00:00
2021-04-17 02:19:11 +00:00
@engi.TeleportingConversation
2021-04-15 00:40:51 +00:00
async def ciao(*, _sentry: engi.Sentry, _msg: engi.Message, **__):
await _msg.reply(text="👋 Ciao, chi sei?")
answer: engi.MessageReceived = await _sentry.filter(engi.Type(engi.MessageReceived)).get()
_msg: engi.Message = await answer.message
_text: str = await _msg.text
await _msg.reply(text=f"👋 Ciao {_text}! Come stai?")
answer: engi.MessageReceived = await _sentry.filter(engi.Type(engi.MessageReceived)).get()
_msg: engi.Message = await answer.message
_text: str = await _msg.text
if "mamma" in _text or "madre" in _text:
await _msg.reply(text=f"😐 Ehi... Al massimo sono io quello che sta {_text}!")
elif "male" in _text:
await _msg.reply(text=f"☹️ Mi dispiace che tu stia {_text}... :(")
else:
await _msg.reply(text=f"🙂 Anche io sto {_text} :)")
__all__ = ("ciao",)