1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-23 03:24:20 +00:00

🔧 /whoami: Display user, not account

This commit is contained in:
Steffo 2021-04-20 01:37:06 +02:00
parent 2671fa7f79
commit 9506658b43
Signed by: steffo
GPG key ID: 6965406171929D01

View file

@ -6,16 +6,16 @@ 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, _account, **__):
async def whoami(*, _msg: engi.Message, _user: db.User, **__):
"""
Scopri con che account sei loggato.
Scopri con che RYGaccount sei loggato.
"""
# TODO: improve output
if _account:
await _msg.reply(text=f"☀️ {_account}")
if _user:
await _msg.reply(text=f"☀️ {_user.name}")
else:
await _msg.reply(text="☁️ Non sei loggato.")
await _msg.reply(text="☁️ Non hai effettuato il login.")
__all__ = ("whoami",)