mirror of
https://git.wownero.com/lza_menace/tg-bot.git
synced 2024-08-15 00:23:12 +00:00
13 lines
507 B
Python
13 lines
507 B
Python
import logging
|
|
from tipbot import wownero
|
|
from tipbot import db
|
|
from tipbot.helpers.decorators import wallet_rpc_required, log_event, registration_required
|
|
|
|
|
|
@wallet_rpc_required
|
|
@registration_required
|
|
@log_event
|
|
def balance(update, context):
|
|
u = db.User.get(telegram_id=update.message.from_user['id'])
|
|
balances = wownero.Wallet().balances(account=u.account_index)
|
|
update.message.reply_text(f'Available balance for {u.telegram_user}: {float(balances[1])} WOW ({float(balances[0])} WOW locked)')
|