--- title: "Discord" description: "Interact with your agent through Discord" --- You can create a Discord application and connect your IronClaw agent to it. Once configured, you can talk to your agent in direct messages or add it to a group chat so it can participate there. If you haven't set up your agent yet, follow our [Quickstart guide](../quickstart) --- ## Set up the Discord channel In order to create a new Discord application, navigate to the [Developer Portal](https://discord.com/developers/applications). Click on the "New Application" button, give it a name (e.g. IronClaw), and click "Create". Navigate to the "Bot" tab on the left sidebar, under the "Token" section click on "Reset Token" and copy the token that is generated. You will need this token to connect your Discord application to IronClaw. Invoke the IronClaw CLI onboard wizard using the `--channels-only` flag to configure only the channels without going through the entire onboarding process again: ``` ironclaw onboard --channels-only ``` If you have not setup a `Tunnel` yet, the wizard will ask you to choose a tunnel provider and set it up. We recommend using [ngrok](https://dashboard.ngrok.com/) for its ease of use and reliability. ![ngrok setup](/images/channels/tunnel.png) Select the Discord channel from the list of available channels to install it. Enter the bot token from the `"Bot"` tab in the [Discord Developer Portal](https://discord.com/developers/applications), and the public key from the `"General Information"` tab. Start the `ironclaw` agent: ``` ironclaw ``` Discord does not allow to message bots directly, so you will first need to add it to a server you are part of, and then you can DM the bot from there. Generate an invite URL in the "OAuth" section of the [Discord Developer Portal](https://discord.com/developers/applications) with the following `scopes` enabled: - bot - applications.commands Then select - at minimum - the following `Bot Permissions`: - View Channels - Send Messages - Read Message History - Add Reactions Copy the generated URL at the bottom, paste it into your browser, select your server, and click Continue to connect. You should now see your bot in the Discord server. In order to be able to trigger the bot in group chats, you need to edit the `.ironclaw/channels/discord.capabilities.json` file and add the `channel ID` of the channel where you want the bot to be active to the `mention_channel_ids` list. To get the channel ID, **enable Developer Mode** in your **Discord settings**, right-click on the channel where you want the bot to be active, and click "Copy ID". Now that you share a server with the bot, you can send it a direct message. Click on its name in the member list and send them a direct message. The bot will reply with a pairing command that you need to execute in the terminal to complete the pairing process and start chatting with your agent.