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.
K
kyra529d ago
Use util.inspect on your errors to get more information about them
F
Favna529d ago
Other than that, how many fields are you adding? It coming from addFields suggests to me you're exceeding the maximum field count
A
Ararou529d ago
f (Array.isArray(Array2) && Array2.length) { pages.setItems([ Array2.map and im doing pages.setItemsPerPage(20); pages.setIdle(120000); pages.make();
F
Favna529d ago
Fields not items. Fields in the embed. Also that code means nothing.
A
Ararou529d ago
the maxium of fields it should add before starting a new page is 20
F
Favna529d ago
pages.make()? So you're not using the base class of Paginated message.
A
Ararou529d ago
ive been using pages.make() when i started out and never has had any issues
F
Favna529d ago
The base class is PaginatedMessage, not PaginatedMessageEmbedFields Pretty sure @kaname-png wrote PaginatedMessageEmbedFields Personally never used it
A
Ararou529d ago
so should i just use the base class
F
Favna529d ago
The only difference is that PaginatedMessageEmbedFields only paginates the embed fields and doesn't let you change the title per page for example.
A
Ararou529d ago
ah so its nearly the same
F
Favna529d ago
That's kind of the definition of a base and extension. It extends the base class.
A
Ararou529d ago
and also yea i did util.inspect and it said
ExpectedConstraintError > s.number.lessThanOrEqual
Invalid number value

Expected: expected <= 25

Received:
| 26
ExpectedConstraintError > s.number.lessThanOrEqual
Invalid number value

Expected: expected <= 25

Received:
| 26
F
Favna529d ago
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.
A
Ararou529d ago
so how do i set the template now using PaginatedMessage
F
Favna529d ago
Which includes examples
A
Ararou529d ago
im not since i dont have a pc
F
Favna529d ago
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
A
Ararou529d ago
i dont have enough money to get a pc so i have to use my phone + my old keyboard and mouse
F
Favna529d ago
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.
A
Ararou529d ago
im alr lookin at that lol
F
Favna529d ago
And there's also many sapphire bots that you can look at:
S
Sapphire529d ago
Discord bots that use @sapphire/framework@3.0.0 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.
A
Ararou529d ago
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.
F
Favna529d ago
V13 of djs? Yeah sapphire doesn't support v14 yet.
A
Ararou529d ago
ya the alpha just breaks stuff ig
Want results from more Discord servers?
Add your server
More Posts
Fractune - Hello, I'd like to know why my `if` jum...Hello, I'd like to know why my `if` jumps straight to `else` while `!isNaN(parseInt(tags.slice(-1)[0Abdo Hosnie - it doesn't play anything (it doesn't play anything : (DelxHQ - Is there anyway I can defer all of my com...Is there anyway I can defer all of my commands?ShirayukiHaruka - **[Sapphire Logging]**Hello! I'...**[Sapphire Logging]** Hello! I've been using Sapphire for a while now, and wondering if there is a Ben855 - I can't seem to get slash subcommands wor...I can't seem to get slash subcommands working. I'm able to register them just fine but my chatInputRStealth - Any idea what's going on here?Any idea what's going on here?RVX - new to coding here. (very new) how do i un...new to coding here. (very new) how do i unregister a command? looks like registering a command an! 𝑱𝒂𝒎𝒆𝒔__ - Hello, I need help with my backup cod...Hello, I need help with my backup code. The rooms are created correctly but the categories are creatBigBrainAFK - So how does one interact with Forum ...So how does one interact with Forum channels in sapphireSlinky - Hello, I just started using the framework...Hello, I just started using the framework yesterday and currently having a issue trying to reset theHyperfire - How would i ago about adding custom fi...How would i ago about adding custom fields to commands? Like for example aliasespochiko - Hello! does anyone kno whow to fix this ...Hello! does anyone kno whow to fix this problem? ive been trying to figure out why for the past 30 mNitsua - Editing a previously ran slash command re...Editing a previously ran slash command results in an error. ``` Encountered error on chat input comwilluhmjs - ```jsValidationError s.string Exp...```js ValidationError > s.string Expected a string primitive Received: | undefined at Stsam - ```srcconfig.ts737 - error TS2345 Argum...``` src/config.ts:7:37 - error TS2345: Argument of type 'string' is not assignable to parameter of tRhys - ^Sort of related to above, does inheritance...^Sort of related to above, does inheritance work with commands? I've got a few commands for openinThatGuyJamal - Is it possible to make a default va...Is it possible to make a default value for registering command meta data. Like: ``` guildIds: isCanaUser - ```javascriptconst { Client, Events, Gate...```javascript const { Client, Events, GatewayIntentBits } = require('discord.js'); const client Ben855 - For autocomplete arguments in slash comma...For autocomplete arguments in slash commands, if the user enters something that wasn't available in Rhys - Is there a way to use preconditions to remo...Is there a way to use preconditions to remove redundant if checks? For example: ```typescript @App