minor adjustments to admin command outputs and fn names

master
lza_menace 4 years ago
parent dba78b0f9f
commit 041cb9f93f

@ -13,11 +13,11 @@ def debug():
pass
@click.command()
def get_registered_users():
def get_users():
users = db.User.select()
wallet = wownero.Wallet()
for u in users:
click.echo(f'{u.account_index} - {u.telegram_id}')
click.echo(f'{u.telegram_user} ({u.telegram_id}) - wallet {u.account_index}')
@click.command()
@click.argument('account_index')
@ -26,12 +26,12 @@ def get_address(account_index):
click.echo(address)
@click.command()
def get_wallet_balances():
def get_balances():
wallet = wownero.Wallet()
accounts = wallet.accounts()
for acc in accounts:
balances = wallet.balances(account=acc)
click.echo(f'{acc} - {float(balances[0])} locked, {float(balances[1])} unlocked')
click.echo(f'wallet {acc} - {float(balances[0])} locked, {float(balances[1])} unlocked')
@click.command()
def generate_bot_help():
@ -41,10 +41,10 @@ def generate_bot_help():
click.echo(f'{cmd} - {commands.all_commands[cmd]["help"]}')
cli.add_command(debug)
cli.add_command(get_registered_users)
cli.add_command(get_users)
cli.add_command(get_address)
cli.add_command(generate_bot_help)
cli.add_command(get_wallet_balances)
cli.add_command(get_balances)
if __name__ == '__main__':
cli()