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

21 lines
531 B
Python
Raw Normal View History

2021-04-19 14:56:36 +00:00
import royalnet.engineer as engi
import royalpack.database as db
import royalpack.bolts as rb
@engi.use_database(db.lazy_session_class)
@rb.use_ryglogin(allow_anonymous=True)
@engi.TeleportingConversation
async def whoami(*, _msg: engi.Message, _user: db.User, **__):
2021-04-19 14:56:36 +00:00
"""
Scopri con che RYGaccount sei loggato.
2021-04-19 14:56:36 +00:00
"""
if _user:
2021-04-20 00:43:48 +00:00
await _msg.reply(text=f"☀️ Sei loggato come \uE01B{_user.name}\uE00B!")
2021-04-19 14:56:36 +00:00
else:
await _msg.reply(text="☁️ Non hai effettuato il login.")
2021-04-19 14:56:36 +00:00
__all__ = ("whoami",)