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

#1 Add /balance command

This commit is contained in:
Steffo 2021-04-20 02:47:31 +02:00
parent 15c92160c1
commit 1f33a170b8
Signed by: steffo
GPG key ID: 6965406171929D01
4 changed files with 21 additions and 3 deletions

6
poetry.lock generated
View file

@ -331,7 +331,7 @@ royalnet = ">=6.5.0,<6.6.0"
[[package]] [[package]]
name = "royalnet-telethon" name = "royalnet-telethon"
version = "2.0.0" version = "2.1.0"
description = "A Telethon-based frontend for the royalnet.engineer module." description = "A Telethon-based frontend for the royalnet.engineer module."
category = "main" category = "main"
optional = false optional = false
@ -902,8 +902,8 @@ royalnet-console = [
{file = "royalnet_console-2.0.4-py3-none-any.whl", hash = "sha256:b1e7be36f24e76c6eb1f298b5fbdd3902ae62d280ecac2b9d8afefeedf7d2b38"}, {file = "royalnet_console-2.0.4-py3-none-any.whl", hash = "sha256:b1e7be36f24e76c6eb1f298b5fbdd3902ae62d280ecac2b9d8afefeedf7d2b38"},
] ]
royalnet-telethon = [ royalnet-telethon = [
{file = "royalnet-telethon-2.0.0.tar.gz", hash = "sha256:aa914b68d0f1034cd1c3ab33317e1c4d7a0fdbee4ed62a6f6158982cff3930c7"}, {file = "royalnet-telethon-2.1.0.tar.gz", hash = "sha256:c0d6842106bd2ec963a64069c2be629fe9b722715da48ced06a14be177ed654d"},
{file = "royalnet_telethon-2.0.0-py3-none-any.whl", hash = "sha256:ef14bdbda096627409c2bf667aeecef76ae4d044ec8acb4e994d63c76f82bc90"}, {file = "royalnet_telethon-2.1.0-py3-none-any.whl", hash = "sha256:94bc518881607a5bdedef69e64b990e2de2a6fca09e9b185a96b1e89b44fa3fc"},
] ]
royalspells = [ royalspells = [
{file = "royalspells-3.2.tar.gz", hash = "sha256:2bd4a9a66514532e35c02c3907425af48c7cb292364c4843c795719a82b25dfe"}, {file = "royalspells-3.2.tar.gz", hash = "sha256:2bd4a9a66514532e35c02c3907425af48c7cb292364c4843c795719a82b25dfe"},

View file

@ -57,6 +57,7 @@ register_telegram(commands.smecds, ["smecds"])
register_telegram(commands.man, ["man", "help"], "(?P<commandname>[A-Za-z]+)") register_telegram(commands.man, ["man", "help"], "(?P<commandname>[A-Za-z]+)")
register_telegram(commands.login, ["login"]) register_telegram(commands.login, ["login"])
register_telegram(commands.whoami, ["whoami"]) register_telegram(commands.whoami, ["whoami"])
register_telegram(commands.balance, ["balance"])
pda.implementations["telethon.1"].register_conversation(r) pda.implementations["telethon.1"].register_conversation(r)

View file

@ -14,3 +14,4 @@ from .smecds import *
from .man import * from .man import *
from .login import * from .login import *
from .whoami import * from .whoami import *
from .balance import *

View file

@ -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",)