print the error to console

This commit is contained in:
Niko Storni 2020-08-25 19:22:11 +02:00
parent f41801c96e
commit c6c5e0bc69

View file

@ -134,6 +134,7 @@ function doHelp(message, helpmsg) {
function doBalance(message, tipper) {
lbry.getBalance(tipper, 1, function(err, balance) {
if (err) {
console.error(err);
message.reply('Error getting balance.').then(message => message.delete(5000));
} else {
message.reply(`You have *${balance}* LBC. This may not reflect recent balance changes. Please wait a couple minutes and try again.`);
@ -144,6 +145,7 @@ function doBalance(message, tipper) {
function doDeposit(message, tipper) {
getAddress(tipper, function(err, address) {
if (err) {
console.error(err);
message.reply('Error getting your deposit address.').then(message => message.delete(5000));
} else {
message.reply(`Your address is ${address}`);