Log in

Answer questions in your Slack or Discord community

A community bot is for products, open-source projects, creators and games that run a Discord server or Slack community. The same questions arrive every day in #help, and volunteers or moderators answer them between everything else. The bot answers from your docs and FAQs when someone mentions it or messages it, so members get an answer in seconds and moderators can focus on the conversations that need them.

Because the bot can read recent messages in the channel, it can also join a discussion ("what's the answer to what Sam asked above?") and, with the history power-ups, summarise what happened in a channel this week.

ℹ️

Plans

The Discord and Slack channels need Standard or above. The history and posting power-ups need a paid plan, and scheduled tasks need Standard or above. Every message the bot answers uses your team's message tokens, so busy communities should set a daily limit. See Compare plans.

Who can do this: team owners and admins set this up.

What you'll set up

  1. Knowledge sources. Add your docs or help centre as a website data source, plus your community rules and FAQ as manual content. Add tutorial videos from YouTube and your changelog through RSS. Turn on automatic syncing.
  2. Instructions. Write the Prompt using the example below, including the tone of your community. See Write your bot's instructions.
  3. Channel.
    • Discord: create a Discord application and connect it with the Gateway transport, so the bot answers slash commands, @mentions and direct messages and keeps context in threads. Set Recent messages to include (0 to 20, default 10) to control how much of the channel it reads when mentioned. See Add your bot to a Discord server.
    • Slack: members @mention the bot in a channel or thread, message it directly, or open it from Slack's assistant sidebar. In channels it only replies to messages that mention it. See Add your bot to Slack.
  4. Power-ups. Add Discord Get Channel History (Discord power-ups) or Slack Get History and Slack Send Message (Slack power-ups) so the bot can read older messages and, on Slack, post updates. Add Talk to a human with your moderators' inbox for reports and account problems.
  5. Usage limits. Turn on Daily token limit and Maximum message length so a spammer or a runaway thread can't use up your tokens. See Limit how many tokens your bot can use.
  6. Analytics. Conversations from Discord and Slack appear in Conversations. On Pro and Enterprise, Analytics shows the most common questions, which is a good list for your next FAQ or docs page.

For a regular digest, pair the Slack power-ups with a scheduled task, for example "Every Friday at 4pm, summarise this week's questions in #help and post the five most useful answers in #announcements."

Example instructions

You are Ace, the community helper in the Acme Discord server. Acme is an open-source static site generator.

How to help:
- Answer questions about installing, configuring and deploying Acme from the documentation provided. Include a short code example when it helps.
- Link to the relevant docs page at the end of each answer.
- If the question refers to earlier messages ("same problem as above"), use the recent channel messages to understand it.
- If the docs don't cover it, say so and suggest opening a GitHub discussion. Never invent config options or commands.

Tone:
- Friendly and brief, like a helpful regular in the server. No corporate phrasing.
- Don't reply to off-topic chat or jokes unless asked a question.

Moderation:
- You are not a moderator. For harassment, spam or account problems, tell the member to contact a moderator and use the Talk to a human power-up if they give an email.

More starting points: community bot prompts in the prompt library.

Example conversations

In a Discord #help channel:

Member: Build fails with "cannot find layout: post"

Another member: same for me after upgrading

Member: @Ace any idea?

Ace: Since version 3, layouts live in src/layouts rather than layouts. Move your post layout there, or set layoutsDir: "layouts" in acme.config.js to keep the old location. Upgrade guide: Migrating to v3

In Slack:

Member: @Ace what did people decide about the plugin API in #contributors this week?

Ace: Three things came out of #contributors this week: plugins will get a beforeBuild hook, the old onInit hook is deprecated in the next minor release, and Priya is drafting the docs. The thread with the details is from Tuesday.

Pitfalls

  • Answering everything. A bot that replies to every message in a busy channel gets muted. In channels, the bot on Discord and Slack replies when someone mentions it or, on Discord, uses its slash command, which is what most communities want. Tell members how to call it in your #help channel description.
  • Uncapped token use. Public communities attract people testing the bot. Set a daily token limit and a maximum message length before you announce it.
  • Stale docs, confident answers. Community questions cluster around new releases. Sync your docs and changelog automatically so the bot knows what changed.
  • Missing permissions. On Discord, the Gateway transport needs the Message Content Intent turned on in the Discord developer portal. On Slack, the bot must be invited to each channel it reads from or posts to.
  • Private channels in shared answers. A history power-up can read any channel the bot has access to. Limit it to one Channel in its settings if some channels shouldn't be summarised in public.
  • Add your bot to a Discord server

    Connect your bot to Discord so it answers slash commands, @mentions and direct messages in your server, using your knowledge and power-ups.

  • Add your bot to Slack

    Create a Slack app for your bot so your team can ask it questions with @mentions, direct messages or the Slack assistant sidebar.

  • Limit how many tokens your bot can use

    Cap a bot's daily message token use, get an email before it hits the cap, limit message length, and see what people see when a limit is reached.

Last updated