Real-Dev-Squad / website-backend

The backend code for all our website-related apps
https://api.realdevsquad.com/
MIT License
50 stars 205 forks source link

Remove Unverified Role from Discord Server Members #1225

Open RitikJaiswal75 opened 1 year ago

RitikJaiswal75 commented 1 year ago

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

  1. Utilize the existing backend service, services/discordservice.js, which already contains the role removal functionality.
  2. Implement the following logic in the script and verification process:
    • When a user successfully completes the verification process on our website after running the /verify command in Discord:
      • Retrieve the verified user's Discord ID and store it.
      • Pass the discordUnverifiedRoleId from the configuration file as an argument to the existing role removal service in services/discordservice.js to 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.
  3. Test the feature extensively to verify its proper functionality and ensure it doesn't affect other parts of the system.
  4. Document the implementation steps and update the project's documentation accordingly.
  5. 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

Acceptance Criteria

Related Files

manish591 commented 1 year ago

Please Assign me this task. ETA: 10th September