Discord Not a Bug Error discord API rate

Affected add-on version
latest
Hello,
I have the following error in Xenforo logs :
1673433012074.png


Code:
#0 src/addons/NF/Discord/ApiMessage/AbstractApiMessage.php(89): NF\Discord\Api->throwRateLimitingException(Array, 1673422888, Array)
#1 src/addons/NF/Discord/ApiMessage/AbstractApiMessage.php(105): NF\Discord\ApiMessage\AbstractApiMessage->assertNotRateLimited()
#2 src/addons/NF/Discord/ApiMessage/MessageToChannel.php(47): NF\Discord\ApiMessage\AbstractApiMessage->isOK(false)
#3 src/addons/NF/Discord/Repository/Queue.php(243): NF\Discord\ApiMessage\MessageToChannel->dispatch()
#4 src/addons/NF/Discord/Job/DiscordSendQueue.php(22): NF\Discord\Repository\Queue->run(7.97372)
#5 src/XF/Job/Manager.php(260): NF\Discord\Job\DiscordSendQueue->run(7.97372)
#6 src/XF/Job/Manager.php(202): XF\Job\Manager->runJobInternal(Array, 7.97372)
#7 src/XF/Job/Manager.php(86): XF\Job\Manager->runJobEntry(Array, 7.97372)
#8 job.php(43): XF\Job\Manager->runQueue(false, 8)
#9 {main}

How to fix that ?
I don't understand why I have this, there is maximum 1 post per hour on my forum so it should not spam discord.
 
Yes, I found that some messages where bloqued in the queue and the discord API what spammed because of that. I cleared the queue and it works fine.

But you should add a check if the number of fail is > 10 then remove it from queue or something
 
Back
Top