We have integrated linked roles into our Discord server, making it more organized and enhancing the user experience. Users can now link their Discord profile to GitHub, allowing us to verify their identity. This gives users access to additional channels and roles, such as Lib Contributor
, Guide Contributor
, and more. These roles are no longer assigned manually by the team; users can automatically receive them by visiting the role API and linking their Discord account.
- Link your Discord account to GitHub on the connections page in Discord.
- Open the dropdown menu in the Discord server and click on "Linked Roles".
- Select the role you want to assign to yourself and press on the WWebJS requirement.
- Visit the role API and log in with your Discord account.
- The role API redirects you and displays a log-in/failed/success page with information.
- You can now collect the roles and access the channels.
Here you can find an exmaple of the process.
The user connects at /verify
and is then redirected to log in with Discord. After logging in, the user is redirected to our role API, which sends a request to the Discord API to obtain the user's Discord identity. The user is then redirected back to /discord-oauth-callback
, where the information is processed. The role API checks the database to see if the user is already registered, whether they are blocked manually, and if a request to GitHub has been made in the last hour to reduce data traffic. If not, the role API sends a request to the GitHub API to get the user's GitHub contributions. Then, the role API sends a request to the Discord API to add metadata information. If everything is successful, the user will see a success page. The user can now collect roles on Discord and access restricted channels.
- Discord documentation
- Vercel documentation
- Apollo documentation
- MongoDB documentation
- Express documentation
- Website
- Guide (source) (work in progress)
- Documentation (source)
- WWebJS Discord
- GitHub
- npm
WWebJS discord-linkedroles is licensed under the MIT license. Please see the LICENSE file for more information.