Set up local interactivity with ngrok
mainDiscord requires a public HTTPS endpoint to send interaction requests. For local development, use ngrok to tunnel traffic to your local machine.
- Start ngrok on port 3000:
ngrok http 3000 - Copy the Forwarding URL: Find the URL starting with
https://(e.g.,https://1234-someurl.ngrok.io). - Configure Discord:
- Go to your app's settings in the Discord Developer Portal.
- On the General Information tab, locate the Interactions Endpoint URL field.
- Paste your ngrok URL and append
/interactionsto the end (e.g.,https://1234-someurl.ngrok.io/interactions). - Click Save Changes.
ngrok http 3000