Error: Cannot message this thread until after the post author has sent an initial message.
I'm encountering the following error:
I understand the error. However, I'm struggling with how to properly handle this.
My use case is that the bot should send a message immediately after a thread is created. The issue typically arises when the initial message includes a large file or video upload, which delays the actual posting.
My question is:
How can I detect when the initial message has been fully sent and the thread is ready to receive bot messages?
I’ve tried using a
setTimeout
with 1 second, but that’s not consistently enough. Is there a proper event or listener that signals when the thread becomes active or the initial message is finalized?
Any advice or best practices would be appreciated.15 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!Maybe check if there are a minum amount of messages sent in the channe?
Idk.... but worth a try
I've never done what you're trying to do, but would it make sense to listen to threadCreate, store the thread ID on your side, and then listen to messageCreate for a message in a thread with that same ID?
I just ran a test, and fetchStarterMessage is not the actual first message in the thread. it's the thread title.
Works on my machine but maybe there's a misunderstanding about what the "first message" is. For forums it would be the post itself yeah
He said "thread," so I ran the test in a thread. The part underlined in red is the "first" message.
I haven’t tested it, but if I understand correctly, Discord wants the initial message (which is actually the second message) to be sent

Seems I was mistaken and what's considered the "starter message" changes depending on whether the thread was created off an existing message. If it's made at the same time then yeah apparently it's the title
I tried this, but seems that didnt work
what do you mean that didnt work ? You never catch a message?
Yes, sorry
Not sure if this works
thread.awaitMessages
Or if i'm using correctly
Even tried removing the filter, but nothing
I was doing this
which works, but only when user send text messages.
I really don't know how to listen to a message therewhich intents do you have
i just wait 2s before letting it post that :kek:
It seems i got this working