world-id-discord
world-id-discord copied to clipboard
Improve your Discord server by verifying unique people with World ID.
Discord x Worldcoin
This project is a demonstration of serverless Discord Bot that uses IDKit to verify humans. Verified humans get a special role assigned which can then be used to manage special permissions.
Local development
For local development, you also will need ngrok. After you log in, you can reach the Setup & Installation section. There is an instruction on how to launch and configure ngrok
To create your own bot:
- Clone repo.
- Run
npm install. - Run
npm run dev. It will launch the app athttp://localhost:3000. - Launch
ngrok. - Run
ngrok http http://localhost:3000. - After this ngrok shows you your tunneled link in the
Forwardingfield. It will be something likehttps://9469-93-87-199-13.eu.ngrok.io. - Go to Discord Developer Portal.
- Press the
New Applicationbutton, set the app name, apply policies, and pressCreate. - At the
INTERACTIONS ENDPOINT URLfield paste.<Your NGROK tunneled url>/api/interactionsand pressSave. - Create a
.env.localfile in your directory and fill it with envs from.env.local.example. APPLICATION IDandPUBLIC KEYyou can find in theGeneral Informationsection on Discord Dev Portal.- To get a bot token:
- go to the
Botsection - Press
Add bot - Press
Reset Token - Token will be visible after this
- go to the
- Go to OAuth2 -> General -> Redirects -> add
<localhost or NGROK tunneled address>/api/auth/callback/discord - On the landing page press
Install nowbutton. - Install bot.
- Try the
/verifycommand.