Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement global blocklist #83

Merged
merged 42 commits into from
May 8, 2024
Merged

Implement global blocklist #83

merged 42 commits into from
May 8, 2024

Conversation

No767
Copy link
Member

@No767 No767 commented Mar 6, 2024

Summary

This PR focuses to implement a global blocklist. When an user is blocked by the bot, all tickets and access to the bot is nullified. For prefixed commands/messages, no response will go to the ticket and no response from commands will be sent back. For app commands, an ephemeral message is sent denoting that the user is blocked. Mods can either manually remove users from the blocklist manually or have it automatically removed after an desired amount of days. Hierarchy and permissions are factored into this process.

For simplicity and practicality purposes, the blocklist will only accept members, not roles. Modmail accepts both, but in the context of the transprogrammer server, it's too risky allowing roles to be blocked and each user isn't tied to an specific role. As the server has roles for a wide variety of labels, blocking one role just because of one user is in that role makes no sense.

Before this PR can be merged, a wide variety of tasks need to be completed. These are noted as the following:

  • Adding hierarchy checks for EntityConverter
  • Block for processing any further tickets
  • Check if the command execution timestamp is less than the expiration timestamp for config blocklist remove
  • Implement timer mechanism (either Sinbad's or R. Danny's) for automatically removing users off of the blocklist
  • Ensure to lock the ticket once an user has been added to the blocklist (if the user has any ticket at all)

Note: The timer and all other improvement features are slated to be implemented in another PR. This PR solely aims to provide the base implementation of the global blocklist system

Types of changes

What types of changes does your code introduce to Rodhaj
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (Updates to README.md, the documentation, etc)
  • Other (if none of the other choices apply)

Checklist

Put an x in the boxes that apply

  • If code changes were made then they have been tested.
    • I have updated the documentation to reflect the changes. (if appropriate)
  • All workflows (except pre-commit.ci) pass with my new changes
  • This PR does not address a duplicate issue or PR

@No767 No767 self-assigned this Mar 6, 2024
No767 added 2 commits May 7, 2024 17:00
In favor of a custom time converter based off of R. Danny's but is made to use with arrow
@No767 No767 marked this pull request as ready for review May 8, 2024 00:06
Copy link

sonarcloud bot commented May 8, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
2 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@No767 No767 merged commit 601e548 into main May 8, 2024
9 checks passed
@No767 No767 deleted the noelle/blacklist branch May 8, 2024 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant