[Feature]: Automatic Role Reassignment and Inactivity-Based Removal
🚀 Description
I propose two key enhancements to optimize role management in Simple Discord Link, specifically within the [accessControl] section of the mod:
-
Automatic reassignment of the verified role
Add a configurable option such asreassignVerifiedRoleOnJoin = true. With this feature, each time a verified player joins the Minecraft server, the mod will check if they have the role specified inverifiedRole. If the role is missing (e.g., due to manual removal or error), it will be automatically reassigned. This ensures that verified players maintain their privileges without manual intervention. -
Role removal due to inactivity
Implement a configuration option likeinactivityDaysToRemoveVerifiedRole = X, whereXrepresents the number of days without connecting to the server. After this period, the mod will automatically remove the assigned role from the inactive player's Discord account. This feature helps keep the community focused on active players and frees up privileges for those who participate regularly.
💡 Use Case
Automatic role reassignment Scenario: A verified player with the "Active Player" role loses it on Discord due to an error or manual removal. Upon reconnecting to the Minecraft server, Simple Discord Link detects their verified status and automatically reassigns the role. Benefits:
- Reduced administrative burden: Moderators no longer need to manually restore lost roles.
- Guaranteed consistency: Verified players maintain their privileges without interruptions, enhancing their experience.
- Time savings: Eliminates the need for players to report role losses and wait for resolution.
Role removal due to inactivity Scenario: A player with the "Active Player" role does not connect to the server for 30 days (if inactivityDaysToRemoveVerifiedRole = 30). The mod automatically removes their role on Discord, restricting access to exclusive channels or benefits. Benefits:
- Optimized management: Filters out inactive players, keeping the community active and relevant.
- Improved experience: Reduces interactions or mentions of non-participating users, making the community more dynamic.
- Encourages participation: Motivates players to stay active to retain their privileges.
Additional potential
- Customization: Administrators can adjust the inactivity period (X) or enable/disable automatic reassignment based on server needs.
- Notifications: Add an automatic Discord message when a role is removed due to inactivity, e.g., "Your role was removed due to inactivity. Rejoin the server to regain it!"
- Support for multiple roles: Extend functionality to manage multiple verified roles, enabling more complex and adaptable server structures.
These improvements automate repetitive tasks, reduce manual effort for administrators, and foster a more active and organized community in Simple Discord Link.
Adding this as a task list to keep track of what is needed to implement this:
- [ ] Keep track of players joining the server. This should have a last joined date as well
- [ ] Check the verified role list against the player roles each time they join the server
- [ ] Have a background schedule that checks the join list each day, to remove roles from inactive players
- [ ] Need to decide where "You have lost your role" messages are sent to. Does it go to the chat channel, or should this be configurable