discord-api-docs icon indicating copy to clipboard operation
discord-api-docs copied to clipboard

Cannot message this thread until after the post author has sent an initial message

Open MinnDevelopment opened this issue 11 months ago • 4 comments

Description

When you try making a bot that posts instruction messages on every new forum post, the API returns the following error:

{
  "code": 40058
  "message": "Cannot message this thread until after the post author has sent an initial message"
}

Handling this from the bot perspective seems janky. Would it be possible for discord to handle this more gracefully, potentially by giving it a few seconds before returning an error?

The Documentation also uses this error code in a completely unrelated way:

40058: Cannot send a message in a forum channel

To me, this refers to the forum channel itself, rather than posts within it. At the very least, I would ask for a different error code to be used.

Additionally: Why does this error exist? What is the motivation behind it?

Steps to Reproduce

Send a message on every new thread, it will break if you're fast enough.

Expected Behavior

This error shouldn't happen.

Current Behavior

This error happens.

Screenshots/Videos

No response

Client and System Information

API v10

MinnDevelopment avatar Aug 05 '23 11:08 MinnDevelopment