Fix abandonall

This commit is contained in:
Snazzah 2021-06-10 20:00:20 -05:00
parent c7b0e60790
commit 2b79705d27
No known key found for this signature in database
GPG key ID: 5E71D54F3D86282E
2 changed files with 2 additions and 2 deletions

View file

@ -37,7 +37,7 @@ module.exports = class AbaondonAll extends Command {
header: 'Are you sure you want to abandon **all supports** from **all accounts**?' header: 'Are you sure you want to abandon **all supports** from **all accounts**?'
})) return; })) return;
await this.client.startTyping(message.channel); await this.client.startTyping(message.channel);
await Util.LBRY.syncPairs(); await Util.LBRY.syncPairs(this.client);
const pairs = await this.client.sqlite.getAll(); const pairs = await this.client.sqlite.getAll();
let count = 0; let count = 0;
for (let i = 0, len = pairs.length; i < len; i++) { for (let i = 0, len = pairs.length; i < len; i++) {

View file

@ -10,7 +10,7 @@ module.exports = class ListAll extends Command {
async exec(message) { async exec(message) {
const pairs = await this.client.sqlite.getAll(); const pairs = await this.client.sqlite.getAll();
if (pairs <= 0) if (pairs <= 0)
return message.channel.createMessage('No pairs found in the database.'); return message.channel.createMessage('No users found in the database.');
for (const pair of pairs) { for (const pair of pairs) {
const response = await this.client.lbry.accountBalance(pair.lbryID); const response = await this.client.lbry.accountBalance(pair.lbryID);