PaginatedMessage replies "This maze wasn't meant for you...what did you do."

i put the example for paginated messages in my slash command, but instead of sending a paginated message, it only replied with the above error message and logged a warning after following the advice of the warning by adding the CHANNELs partial, it still replied with the same message, but without logging a warning
No description
52 Replies
bricked
brickedOPā€¢16mo ago
this is the relevant code
public async chatInput(inter: Subcommand.ChatInputCommandInteraction) {
const myPaginatedMessage = new PaginatedMessage();
myPaginatedMessage.addPageEmbed((embed) => {
embed.setColor("#FF0000").setDescription("example description");
return embed;
});

myPaginatedMessage.addPageBuilder((builder) => {
const embed = new EmbedBuilder().setColor("#FF0000").setDescription("example description");
return builder.setContent("example content").setEmbeds([embed]);
});

myPaginatedMessage.addPageContent("Example");
myPaginatedMessage.run(inter);
}
public async chatInput(inter: Subcommand.ChatInputCommandInteraction) {
const myPaginatedMessage = new PaginatedMessage();
myPaginatedMessage.addPageEmbed((embed) => {
embed.setColor("#FF0000").setDescription("example description");
return embed;
});

myPaginatedMessage.addPageBuilder((builder) => {
const embed = new EmbedBuilder().setColor("#FF0000").setDescription("example description");
return builder.setContent("example content").setEmbeds([embed]);
});

myPaginatedMessage.addPageContent("Example");
myPaginatedMessage.run(inter);
}
this is the original warning
(node:1464) [PAGINATED_MESSAGE_RUNS_IN_NON_PARTIAL_DM_CHANNEL] PaginatedMessageRunsInNonpartialDMChannel: PaginatedMessage was initiated in a DM channel without the client having the required partial configured.
If you want PaginatedMessage to work in DM channels then make sure you start your client with "CHANNEL" added to "client.options.partials".
Furthermore if you are using message based commands (as opposed to application commands) then you will also need to add the "DIRECT_MESSAGE" intent to "client.options.intents"
If you do not want to be alerted about this in the future then you can disable this warning by setting "PaginatedMessage.emitPartialDMChannelWarning" to "false", or use "setEmitPartialDMChannelWarning(false)" before calling "run".
at _PaginatedMessage.run (.\node_modules\@sapphire\discord.js-utilities\dist\index.js:1415:17)
at UserCommand2.chatInputList (.\dist\commands\hugs.js:73:24)
at .\node_modules\@sapphire\plugin-subcommands\dist\lib\Subcommand.js:380:40
at Object.fromAsync (.\node_modules\@sapphire\result\dist\index.js:613:46)
at UserCommand2._Subcommand_handleChatInputInteractionRun (.\node_modules\@sapphire\plugin-subcommands\dist\lib\Subcommand.js:366:45)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
(node:1464) [PAGINATED_MESSAGE_RUNS_IN_NON_PARTIAL_DM_CHANNEL] PaginatedMessageRunsInNonpartialDMChannel: PaginatedMessage was initiated in a DM channel without the client having the required partial configured.
If you want PaginatedMessage to work in DM channels then make sure you start your client with "CHANNEL" added to "client.options.partials".
Furthermore if you are using message based commands (as opposed to application commands) then you will also need to add the "DIRECT_MESSAGE" intent to "client.options.intents"
If you do not want to be alerted about this in the future then you can disable this warning by setting "PaginatedMessage.emitPartialDMChannelWarning" to "false", or use "setEmitPartialDMChannelWarning(false)" before calling "run".
at _PaginatedMessage.run (.\node_modules\@sapphire\discord.js-utilities\dist\index.js:1415:17)
at UserCommand2.chatInputList (.\dist\commands\hugs.js:73:24)
at .\node_modules\@sapphire\plugin-subcommands\dist\lib\Subcommand.js:380:40
at Object.fromAsync (.\node_modules\@sapphire\result\dist\index.js:613:46)
at UserCommand2._Subcommand_handleChatInputInteractionRun (.\node_modules\@sapphire\plugin-subcommands\dist\lib\Subcommand.js:366:45)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
however, the command was sent in a guild and not in a dm my dependencies are also up to date
Favna
Favnaā€¢16mo ago
please share your package.json
bricked
brickedOPā€¢16mo ago
sure just the discord dependencies?
Favna
Favnaā€¢16mo ago
just share the whole thing tbh
bricked
brickedOPā€¢16mo ago
oke
Favna
Favnaā€¢16mo ago
when asking for technical support it's much better to provide too much than too litle info we also have:
Spinel
Spinelā€¢16mo ago
When asking for help, make sure to provide as much detail as possible. What have you tried so far? Do you have stacktraces that you can show us? What are you trying to achieve? Try to answer these questions and others, so we do not have to ask for them afterwards.
āÆ For a good guide on how to ask questions, see the instructions that StackOverflow gives. You should try to always follow these guidelines. āÆ For an excellent video that shows how not to ask technical questions is this, watch this YouTube video by LiveOverflow. āÆ Asking technical questions (Clarkson) āÆ How to ask questions the smart way (Raymond)
bricked
brickedOPā€¢16mo ago
aight
bricked
brickedOPā€¢16mo ago
bricked
brickedOPā€¢16mo ago
sorry for all the trashy configs šŸ’€
Favna
Favnaā€¢16mo ago
uhm... that means you're pulling in @sapphire/discord.js-utilities as a transitive dependency. Can you run npm ls @sapphire/discord.js-utilities --depth=0 and show the result?
bricked
brickedOPā€¢16mo ago
@bricked/cluster@ .\cluster
ā””ā”€ā”€ (empty)
@bricked/cluster@ .\cluster
ā””ā”€ā”€ (empty)
Favna
Favnaā€¢16mo ago
uh drop the --depth=0?
bricked
brickedOPā€¢16mo ago
@bricked/cluster@ .\cluster
ā””ā”€ā”¬ @sapphire/[email protected]
ā””ā”€ā”€ @sapphire/[email protected]
@bricked/cluster@ .\cluster
ā””ā”€ā”¬ @sapphire/[email protected]
ā””ā”€ā”€ @sapphire/[email protected]
Favna
Favnaā€¢16mo ago
okay 7.0.2 is latest
bricked
brickedOPā€¢16mo ago
yup i really wonder why it thought that i was running it in a dm channel oh btw my bot only has application.command enabled and not bot that had lead to some bugs before but shouldnt matter here
Favna
Favnaā€¢16mo ago
im stumped tbh. The maze is not meant for you error is supposed to be a fallback error if something seriously goes wrong and normally that's dependencies related
bricked
brickedOPā€¢16mo ago
i really messed up here šŸ’€
Favna
Favnaā€¢16mo ago
I'm pretty sure DiscordJS needs the bot scope ... :\ @vladdy @kyra šŸ©µšŸ©·šŸ¤šŸ©·šŸ©µ ? pretty sure only HTTP only bots can use only application.command
kyra
kyraā€¢16mo ago
djs needs the bot scope, yes
Favna
Favnaā€¢16mo ago
well definitely add that then that would definitely cause unexpected errors
bricked
brickedOPā€¢16mo ago
oh ok
vladdy
vladdyā€¢16mo ago
holy shit someone actually triggered the maze error thats a shock
bricked
brickedOPā€¢16mo ago
amazing
bricked
brickedOPā€¢16mo ago
ping command worked with only application.command so i thought it would be fine
Favna
Favnaā€¢16mo ago
you're second person sorry bricked lmao
Favna
Favnaā€¢16mo ago
was about to say nah Fabrizio Santana was the first silver trophy to ya
bricked
brickedOPā€¢16mo ago
yey
bricked
brickedOPā€¢16mo ago
uhh
No description
bricked
brickedOPā€¢16mo ago
does it need any other permissions
bricked
brickedOPā€¢16mo ago
the client clearly has bot permissions now
No description
bricked
brickedOPā€¢16mo ago
it would be nice if the reply would also log a warning
Favna
Favnaā€¢16mo ago
https://discord.com/oauth2/authorize?client_id=<client_id_here>&permissions=412317240320&scope=applications.commands%20bot
No description
Favna
Favnaā€¢16mo ago
that's what @Dragonite has you can put a breakpoint in the JS code in node_modules at the start of the run method and use a debugger to walk through the code to see where it errors afaik we cannot pull the current stack in JS for logging so there wouldn't be anything useful to log
bricked
brickedOPā€¢16mo ago
oke permissions didnt change anything ill try to trace the error the break point on myPaginatedMessage.run(inter) isnt even reached when i execute the command but it stops before the bot connects for some reason oh so apparently inter.channel is null ĀÆ\_(惄)_/ĀÆ inter.channelId is defined tho but it told me to activate partial channels so that's expected i guess
Favna
Favnaā€¢16mo ago
There are 3 places where the maze message can pop up: 1. at .run if there is no message.channel 2. at handleCollect (when you click a button etc) and it's the initial reply, it should be an edit here 3. same as 2 but at handleEnd so you're in situation 1 what is your new SapphireClient, specifically all your client options?
bricked
brickedOPā€¢16mo ago
the callstack is
safelyReplyToInteraction (.\node_modules\@sapphire\discord.js-utilities\dist\index.js:661)
run (.\node_modules\@sapphire\discord.js-utilities\dist\index.js:1429)
chatInputList (.\src\commands\hugs.ts:97)
...
safelyReplyToInteraction (.\node_modules\@sapphire\discord.js-utilities\dist\index.js:661)
run (.\node_modules\@sapphire\discord.js-utilities\dist\index.js:1429)
chatInputList (.\src\commands\hugs.ts:97)
...
so i guess its 1. client is
const client = new Client({
baseUserDirectory: __dirname,
intents: [], // insert bot intents
partials: [Partials.Channel], // insert partial events

color: "Blurple", // insert an accent color
typing: true,
});
const client = new Client({
baseUserDirectory: __dirname,
intents: [], // insert bot intents
partials: [Partials.Channel], // insert partial events

color: "Blurple", // insert an accent color
typing: true,
});
Favna
Favnaā€¢16mo ago
I'd need the stack above safelyReplyToInteraction. They all call that function. you need intents
intents: [GatewayIntentBits.Guilds]
intents: [GatewayIntentBits.Guilds]
minimum
bricked
brickedOPā€¢16mo ago
oh right
Favna
Favnaā€¢16mo ago
but if you want DM you want more sec boss spawned
bricked
brickedOPā€¢16mo ago
guh oh it works now šŸ’€ once again it was missing intents
Favna
Favnaā€¢16mo ago
for DM commands I think it's
intents: [GatewayIntentBits.Guilds, GatewayIntentBits.DirectMessages],
intents: [GatewayIntentBits.Guilds, GatewayIntentBits.DirectMessages],
I assume you want DM commands otherwise there is no reason to enable channels partial
bricked
brickedOPā€¢16mo ago
sure tysm i didnt know that was required for slash commands
Favna
Favnaā€¢16mo ago
oh wait it's not come to think of it just Guilds is @Dragonite only has Guilds and DM commands work fine my bad
bricked
brickedOPā€¢16mo ago
yup its weird how normal replies worked but the paginator didnt ill mark this as completed i guess
bricked
brickedOPā€¢16mo ago
oh ok
Favna
Favnaā€¢16mo ago
well I guess there might be a way to refactor it to not need it but then it would only work in DMs
bricked
brickedOPā€¢16mo ago
i havent even tried it in dms it might work anyways cuz there is no dm intent
Want results from more Discord servers?
Add your server