Skip to content

Looking for group rules message sometimes fails #478

@vcarl

Description

@vcarl

How wonderful that there's a race conditions in thread creation.

[ERROR] Cannot message this thread until after the post author has sent an initial message. DiscordAPIError[40058]: Cannot message this thread until after the post author has sent an initial message.
    at handleErrors (/build/reactibot/node_modules/@discordjs/rest/dist/index.js:730:13)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async SequentialHandler.runRequest (/build/reactibot/node_modules/@discordjs/rest/dist/index.js:1133:23)
    at async SequentialHandler.queueRequest (/build/reactibot/node_modules/@discordjs/rest/dist/index.js:963:14)
    at async _REST.request (/build/reactibot/node_modules/@discordjs/rest/dist/index.js:1278:22)
    at async ThreadChannel.send (/build/reactibot/node_modules/discord.js/src/structures/interfaces/TextBasedChannel.js:177:15)
    at async Client.<anonymous> (file:///build/reactibot/dist/features/looking-for-group.js:31:9)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions