Discord Bot
Set up a Discord bot with API access for messaging, moderation, and server management.
getapi discord
Prerequisites
- A Discord account
- A Discord server where you have 'Manage Server' permission (or create a test server)
Credentials
| Variable | Description | Sensitive |
|---|---|---|
DISCORD_BOT_TOKEN |
Bot token for authenticating your bot with the Discord API | Secret |
DISCORD_APPLICATION_ID |
Application ID (also called Client ID) for your bot | Public |
Setup Steps
- 1 Info
- 2 Open URL
- 3 Choice
- 4 Info
- 5 Confirm
- 6 Info
- 7 Input
- 8 Info
- 9 Confirm
- 10 Info
- 11 Input
- 12 Info
- 13 Confirm
- 14 Validate
Things to Know
- Bot tokens are shown only once after reset. If you lose it, you'll need to reset it again (which invalidates the old token).
- The 'Message Content Intent' is a privileged intent. For bots in over 100 servers, you need to apply for verification to use it.
- Discord rate limits are per-route. Respect the rate limit headers to avoid getting your bot temporarily banned.
- Bot permissions are determined both by the OAuth2 invite URL AND the role assigned to the bot in the server.
- For slash commands, you'll also need the 'applications.commands' scope in the OAuth2 URL.