interactionCreate events not working

https://srcb.in/kRXh4rWrEw
TypeError: Do not know how to serialize a BigInt
at stringify (<anonymous>)
at Client.emit (node:events:525:35)
at Client.emit (node:domain:489:12)
at InteractionCreateAction.handle (/home/runner/nigerian-prince-1234/node_modules/discord.js/src/client/actions/InteractionCreate.js:97:12)
at module.exports [as INTERACTION_CREATE] (/home/runner/nigerian-prince-1234/node_modules/discord.js/src/client/websocket/handlers/INTERACTION_CREATE.js:4:36)
at WebSocketManager.handlePacket (/home/runner/nigerian-prince-1234/node_modules/discord.js/src/client/websocket/WebSocketManager.js:354:31)
at WebSocketManager.<anonymous> (/home/runner/nigerian-prince-1234/node_modules/discord.js/src/client/websocket/WebSocketManager.js:238:12)
at WebSocketManager.emit (/home/runner/nigerian-prince-1234/node_modules/@vladfrangu/async_event_emitter/dist/index.js:282:31)
at WebSocketShard.<anonymous> (/home/runner/nigerian-prince-1234/node_modules/@discordjs/ws/dist/index.js:1103:51)
TypeError: Do not know how to serialize a BigInt
at stringify (<anonymous>)
at Client.emit (node:events:525:35)
at Client.emit (node:domain:489:12)
at InteractionCreateAction.handle (/home/runner/nigerian-prince-1234/node_modules/discord.js/src/client/actions/InteractionCreate.js:97:12)
at module.exports [as INTERACTION_CREATE] (/home/runner/nigerian-prince-1234/node_modules/discord.js/src/client/websocket/handlers/INTERACTION_CREATE.js:4:36)
at WebSocketManager.handlePacket (/home/runner/nigerian-prince-1234/node_modules/discord.js/src/client/websocket/WebSocketManager.js:354:31)
at WebSocketManager.<anonymous> (/home/runner/nigerian-prince-1234/node_modules/discord.js/src/client/websocket/WebSocketManager.js:238:12)
at WebSocketManager.emit (/home/runner/nigerian-prince-1234/node_modules/@vladfrangu/async_event_emitter/dist/index.js:282:31)
at WebSocketShard.<anonymous> (/home/runner/nigerian-prince-1234/node_modules/@discordjs/ws/dist/index.js:1103:51)
87 Replies
d.js toolkit
d.js toolkit2y 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.
bromush
bromushOP2y ago
the full code for all the interactionCreate events i have is in the sourcebin and the stack trace is mentioned below discord.js version - 14.11 node version - 18.12.1
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
bromush
bromushOP2y ago
see the problem is i have 0 clue on where the error is coming from
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
bromush
bromushOP2y ago
the error occurs whenever either of the two interactionCreate events are triggered
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
bromush
bromushOP2y ago
im trying to send a message which is triggered by a slash command or im trying to edit an embed using select menus
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
bromush
bromushOP2y ago
either one of them the select menu is sent along with the message i have a prefix command with the exact same thing sending its select menu is working fine but selecting an option from that menu does not work
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
bromush
bromushOP2y ago
yes i am very sure
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
bromush
bromushOP2y ago
i asked world of code discord server before i moved on to here and we checked through and they said it wasnt my codes fault
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
bromush
bromushOP2y ago
alrighty
bromush
bromushOP2y ago
@Jô 🌈 🦄
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
bromush
bromushOP2y ago
like u want me to take an ss of the cosole fully?
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
bromush
bromushOP2y ago
k
bromush
bromushOP2y ago
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
bromush
bromushOP2y ago
https://srcb.in/jvAq7DKdtA the ever happens for each one of the things you listed like when i try to run the slash command the error comes when i try to select an option from the menu it comes
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
bromush
bromushOP2y ago
yea i did the thingy you told me to its v14.11
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
bromush
bromushOP2y ago
yes sir
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
bromush
bromushOP2y ago
oh lemme fix that rq
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
bromush
bromushOP2y ago
client.on("messageCreate", async (message) => {
if (message.author.bot) return;
if (message.content.toLowerCase() === "$help") {
await message.reply({
embeds: [
new EmbedBuilder()
.setTitle("Help Menus:")
.addFields(
{ name: "**Fun**", value: "Fun commands" },
{ name: "**Utility**", value: "Utility commands" },
{ name: "**Moderation**", value: "Moderation commands" },
{ name: "**Roleplay**", value: "Roleplay commands" }
)
.setFooter({ text: "Prefix: $" })
.setColor("303136")
.setThumbnail(client.user.displayAvatarURL({ extension: "png" })),
],
components: [
new ActionRowBuilder().addComponents(
new StringSelectMenuBuilder()
.setCustomId("help")
.setPlaceholder("Choose Help Menu")
.addOptions(
new StringSelectMenuOptionBuilder()
.setLabel("Fun")
.setValue("first")
.setEmoji("🌑"),
new StringSelectMenuOptionBuilder()
.setLabel("Utility")
.setValue("second")
.setEmoji("🐚"),
new StringSelectMenuOptionBuilder()
.setLabel("Moderation")
.setValue("third")
.setEmoji("🏯"),
new StringSelectMenuOptionBuilder()
.setLabel("Roleplay")
.setValue("fourth")
.setEmoji("🖤")
)
),
],
ephemeral: true,
});
}
});
client.on("messageCreate", async (message) => {
if (message.author.bot) return;
if (message.content.toLowerCase() === "$help") {
await message.reply({
embeds: [
new EmbedBuilder()
.setTitle("Help Menus:")
.addFields(
{ name: "**Fun**", value: "Fun commands" },
{ name: "**Utility**", value: "Utility commands" },
{ name: "**Moderation**", value: "Moderation commands" },
{ name: "**Roleplay**", value: "Roleplay commands" }
)
.setFooter({ text: "Prefix: $" })
.setColor("303136")
.setThumbnail(client.user.displayAvatarURL({ extension: "png" })),
],
components: [
new ActionRowBuilder().addComponents(
new StringSelectMenuBuilder()
.setCustomId("help")
.setPlaceholder("Choose Help Menu")
.addOptions(
new StringSelectMenuOptionBuilder()
.setLabel("Fun")
.setValue("first")
.setEmoji("🌑"),
new StringSelectMenuOptionBuilder()
.setLabel("Utility")
.setValue("second")
.setEmoji("🐚"),
new StringSelectMenuOptionBuilder()
.setLabel("Moderation")
.setValue("third")
.setEmoji("🏯"),
new StringSelectMenuOptionBuilder()
.setLabel("Roleplay")
.setValue("fourth")
.setEmoji("🖤")
)
),
],
ephemeral: true,
});
}
});
thats for this thing this is the prefix command version of the slash command which i showed you
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
bromush
bromushOP2y ago
😔 alr
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
bromush
bromushOP2y ago
bromush
replit
nigerian prince 1234
Run Node.js code live in your browser. Write and run code in 50+ languages online with Replit, a powerful IDE, compiler, & interpreter.
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
bromush
bromushOP2y ago
thats the problem
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
bromush
bromushOP2y ago
i legit have 0 clue from where this is coming from mb
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
bromush
bromushOP2y ago
https://srcb.in/2F5AKPaQkc there is the whole bot code ngl embeds.js seems pretty pointless so imma remove that
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
bromush
bromushOP2y ago
oki
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
bromush
bromushOP2y ago
oopsies
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
bromush
bromushOP2y ago
isnt there 2
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
bromush
bromushOP2y ago
i remember theres one for the help command and then another one for the rest in the summer im gonna do complete rework updating commands, embeds n stuff and shifting everything to slash commands
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
bromush
bromushOP2y ago
while im doing that ill be sure to add a handler
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
bromush
bromushOP2y ago
i had the same problem in the other server eventually we just reached a dead end since there was no where in the code where i was trying to serialize a big int
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
bromush
bromushOP2y ago
you mean like on a different bot? i have a spare one which i use for beta testing i could try this on that
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
bromush
bromushOP2y ago
its what i use for uptime things im on a chromebook 🙏 express.js but it automatically switches ip when i get ratelimited
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
bromush
bromushOP2y ago
ngl idk barely anyone uses my bot in the first place so im surprised too
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
bromush
bromushOP2y ago
o
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
bromush
bromushOP2y ago
so am i just stuck like this forever
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
bromush
bromushOP2y ago
o oki a bunch of the commands that require some perms are kind of messed up so ill go fix those rq btw i found the source code for the replit dis uniter
bromush
bromushOP2y ago
UMARismyname
replit
Disuniter
dis-uniter = keeping disagreement alive = keeping discord alive with bots, even though I don't even use discord.js. Moved to new repl due to repl auth issues ):
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
bromush
bromushOP2y ago
oops oki
MrMythical
MrMythical2y ago
@bromush how many interactionCreate events do you have?
bromush
bromushOP2y ago
2 no wait 1
MrMythical
MrMythical2y ago
What is the entire code for that event listener?
bromush
bromushOP2y ago
everything is in here
MrMythical
MrMythical2y ago
Are you sure that's the only interactionCreate event listener?
bromush
bromushOP2y ago
I mean that’s the only file I have So there’s probably not more I found the problem The slash commands are working now I looked through the replit dis uniter package code And found something that looked like this logger.debug.bind(logger)); bot.on("interactionCreate", I removed that and now the thingy works
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
bromush
bromushOP2y ago
oh my console is being flooded Before I made the change For some reason this started popping up
RangeError: Invalid time zone specified: merica/New_York
at Date.toLocaleString (<anonymous>)
at localiseTime (/home/runner/nigerian-prince-1234/node_modules/replit-dis-uniter/index.js:71:27)
at /home/runner/nigerian-prince-1234/node_modules/replit-dis-uniter/index.js:107:34
at String.replace (<anonymous>)
at Server.<anonymous> (/home/runner/nigerian-prince-1234/node_modules/replit-dis-uniter/index.js:105:48)
at Server.emit (node:events:513:28)
at Server.emit (node:domain:489:12)
at parserOnIncoming (node:_http_server:1068:12)
RangeError: Invalid time zone specified: merica/New_York
at Date.toLocaleString (<anonymous>)
at localiseTime (/home/runner/nigerian-prince-1234/node_modules/replit-dis-uniter/index.js:71:27)
at /home/runner/nigerian-prince-1234/node_modules/replit-dis-uniter/index.js:107:34
at String.replace (<anonymous>)
at Server.<anonymous> (/home/runner/nigerian-prince-1234/node_modules/replit-dis-uniter/index.js:105:48)
at Server.emit (node:events:513:28)
at Server.emit (node:domain:489:12)
at parserOnIncoming (node:_http_server:1068:12)
So then I went into the package and looked
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
bromush
bromushOP2y ago
it came before I edited Idk how Like it randomly appeared out of no where
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
bromush
bromushOP2y ago
He’s in the replit server I pinged him in there and I’m waiting for him to respond
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
bromush
bromushOP2y ago
He’s probably sleeping
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
bromush
bromushOP2y ago
thanks
Want results from more Discord servers?
Add your server