DiscordRESTError [50024]: Cannot execute action on this channel type
marshallovski opened this issue · 5 comments
marshallovski commented
Here's my code:
bot.on("messageCreate", (msg) => {
try {
msg.createThreadWithMessage({ name: `Тред ${msg.author.username}`, autoArchiveDuration: 60 });
} catch (e) {
return new Error(e);
}
});
When I send a message, a thread is created, but the bot crashes.
Error: DiscordRESTError [50024]: Cannot execute action on this channel type
DonovanDMC commented
Asking questions and getting help should be done in the Discord server
We also need more than just "error happened, help"
- version
- stack trace
- more context
marshallovski commented
latest ver (0.16.1)
node:internal/process/promises:279
triggerUncaughtException(err, true /* fromPromise */);
^
DiscordRESTError [50006]: Cannot send an empty message
at RequestHandler.request (/mnt/windows/LINUXSOFT/projects/aibot/node_modules/eris/lib/rest/RequestHandler.js:75:15)
at Client.createMessage (/mnt/windows/LINUXSOFT/projects/aibot/node_modules/eris/lib/Client.js:835:36)
at Timeout._onTimeout (/mnt/windows/LINUXSOFT/projects/aibot/index.js:24:13)
at listOnTimeout (node:internal/timers:559:17)
at processTimers (node:internal/timers:502:7)
Node.js v17.7.1
???
HeadTriXz commented
latest ver (0.16.1)
node:internal/process/promises:279 triggerUncaughtException(err, true /* fromPromise */); ^ DiscordRESTError [50006]: Cannot send an empty message at RequestHandler.request (/mnt/windows/LINUXSOFT/projects/aibot/node_modules/eris/lib/rest/RequestHandler.js:75:15) at Client.createMessage (/mnt/windows/LINUXSOFT/projects/aibot/node_modules/eris/lib/Client.js:835:36) at Timeout._onTimeout (/mnt/windows/LINUXSOFT/projects/aibot/index.js:24:13) at listOnTimeout (node:internal/timers:559:17) at processTimers (node:internal/timers:502:7) Node.js v17.7.1
???
Let's continue in the Discord server.
marshallovski commented
in #support?
HeadTriXz commented
Yes