Add buffer time

This commit is contained in:
Snazzah 2021-06-10 21:22:36 -05:00
parent 703eb02705
commit 1b12d7be7e
No known key found for this signature in database
GPG key ID: 5E71D54F3D86282E

View file

@ -28,6 +28,7 @@ module.exports = class FundAll extends Command {
pairs.push({ discordID: member.id, lbryID: account.accountID });
}
}
await Util.halt(5000);
this.client.stopTyping(message.channel);
}
@ -41,6 +42,7 @@ module.exports = class FundAll extends Command {
errored = 0;
for (const pair of pairs) {
const response = await this.client.lbry.fundAccount({ to: pair.lbryID, amount: givenAmount });
await Util.halt(2000);
const transaction = await response.json();
if ('code' in transaction) {
console.info('Failed to fund account', pair.lbryID, transaction.code, transaction.message);
@ -51,6 +53,7 @@ module.exports = class FundAll extends Command {
resultLines.push(`${pair.discordID} - https://explorer.lbry.com/tx/${transaction.result.txid}`);
funded++;
}
await Util.halt(2000);
}
this.client.stopTyping(message.channel);
return message.channel.createMessage(errored