Skip to content

Conversation

mikerasch
Copy link
Contributor

@mikerasch mikerasch commented Aug 14, 2022

Overview

Closes #480
When a user leaves the server, their help thread stays open. This leads to not only the waste of moderators' time when, but also leads to helpers contributing to nobody.

Details

  • Store users in a database upon creation. Storing user id, thread id, and date it was created.
  • When the user leaves the guild, inform the channel that it will be closed.
  • Archive all thread channels made by the user.
  • Every 30 days, purge the database of all thread creation entities.

@mikerasch mikerasch requested review from a team as code owners August 14, 2022 00:15
@CLAassistant
Copy link

CLAassistant commented Aug 14, 2022

CLA assistant check
All committers have signed the CLA.

@mikerasch mikerasch marked this pull request as draft August 14, 2022 01:36
@Taz03 Taz03 linked an issue Aug 14, 2022 that may be closed by this pull request
@marko-radosavljevic
Copy link
Contributor

Thank you for your contribution, and welcome to the project! ☺️ ❤️

@mikerasch mikerasch marked this pull request as ready for review August 15, 2022 02:18
@Zabuzard
Copy link
Member

(you can use interactive git rebase to change the author btw, not a big deal though)

@Taz03
Copy link
Member

Taz03 commented Aug 16, 2022

I think, u misread the problem. We want to close the help thread if the user leaves not delete it

@mikerasch mikerasch changed the title Removal of threads when user leaves Auto-close help thread if OP leaves server Aug 16, 2022
@mikerasch
Copy link
Contributor Author

I think, u misread the problem. We want to close the help thread if the user leaves not delete it

Fixed 👍 For some reason, I didn't think about archiving the thread and my mind just went to delete. Thanks for letting me know :)

Copy link
Member

@Taz03 Taz03 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also y clear db after every 7 days y not remove each thread when it gets closed

@mikerasch
Copy link
Contributor Author

also y clear db after every 7 days y not remove each thread when it gets closed

Eventually, the database will require a complete purge regardless. I feel like it would help ease the transactions done in the DB if it were to only purge every 30 days. Also, note the database will also be used for other purposes so I think keeping it saved for 30 days would have no harm.

Also, we need to take into account that any user is able to re-open the thread after it was closed which would complicate the process. I see no easy way to store the re-opened thread.

Taz03
Taz03 previously approved these changes Aug 20, 2022
@mikerasch mikerasch requested a review from Zabuzard August 20, 2022 19:48
@mikerasch mikerasch requested a review from Zabuzard August 22, 2022 09:30
@DevSerendipity DevSerendipity added the enhance command Modify or improve an existing command or group of commands of the bot label Aug 22, 2022
@DevSerendipity DevSerendipity added priority: normal enhancement New feature or request new command Add a new command or group of commands to the bot and removed enhance command Modify or improve an existing command or group of commands of the bot labels Aug 22, 2022
@mikerasch mikerasch requested a review from Zabuzard August 23, 2022 00:08
@Taz03 Taz03 removed the new command Add a new command or group of commands to the bot label Aug 24, 2022
@Zabuzard Zabuzard merged commit 97bb393 into Together-Java:develop Aug 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request priority: normal

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Auto-close help thread if OP leaves server

8 participants