Comments (4)
Hello and thanks for using this module! May I know how's the code? It'll help a lot to troubleshoot this problem. Thanks.
from discord-paginationembed.
Hi there, I am using it for my help command
var help1 = new Discord.RichEmbed()
.addField(`${prefix}meme`, `Sends a random meme related to The Trio`)
.addField(`${prefix}BadBoyHalo`, `Sends a random meme related to BadBoyHalo`)
.addField(`${prefix}braincells`, `Sends the number of your braincells`)
.addField(`${prefix}Candad`, `Sends information about Candad`)
.addField(`${prefix}chicken`, `Sends a random picture of a chicken`)
.addField(`${prefix}pinecone`, `pinecone`)
.addField(`${prefix}ping`, `Gives the ping of the bot`)
.addField(`${prefix}pingspoof`, `I think you know what this is`)
.addField(`${prefix}sotp`, `sotp`)
.addField(`${prefix}say`, `Make Skeppy say whatever you want!`)
.addField(`${prefix}latest video`, `Shows the latest video of the channel you specify!`)
.addField(`${prefix}latest tweet`, `Shows skeppy's latest tweet`)
new Pagination.Embeds()
.setArray([help1])
.setDeleteOnTimeout(true)
.setAuthorizedUsers([message.author.id])
.setChannel(message.channel)
.setPageIndicator(true)
.setElementsPerPage(1)
.setThumbnail("https://pbs.twimg.com/profile_images/1182235859036332033/bkU06kE__400x400.jpg")
.setFooter("Made by TheChicken#5845")
.setURL('https://github.com/thechicken14/skeppy-bot')
.setColor(4285916)
.build();
from discord-paginationembed.
From what I see, you're trying to paginate each field in help1
. While your choice of mode (Embeds mode) is perfect for this case, the way you wrote it is quite wrong.
setElementsPerPage
method is only for FieldsEmbed mode (this should not be suggested by your IDE while using Embeds modeβ that is if you're using an IDE) because Embeds mode does display a RichEmbed instance per page already.
As for the fields in that single RichEmbed instance, I'd like to recommend to create an instance of RichEmbed per field to make it work like you wanted (according to what I can read from the source code) and proper for Embeds mode. For example:
// Make an array of RichEmbed instances and per instance add the field, via Array.prototype.map()
const commands = [
[ `${prefix}meme`, `Sends a random meme related to The Trio` ],
[ `${prefix}BadBoyHalo`, `Sends a random meme related to BadBoyHalo` ]
].map(field => new Discord.RichEmbed().addField(field[0], field[1]));
// Applying it to Embeds mode
const Embeds = new Pagination.Embeds()
.setArray(commands)
.setDeleteOnTimeout(true)
.setAuthorizedUsers([message.author.id])
.setChannel(message.channel)
.setPageIndicator(true)
.setThumbnail("https://pbs.twimg.com/profile_images/1182235859036332033/bkU06kE__400x400.jpg")
.setFooter("Made by TheChicken#5845")
.setURL('https://github.com/thechicken14/skeppy-bot')
.setColor(4285916);
Embeds.build();
from discord-paginationembed.
Assuming issue solved.
from discord-paginationembed.
Related Issues (20)
- Why is there only a way to delete function emojis?
- Get message object? HOT 3
- Jump message edit Error HOT 5
- Embed Data stacks HOT 1
- Embed is not showing HOT 6
- I dont know how to add our help command pages of different categories in pages,page-1:info commands,page-2:mod commands...i want to set like this please help me to set an array with description
- I do not know how to change thumbnails for each page, can someone help me out on this? HOT 1
- UnhandledPromiseRejectionWarning: TypeError: Right-hand side of 'instanceof' is not an object HOT 1
- Cannot use custom server emojis in setNavigationEmojis() HOT 6
- Cannot use Homogeneous Arrays HOT 3
- Option for error message in jumping pages by input
- Disabling jump navigation emoji isn't enough to send paginated embed without MANAGE_MESSAGES HOT 4
- Emoji Reactions not responding HOT 1
- addFields() bug!?
- error TS2611: 'pages' is defined as a property HOT 1
- this.clientAssets.prompt.replace is not a function HOT 1
- Change the jump message HOT 1
- weird display bug ?? HOT 1
- FieldsEmbed Mode Not Working at DJSv13 HOT 2
- discord v13
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from discord-paginationembed.