ToShopToShop DocsBeta
ToShopToShop DocsBeta
HomepageWelcome to ToShop

Start Here

Using ToShop

Customize

ShopifyTelegramDiscord

Help

Integrations

Discord

Connect a Discord bot to an agent — guild-scoped, channel-scoped, multi-guild routing.

Discord is ToShop's other first-class connection. Configure a bot, scope it to specific guilds and channels, and your agent shows up where your team is already talking.

Setup

Create a Discord app

Go to discord.com/developers → New Application → Bot → copy the bot token.

Enable Message Content Intent

Required — bot won't see message text without this

Same page: Bot → Privileged Gateway Intents → Message Content Intent. Toggle on.

Invite the bot to your server

Use the Developer Portal's OAuth2 invite link to add the bot to your server. The minimum permissions it needs: read messages, send messages, read message history.

Add the connection in ToShop

Open the Connections tab in the left sidebar → Add Connection, choose Discord, and follow the prompts to wire up your bot. Credentials are stored in your OS keychain.

Route to an agent

Pick which agent should handle this Discord. Different servers can route to different agents.

Credentials and policies

  • Bot Token — The token from the Discord Developer Portal. Stored in your OS keychain.
  • Guild ID — The Discord server ID this bot serves.
  • Channel ID (optional) — Limit the bot to one specific channel within the guild.
  • Allowed channels — A list of channel IDs the bot is allowed to listen in (an alternative to a single Channel ID).
  • Group policy — Allowlist (default — only listed channels) or open (any channel in the guild).

Finding IDs in Discord

Enable Developer Mode

User Settings → Advanced → Developer Mode.

Right-click to copy

Right-click any guild or channel → Copy ID.

How messages route

DM the bot

1:1 conversation with the bound agent.

Mention in a channel

Your agent responds to the mention. Replies in the same thread keep the conversation context.

Slash commands

If you set them up per agent, users can trigger structured commands fast.

Multiple Discord guilds per agent

One agent can be bound to multiple Discord guilds (for example, your team's main server plus a customer support server). Each guild keeps its own channel context, but the same agent handles all of them.

How it stays connected

ToShop keeps your Discord bot online over Discord's real-time gateway. Slash command interactions use webhooks. You don't have to configure this — it picks the right method for you.

Server-side gotchas

Status indicators

Same set as Telegram: Connected, Standby, Degraded, Disconnected — shown on each connection card in the Connections tab.

Common patterns

Team Q&A bot

Answer questions about your runbook, codebase, or Shopify catalog in #help.

Ops dashboard channel

Routines post daily summaries to #ops.

Approval gate channel

Long-running tasks ping #approvals when a human green-light is needed.

Per-channel skill scoping

#shop-ops routes to your Shop Agent (Shopify only); #dev-ops routes to your Dev Agent (GitHub + terminal).

Related

  • Telegram — the other connection.
  • Multiple Agents — routing different connections to different agents.
  • Routines — schedule tasks to post into a Discord channel.

Telegram

Connect a Telegram bot to an agent — DMs, groups, allowlist control, multiple accounts.

Teams

Shared workspaces — pool agents, skills, and rules across teammates.

Table of Contents

SetupCreate a Discord appEnable Message Content IntentInvite the bot to your serverAdd the connection in ToShopRoute to an agentCredentials and policiesFinding IDs in DiscordEnable Developer ModeRight-click to copyHow messages routeMultiple Discord guilds per agentHow it stays connectedServer-side gotchasStatus indicatorsCommon patternsRelated