- Post a text message to a channel the bot can access
- List the servers the bot has joined
- Read recent messages in a channel
- Receive slash-command interactions on a public URL you register for the bot
Common use cases and example apps
These examples show what you can build with Discord, each with a prompt to start from.How to connect Discord
Who can create Discord connections depends on your plan and workspace settings. App + chat connectors are available by default on Free, Pro, and Business plans. On Enterprise plans, they are effectively disabled at first: Who can create connections and clients defaults to No one until an admin changes it in Connectors → Admin settings → App + chat connectors. You can create multiple Discord connections using different bot tokens, which is useful for separating environments (for example, development and production) or running several bots. When the connection is created, you can link it to the projects where you want to use it. Anyone building in a project can ask Lovable in chat to link their project to it.Prerequisites
Before connecting Discord, make sure you have:- A Discord account
- A Discord application with a bot, and that bot’s token
- Permission to create connections in your Lovable workspace (see Who can create connections and clients)
The Discord bot HTTP API does not charge for these requests. Discord rate limits still apply, and Discord enforces them, not Lovable.
Step 1: Create a bot and copy its token
The token is the credential for one Discord bot. You create the application in the Discord Developer Portal. To create a bot and copy its token:1
Open the Developer Portal
Sign in at the Discord Developer Portal.
2
Create an application
Click New Application, name it, and create it.
3
Copy the bot token
Open Bot and click Reset Token. Copy the token and store it securely. The form field in Lovable is labeled Bot token, and the hint reads “Bot token from the Discord Developer Portal (Bot page).”
4
Invite the bot to your server
Open OAuth2, then URL Generator. Select the bot scope, choose the permissions the bot needs (include Send Messages if the app will post), and open the generated link to add the bot to your server.
Step 2: Connect Discord to Lovable
The connection form asks for the bot token from Step 1.1
Open Discord in Connectors
Open Connectors and select Discord. For the other places to open the catalog from, see Where to find connectors.
2
Add a connection
Click Add connection and select App + chat connector. The form is split into collapsible sections, Details, Configure connection, and Sharing.
3
Name the connection
Under Details, Lovable fills in a name for the connection, which you can change. The name is only used inside Lovable to identify the connection.
4
Configure the connection
Under Configure connection, enter:
- Bot token: paste the token from the Developer Portal Bot page.
5
Choose who can use this connection
Under Sharing, the connection is private to you by default and shows a Private label. To share it, click Share with others. Then add workspace members by email, or click Invite entire workspace to make the connection available to everyone in your Lovable workspace.See Who can use connections and clients for more information.
6
Connect
Click Connect. Lovable verifies the bot token against the Discord API before saving the connection.
Limitations
The Discord connector cannot:- Create the Discord application or invite the bot for you. Do that in the Developer Portal.
- Sign each person into their own Discord account. Each connection is one bot, shared across the projects linked to it.
- Join voice channels or keep a live gateway connection open. The connector covers HTTP calls: messages, server list, channel history, and slash-command HTTP callbacks.
Manage your Discord connection
Connections are managed from Connectors: select Discord, then open the connection.- Unlink projects to remove Discord access from specific projects while keeping the connection available for others. See Unlink projects from a connection for the steps.
- Delete the connection to remove it from the workspace entirely. Deleting is permanent. It removes the credentials from all linked projects, and app features that use Discord stop working until a new connection is added. See Delete a connection for the steps and who can delete.