Issues with discord.js errors in Bun

Hello. I am looking to confirm that I am not the only one with the following issue. I'm also trying to understand if this is an issue with Bun or discord.js When running with Bun, I no longer get the same more useful errors that I get when running in Node. Image 1 is on Bun. Image 2 is on Node. Would appreciate some insight :)
No description
No description
20 Replies
d.js toolkit
d.js toolkit4mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button!
Kinect3000
Kinect30004mo ago
Can you try awaiting the reply call?
Mozzy
Mozzy4mo ago
Gives the same results
kin.ts
kin.ts4mo ago
The error is quite clear, you didn't put any data into the reply options
await interaction.reply({ content: "your content here" });
await interaction.reply({ content: "your content here" });
Mozzy
Mozzy4mo ago
That is intentional in order to trigger the error
monbrey
monbrey4mo ago
We don't really officially support Bun, couldn't tell you why it isn't logging stacktraces but that isnt a discord.js issue
Mozzy
Mozzy4mo ago
We don't really officially support Bun
Is that something that might happen one day? Other than this, my bot works great in 99% of cases. The 1% being a very weird bug: https://discord.com/channels/222078108977594368/824411059443204127/1205806210495021066
Aryxst
Aryxst4mo ago
I use bun 1.0.26 for my discord bot with no problems https://github.com/Aryxst/efestus-bot
GitHub
GitHub - Aryxst/efestus-bot
Contribute to Aryxst/efestus-bot development by creating an account on GitHub.
Aryxst
Aryxst4mo ago
mine is pretty simple
Mozzy
Mozzy4mo ago
Would you mind confirming something for me? If you add
try {
await interaction.reply({});
} catch (error) {
console.log(error);
}
return;
try {
await interaction.reply({});
} catch (error) {
console.log(error);
}
return;
to https://github.com/Aryxst/efestus-bot/blob/master/src/events/interactionCreate.ts#L13 and run a command, how does your console look?
Aryxst
Aryxst4mo ago
Just avoid using this strategy
No description
Aryxst
Aryxst4mo ago
do like i did i dont get any errors and the error is because you have to provide content to the message, just add content
Mozzy
Mozzy4mo ago
I know. That's not what this thread is about. It was about figuring out why Bun doesn't log proper errors
Aryxst
Aryxst4mo ago
isnt this one?
No description
Mozzy
Mozzy4mo ago
Same exact code running on Node:
No description
Mozzy
Mozzy4mo ago
But your image confirms it's not just me
Aryxst
Aryxst4mo ago
thats just how bun handles errors, its not a discordjs issue
Mozzy
Mozzy4mo ago
unfortunate
Aryxst
Aryxst4mo ago
you could try opening an issue on bun's github
Mozzy
Mozzy4mo ago
I posted in their Discord for now