For local development, we use a mock of the Discord API to simulate interactions without requiring a Discord bot token. This improves the developer experience and eliminates security concerns related to token management.
- Clone the repository and install dependencies as usual.
- No Discord bot token is required for local development.
- The mock API is automatically used in non-production environments.
- The mock API is used by default in development environments.
- To use the real Discord API locally (requires a bot token):
- Set
NODE_ENV=production
in your.env
file. - Add your Discord bot token as
DISCORD_BOT_TOKEN
in the.env
file.
- Set
To add or modify mock data, edit the JSON object in src/mocks/discordData.json
.
When submitting pull requests, there's no need to include any Discord bot tokens or real API interactions. The CI/CD pipeline will handle testing with the mock API.