Connect your app to Discord
Connect your Lovable app to Discord using a bot token to send channel messages, read history, or show server lists. The bot can only interact with servers and channels you explicitly invite it to.
Anyone who wants their app to send Discord notifications, show server messages, or respond to slash commands.
Do this, in order
- 1
Go to the Discord Developer Portal, create a new application, open the Bot tab, and click Reset Token to copy the bot token.
The bot token acts as the credential that allows Lovable to communicate with Discord.
- 2
In the Developer Portal under OAuth2 URL Generator, select the bot scope and permissions like Send Messages, then visit the generated link to invite the bot to your Discord server.
The bot cannot see or post to any channels until it is invited to your server with the proper permissions.
- 3
In Lovable, navigate to Connectors, select Discord, click Connect, paste your bot token into the Bot token field, choose sharing options, and click Connect.
This saves and verifies the bot connection in your Lovable workspace so your projects can use it.
- 4
Open your Lovable project chat and ask Lovable to link your Discord connection and perform your desired action.
Lovable connects the bot to your specific project and writes the code to post or read messages.
Paste this into your project
Use Discord to build a contact form on the page that posts the user's name, email, and message into our support channel whenever the form is submitted.
Words decoded
- bot token
- A secret password that lets an app control a Discord bot.
- slash command
- A custom command typed into Discord starting with a slash (like /status) that triggers an action in your app.
Where people get stuck
- Your bot will fail to send messages if you do not grant it the Send Messages permission when creating the invite link.
- The connector does not log users into their personal Discord accounts; every action is taken by the single shared bot.
- The connector uses standard web requests and cannot join voice channels or maintain live gateway streams.
The short version, steps, decoder and prompt on this page are written automatically from Lovable's own documentation and can lag or misread it. The official page is always the authority.