Together-Java / TJ-Bot

TJ-Bot is a Discord Bot used on the Together Java server. It is maintained by the community, anyone can contribute.
https://togetherjava.org
GNU General Public License v3.0
100 stars 83 forks source link

Pinned threads should not be archived in questions #1084

Closed ankitsmt211 closed 2 months ago

ankitsmt211 commented 3 months ago

Describe the bug

Pinned messages/threads is a means to provide information in context of channel, but with current setup all threads are archived in questions regardless of state thus making this feature useless

Expected behavior

Bot should ignore pinned threads when archive routine is triggered To Reproduce

  1. Tweak archive routine time from 12 hours to few minutes for testing on local setup
  2. Run local instance of bot
  3. create a thread in questions
  4. pin the thread
  5. wait for it to be archived

Additional context

image

https://github.com/Together-Java/TJ-Bot/blob/develop/application/src/main/java/org/togetherjava/tjbot/features/help/HelpThreadAutoArchiver.java

SimonVerhoeven commented 3 months ago

Hi, I wouldn't mind tackling this one. Maybe move the filtering up a bit earlier?

JayBhensdadia commented 2 months ago

I've created a pull request to address issue #1084. Since there hasn't been much activity on this issue, I decided to work on a solution. It would be great if you could review it and let me know if there are any changes or adjustments needed. I'm open to any feedback or suggestions to improve it. Thanks!