modal error

i get this modal error but nothing in console please help
23 Replies
d.js docs
d.js docs3y ago
• What's your exact discord.js npm list discord.js and node node -v version? • Post the full error stack trace, not just the top part! • Show your code! • Explain what exactly your issue is. • Not a discord.js issue? Check out #useful-servers.
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
NP
NPOP3y ago
NP
NPOP3y ago
this is the new part i added which doesnt work ^^
d.js docs
d.js docs3y ago
To share long code snippets use a service like gist, sourcebin, starbin, or similar instead of posting them as large code blocks.
NP
NPOP3y ago
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
NP
NPOP3y ago
nah, still. Same thing
axiprime
axiprime3y ago
nvm just saw it
NP
NPOP3y ago
If you see this: https://sourceb.in/ivIpUBBMYC this is the whole code
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
NP
NPOP3y ago
Everything except for marketing works
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
axiprime
axiprime3y ago
Yes you can, i'm actually doing it
NP
NPOP3y ago
but for the one before it I have done this where they are different
NP
NPOP3y ago
and that works As you can see in the code, the marketing section and the moderation are the same with different questions and variable names. Moderation part works great. I don't see what doesn't work about the marketing section. Its the same thing? I did the same thing for the partnership and that works fine I will try switching the lines round now
console.log
node:events:491
throw er; // Unhandled 'error' event
^

ZodError: [
{
"code": "invalid_type",
"expected": "string",
"received": "null",
"path": [
"id"
],
"message": "Expected string, received null"
}
]
at handleResult (/workspace/applicationspecian/node_modules/zod/lib/types.js:28:23)
at ZodObject.safeParse (/workspace/applicationspecian/node_modules/zod/lib/types.js:140:16)
at ZodObject.parse (/workspace/applicationspecian/node_modules/zod/lib/types.js:120:29)
at ButtonBuilder.setEmoji (/workspace/applicationspecian/node_modules/@discordjs/builders/dist/index.js:593:42)
at ButtonBuilder.setEmoji (/workspace/applicationspecian/node_modules/discord.js/src/structures/ButtonBuilder.js:19:20)
at Client.<anonymous> (/workspace/applicationspecian/index.js:632:18)
at Client.emit (node:events:525:35)
at InteractionCreateAction.handle (/workspace/applicationspecian/node_modules/discord.js/src/client/actions/InteractionCreate.js:76:12)
at Object.module.exports [as INTERACTION_CREATE] (/workspace/applicationspecian/node_modules/discord.js/src/client/websocket/handlers/INTERACTION_CREATE.js:4:36)
at WebSocketManager.handlePacket (/workspace/applicationspecian/node_modules/discord.js/src/client/websocket/WebSocketManager.js:355:31)
Emitted 'error' event on Client instance at:
at emitUnhandledRejectionOrErr (node:events:394:10)
at processTicksAndRejections (node:internal/process/task_queues:85:21) {
issues: [
{
code: 'invalid_type',
expected: 'string',
received: 'null',
path: [ 'id' ],
message: 'Expected string, received null'
}
],
format: [Function (anonymous)],
addIssue: [Function (anonymous)],
addIssues: [Function (anonymous)],
errors: [
{
code: 'invalid_type',
expected: 'string',
received: 'null',
path: [ 'id' ],
message: 'Expected string, received null'
}
]
}
console.log
node:events:491
throw er; // Unhandled 'error' event
^

ZodError: [
{
"code": "invalid_type",
"expected": "string",
"received": "null",
"path": [
"id"
],
"message": "Expected string, received null"
}
]
at handleResult (/workspace/applicationspecian/node_modules/zod/lib/types.js:28:23)
at ZodObject.safeParse (/workspace/applicationspecian/node_modules/zod/lib/types.js:140:16)
at ZodObject.parse (/workspace/applicationspecian/node_modules/zod/lib/types.js:120:29)
at ButtonBuilder.setEmoji (/workspace/applicationspecian/node_modules/@discordjs/builders/dist/index.js:593:42)
at ButtonBuilder.setEmoji (/workspace/applicationspecian/node_modules/discord.js/src/structures/ButtonBuilder.js:19:20)
at Client.<anonymous> (/workspace/applicationspecian/index.js:632:18)
at Client.emit (node:events:525:35)
at InteractionCreateAction.handle (/workspace/applicationspecian/node_modules/discord.js/src/client/actions/InteractionCreate.js:76:12)
at Object.module.exports [as INTERACTION_CREATE] (/workspace/applicationspecian/node_modules/discord.js/src/client/websocket/handlers/INTERACTION_CREATE.js:4:36)
at WebSocketManager.handlePacket (/workspace/applicationspecian/node_modules/discord.js/src/client/websocket/WebSocketManager.js:355:31)
Emitted 'error' event on Client instance at:
at emitUnhandledRejectionOrErr (node:events:394:10)
at processTicksAndRejections (node:internal/process/task_queues:85:21) {
issues: [
{
code: 'invalid_type',
expected: 'string',
received: 'null',
path: [ 'id' ],
message: 'Expected string, received null'
}
],
format: [Function (anonymous)],
addIssue: [Function (anonymous)],
addIssues: [Function (anonymous)],
errors: [
{
code: 'invalid_type',
expected: 'string',
received: 'null',
path: [ 'id' ],
message: 'Expected string, received null'
}
]
}
the error from switching the lines hm that is correct but I removed all .setEmoji from the marketing section and it worked oh @qjuh you can't have emojis when it's set to disabled? when I removed the custom emojis from the disabled buttons it worked
NP
NPOP3y ago
ah it happens on any button I add it to Well I mean, the bot has admin perms and it posts it fine here for example
NP
NPOP3y ago
NP
NPOP3y ago
that works
NP
NPOP3y ago
and the custom emojis work here
NP
NPOP3y ago
no worries emojis not really needed @vunsh @qjuh Okay so I have got that working. Would either of you be able to help me make multiple different pages of modals for this application bot?
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
NP
NPOP3y ago
Ok thanks guys
Want results from more Discord servers?
Add your server