mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-08 14:13:02 -04:00
[fix] paginator editing works properly now
This commit is contained in:
parent
a68b840af7
commit
41721f941f
13 changed files with 32 additions and 37 deletions
|
@ -2,7 +2,7 @@ const { Constants } = require('detritus-client');
|
|||
const { paginator } = require('../../../../labscore/client');
|
||||
|
||||
const createEmbedMessage = (title, description) => ({
|
||||
embeds: [{ title, description }]
|
||||
embeds: [{ title, description }]
|
||||
});
|
||||
|
||||
module.exports = {
|
||||
|
@ -14,17 +14,15 @@ module.exports = {
|
|||
usage: 'page'
|
||||
},
|
||||
run: async (context) => {
|
||||
const message = context.message
|
||||
const message = context
|
||||
const pages = [
|
||||
createEmbedMessage("Page", "ddd"),
|
||||
createEmbedMessage("Page2", "eee"),
|
||||
createEmbedMessage("Page 3", "h")
|
||||
]
|
||||
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
|
||||
});
|
||||
context,
|
||||
pages
|
||||
});
|
||||
},
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue