Skip to content

Conversation

myrkvi
Copy link
Member

@myrkvi myrkvi commented Aug 12, 2025

Changes the prune command so that instead of it having a dry-run option, it is a two-step process where one has to confirm that one wants to go through with pruning.

Notable changes:

  • New database table for storing prune data to be processed or post-processed.
  • User leave listener and audit log listener check for relevant entries before sending out messages, only doing so if the member was not pruned.
  • Sends leave messages as one after users are kicked.

Work needed:

  • The waiting for confirmation part should only be valid for a limited time.
  • The bot should re-check that a member is still pending when trying to kick.
  • Testing with larger amounts of users to prune.
  • Handling of longer log / join/leave messages.

Changes prune command to not have a separate dry-run state, instead
collecting all the info and storing it in the DB, to be processed if the
user confirms the action.
@myrkvi myrkvi force-pushed the feature/refactor-pruning branch from 232a70b to 514fac7 Compare September 20, 2025 09:55
Only the prune-related queries are very time-sensitive, and as such
are really the only ones that need the default transaction skipped.
For other transactions, it should not be an issue.
@myrkvi myrkvi force-pushed the feature/refactor-pruning branch from ceefd5b to 3498fb6 Compare September 20, 2025 12:50
@myrkvi myrkvi marked this pull request as ready for review September 20, 2025 13:40
@myrkvi myrkvi merged commit f52483d into main Sep 23, 2025
4 checks passed
@myrkvi myrkvi deleted the feature/refactor-pruning branch September 23, 2025 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant