Automod Issue

I have this code but if someone triggers automod 3 times very quickly the bot will not timeout them. https://pastebin.com/HdxPs1Pe
Pastebin
automodPunish function - Pastebin.com
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Solution:
You need to define the queue outside of the function
Jump to solution
4 Replies
Solution
Lioness100
Lioness100•8mo ago
You need to define the queue outside of the function
-Carlos👑
-Carlos👑•8mo ago
I'm already using @sapphire/async-queue so i'm not sure why oh let me try with that
Lioness100
Lioness100•8mo ago
Idk if that's your full problem but it would certainly be the first one Do you ever update the count in your database?
-Carlos👑
-Carlos👑•8mo ago
The problem that I had a few weeks ago was already fixed, it was the automod and automodMute function creating 2 documents I had to ask in the mongoose github this fixed it, just gonna test a little bit more to make sure it's not bypass-able looks good for now, ty