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:
parent
2671fa7f79
commit
9506658b43
1 changed files with 5 additions and 5 deletions
|
@ -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",)
|
||||
|
|
Loading…
Reference in a new issue