codesupport / discord-bot

The CodeSupport Discord Bot
https://codesupport.dev/discord
MIT License
21 stars 21 forks source link

bug/RaidDetection slow down warning messages #190

Closed BlackBearFTW closed 2 years ago

BlackBearFTW commented 3 years ago

Overview

Please describe the bug below: Currently the bot spams general full with warnings, I have a solution for this problem, by adding in a queue_counter that only sends the message every x amount of dealt with queues

Expected Behaviour

Please describe how you expect this functionality to work: It should slow down and not send that message as often

Actual Behaviour

Please describe how this functionality is actually working: As I said, general now gets spammed multiple times back to back.

BlackBearFTW commented 3 years ago

I already implemented this and also refactored the code, I plan on making a pr soon.

LamboCreeper commented 3 years ago

I always believed the issue to be with people not being removed from the queue, since the only way I could get the messages to stop spamming before was by restarting the Dyno. Do you know if this fixes that?

BlackBearFTW commented 3 years ago

Well the queue simply gets emptied out by setting it equal to []

I tried doing this.joinqueue.shift() but that broke a test.... So I would have to look into that

theboxmage commented 3 years ago

Can this issue be picked back up on a different approach?

Checking the previous 10 or so messages for a bot post and skipping the Raid detection message would solve a lot of spamming. Would also still allow for the message to show up in chat enough for people to see it when they glance through general.

LamboCreeper commented 3 years ago

Can this issue be picked back up on a different approach?

Checking the previous 10 or so messages for a bot post and skipping the Raid detection message would solve a lot of spamming. Would also still allow for the message to show up in chat enough for people to see it when they glance through general.

This sounds good. Approving this solution.

AlexChadwickP commented 2 years ago

Make the bot stop raiding the server itself every time it detects a raid

olivier-b-be commented 2 years ago

Make the bot stop raiding the server itself every time it detects a raid

Make the code so the bot stops raiding the server itself every time it detects a raid