Ararou - Is this smth fixable? It's never done thi...
Is this smth fixable? It's never done this before and I don't know whats causing it.
26 Replies
Use util.inspect on your errors to get more information about them
Other than that, how many fields are you adding?
It coming from addFields suggests to me you're exceeding the maximum field count
f (Array.isArray(Array2) && Array2.length) {
pages.setItems([
Array2.map
and im doing pages.setItemsPerPage(20);
pages.setIdle(120000);
pages.make();
Fields not items. Fields in the embed. Also that code means nothing.
the maxium of fields it should add before starting a new page is 20
pages.make()? So you're not using the base class of Paginated message.
ive been using pages.make() when i started out and never has had any issues
The base class is PaginatedMessage, not PaginatedMessageEmbedFields
Pretty sure @kaname-png wrote PaginatedMessageEmbedFields
Personally never used it
so should i just use the base class
The only difference is that PaginatedMessageEmbedFields only paginates the embed fields and doesn't let you change the title per page for example.
ah so its nearly the same
That's kind of the definition of a base and extension. It extends the base class.
and also yea i did util.inspect and it said
So yeah too many fields
If you're using an editor that shows intellisense when hovering over classes (I.e. vscode) then plenty of docs should show up when hovering over classes and methods.
so how do i set the template now using PaginatedMessage
Which includes examples
im not since i dont have a pc
Oh no don't tell me you're one of those people who codes on phone
At least use GitHub codespaces or vscode server if you do
You're really making it way way harder for yourself
i dont have enough money to get a pc so i have to use my phone + my old keyboard and mouse
Well then get used to browse the source code which also documents the examples https://github.com/sapphiredev/utilities/blob/7fb7d2c/packages/discord.js-utilities/src/lib/PaginatedMessages/PaginatedMessage.ts
(Our website would too if typedoc didn't suck and/or the rewrite would ever finish but I digress)
GitHub
utilities/PaginatedMessage.ts at 7fb7d2c2727c04d38fa428c4513b17784c...
Common JavaScript utilities for Sapphire Projects. Contribute to sapphiredev/utilities development by creating an account on GitHub.
im alr lookin at that lol
And there's also many sapphire bots that you can look at:
Discord bots that use @sapphire/[email protected] and leverage Application Commands and Interaction Handlers
- Official Bot Examples ᴱ ᴰ ᴶˢ
- Archangel ᴱ ᴰ
- Arima ᴱ
- Dragonite ᴱ ᴰ
- Nino ᴱ ᴰ
- Operator ᴱ ᴬ ᴰ
- Radon ᴱ ᴬ
- Sapphire Application Commands Examples ᴱ
- Spectera ᴬ
Discord bots that use @sapphire/framework v2
- Materia ᴱ
- RTByte ᴱ ᴬ
- Skyra ᴬ ᴰ
- YliasDiscordBot ᴬ
ᴱ: Uses ESM (if not specified then uses CJS)
ᴬ: Advanced bot (if not specified it is a simple bot, or not graded)
ᴰ: Uses Docker in production
ᴶˢ: Written in JavaScript. If not specified then the bot is written in TypeScript.
just idk why its not working now since my v13 source works well
Yep @Favna I think downgrading to v13 fixed it.
Now it actually paginates the embed.
V13 of djs? Yeah sapphire doesn't support v14 yet.
ya the alpha just breaks stuff ig