diff --git a/poetry.lock b/poetry.lock index bf67f560..4b76ef9c 100644 --- a/poetry.lock +++ b/poetry.lock @@ -331,7 +331,7 @@ royalnet = ">=6.5.0,<6.6.0" [[package]] name = "royalnet-telethon" -version = "2.0.0" +version = "2.1.0" description = "A Telethon-based frontend for the royalnet.engineer module." category = "main" optional = false @@ -902,8 +902,8 @@ royalnet-console = [ {file = "royalnet_console-2.0.4-py3-none-any.whl", hash = "sha256:b1e7be36f24e76c6eb1f298b5fbdd3902ae62d280ecac2b9d8afefeedf7d2b38"}, ] royalnet-telethon = [ - {file = "royalnet-telethon-2.0.0.tar.gz", hash = "sha256:aa914b68d0f1034cd1c3ab33317e1c4d7a0fdbee4ed62a6f6158982cff3930c7"}, - {file = "royalnet_telethon-2.0.0-py3-none-any.whl", hash = "sha256:ef14bdbda096627409c2bf667aeecef76ae4d044ec8acb4e994d63c76f82bc90"}, + {file = "royalnet-telethon-2.1.0.tar.gz", hash = "sha256:c0d6842106bd2ec963a64069c2be629fe9b722715da48ced06a14be177ed654d"}, + {file = "royalnet_telethon-2.1.0-py3-none-any.whl", hash = "sha256:94bc518881607a5bdedef69e64b990e2de2a6fca09e9b185a96b1e89b44fa3fc"}, ] royalspells = [ {file = "royalspells-3.2.tar.gz", hash = "sha256:2bd4a9a66514532e35c02c3907425af48c7cb292364c4843c795719a82b25dfe"}, diff --git a/royalpack/__main__.py b/royalpack/__main__.py index e334763e..4eb5cb03 100644 --- a/royalpack/__main__.py +++ b/royalpack/__main__.py @@ -57,6 +57,7 @@ register_telegram(commands.smecds, ["smecds"]) register_telegram(commands.man, ["man", "help"], "(?P[A-Za-z]+)") register_telegram(commands.login, ["login"]) register_telegram(commands.whoami, ["whoami"]) +register_telegram(commands.balance, ["balance"]) pda.implementations["telethon.1"].register_conversation(r) diff --git a/royalpack/commands/__init__.py b/royalpack/commands/__init__.py index 502d49ed..e8f9f07e 100644 --- a/royalpack/commands/__init__.py +++ b/royalpack/commands/__init__.py @@ -14,3 +14,4 @@ from .smecds import * from .man import * from .login import * from .whoami import * +from .balance import * diff --git a/royalpack/commands/balance.py b/royalpack/commands/balance.py new file mode 100644 index 00000000..3e40bcde --- /dev/null +++ b/royalpack/commands/balance.py @@ -0,0 +1,16 @@ +import royalnet.engineer as engi +import royalpack.database as rd +import royalpack.bolts as rb + + +@engi.use_database(rd.lazy_session_class) +@rb.use_ryglogin(allow_anonymous=False) +@engi.TeleportingConversation +async def balance(*, _sentry: engi.Sentry, _msg: engi.Message, _user: rd.User, **__): + """ + Visualizza il tuo portafoglio di fiorygi. + """ + await _msg.reply(text=f"💰 Al momento, possiedi \uE01Bƒ {_user.fiorygi}\uE00B.") + + +__all__ = ("balance",)