Duplicate Message Send
Hello, I've been having an issue with a channel.send() call occasionally resulting in a message being sent multiple times.
Node.js:
v18.12.1
Discord.js: v14.9.0
OS: Ubuntu 20.04 LTS
Code:
Upon this function executing, I receive the following logs:
First 3 logs are requests made by undici,
4th log is from a client.rest response
event
5th log is from the .then()
method called on the promise returned by channel.send()
It appears that despite my function only being called once, the message is being sent multiple times.
If anyone has an idea as to what could cause this, please let me know.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!I created similar thread here: https://discord.com/channels/222078108977594368/1137513755840872449
try to add this to your code
if you get "retries" value not equal to 0 in duplicated message, probably you have the same issue
These are the timestamps for each of the messages, in ms:
1693526700252
1693526715149
1693526730300
Approximately 15 seconds between each send
I do get a value greater than 0 for retries in cases where duplicate messages are sent.
Yeah we have the same issue for sure