RealDevSquad / RealDevSquad/website-backend
Remove Unverified Role from Discord Server Members
Open
@manish591 is already working on this.
Since Aug 31, 2023.
backend
enhancement
feature task
- Dominant language
- JavaScript
- Stars
- 74
- Forks
- 276
- Avg merge
- 1d 26m
- Merged PRs (30d)
- 14
Description
Issue Title: Remove Unverified Role from Discord Server Members
Issue Description
Currently, unverified users in the Discord server are assigned an "Unverified" role. We need to implement a feature that automatically removes this role from users who have completed the verification process on our website after running the /verify command in Discord. Additionally, we need to integrate this feature into a script that can be executed by a superuser to remove the unverified role from users who were verified before this feature was implemented.
Steps to Resolve
- Utilize the existing backend service,
services/discordservice.js, which already contains the role removal functionality. - Implement the following logic in the script and verification process:
- When a user successfully completes the verification process on our website after running the
/verifycommand in Discord:- Retrieve the verified user's Discord ID and store it.
- Pass the
discordUnverifiedRoleIdfrom the configuration file as an argument to the existing role removal service inservices/discordservice.jsto remove the "Unverified" role from the user.
- Integrate this logic within the appropriate sections of the script and verification process to ensure seamless removal of the unverified role.
- When a user successfully completes the verification process on our website after running the
- Test the feature extensively to verify its proper functionality and ensure it doesn't affect other parts of the system.
- Document the implementation steps and update the project's documentation accordingly.
- Update the README file with any necessary instructions for superusers to run the script and execute the role removal process for pre-existing verified users.
Additional Information
- The existing role removal service can be found in the backend at
services/discordservice.js. - The
discordUnverifiedRoleIdis already available in the configuration file and should be passed as an argument to the role removal service.
Acceptance Criteria
- The "Unverified" role should be automatically removed from users who successfully complete the verification process on our website after running the
/verifycommand in Discord. - The role removal feature should be integrated into a script that can be executed by a superuser to remove the unverified role from users who were verified before this feature was implemented.
- The role removal service in
services/discordservice.jsshould be consumed to remove the "Unverified" role. - The
discordUnverifiedRoleIdfrom the configuration file should be passed as an argument to the role removal service. - The script and verification process should be thoroughly tested to ensure proper functionality.
- Documentation and the README file should be updated accordingly.
Related Files
services/discordservice.js- Configuration file (containing
discordUnverifiedRoleId)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.