The bot crashes after sending one or two direct messages to the newly joined members
I am using discord.js v14. The code works. However, I don't think it is a rate limit because I checked there were only one or two members joining my discord, so it won't be rate limit. Anyway, I tried logging the error message, but nothing showed up in same directory where the index.js with the code resides. Please see attached images for the code. Thanks if any of you could help pinpoint the error. And why is that?
4 Replies
- 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!catch and log your errors properly instead of writing them to a file
also whats the point of that code?
just do it direclty in the event, why overcomplicate it
Is there a way to log it to the file in synology nas as I am hosting my bot on synolgoy nas. The reason not doing that in the event is because of rate limit just in case if there are several members joining the server at the same time.
you should find hosting that allows you to view a console, instead of doing it via this weird way
if your bot crashes you wont ever know why because it cant write to the file