mirror of
https://github.com/LBRYFoundation/curate.git
synced 2025-08-23 17:37:25 +00:00
Fix paginator
This commit is contained in:
parent
751b1b2fbc
commit
4532f9a71e
2 changed files with 8 additions and 4 deletions
|
@ -7,7 +7,7 @@ module.exports = class ListAll extends Command {
|
|||
permissions: ['admin'],
|
||||
minimumArgs: 0
|
||||
}; }
|
||||
async exec(message) {
|
||||
async exec(message, { args }) {
|
||||
const pairs = await this.client.sqlite.getAll();
|
||||
if (pairs.length <= 0)
|
||||
return message.channel.createMessage('No users found in the database.');
|
||||
|
@ -35,6 +35,10 @@ module.exports = class ListAll extends Command {
|
|||
? `${pair.wallet_available} available, ${pair.wallet_reserve} staked.`
|
||||
: 'Wallet Unavailable'}\n`
|
||||
});
|
||||
|
||||
if (args[0])
|
||||
paginator.toPage(args[0]);
|
||||
|
||||
return paginator.start(message.channel.id, message.author.id);
|
||||
}
|
||||
get metadata() { return {
|
||||
|
|
|
@ -40,11 +40,11 @@ module.exports = class Events {
|
|||
}
|
||||
}
|
||||
|
||||
onReaction(message, emoji, userID) {
|
||||
const id = `${message.id}:${userID}`;
|
||||
onReaction(message, emoji, member) {
|
||||
const id = `${message.id}:${member.id}`;
|
||||
if (this.client.messageAwaiter.reactionCollectors.has(id)) {
|
||||
const collector = this.client.messageAwaiter.reactionCollectors.get(id);
|
||||
collector._onReaction(emoji, userID);
|
||||
collector._onReaction(emoji, member.id);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue