From 9506658b43076bf7b0c6188e9606da719aa1d045 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Tue, 20 Apr 2021 01:37:06 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20/whoami:=20Display=20user,=20not?= =?UTF-8?q?=20account?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- royalpack/commands/whoami.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/royalpack/commands/whoami.py b/royalpack/commands/whoami.py index cef27165..c3f281b0 100644 --- a/royalpack/commands/whoami.py +++ b/royalpack/commands/whoami.py @@ -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",)