mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-08 22:23:03 -04:00
[core] fully migrate to InteractionPaginator
This commit is contained in:
parent
b1cc10c6ef
commit
eb0ba140f3
15 changed files with 176 additions and 303 deletions
|
@ -1,11 +1,6 @@
|
|||
const { Constants } = require('detritus-client');
|
||||
const { paginator } = require('../../../../labscore/client');
|
||||
|
||||
const reactions = {
|
||||
previousPage: "⬅️",
|
||||
nextPage: "➡️"
|
||||
};
|
||||
|
||||
const createEmbedMessage = (title, description) => ({
|
||||
embeds: [{ title, description }]
|
||||
});
|
||||
|
@ -25,13 +20,11 @@ module.exports = {
|
|||
createEmbedMessage("Page2", "eee"),
|
||||
createEmbedMessage("Page 3", "h")
|
||||
]
|
||||
const paging = await paginator.createReactionPaginator({
|
||||
const paging = await paginator.createPaginator({
|
||||
// message is the message the user has sent
|
||||
message,
|
||||
// pages is an array of pages (will be passed as parameter in Message#edit)
|
||||
pages,
|
||||
// reactions is an object that includes `previousPage` and `nextPage` emojis (defined above)
|
||||
reactions
|
||||
pages
|
||||
});
|
||||
},
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue