Log in

Read Discord channel history from your bot

Add the Discord Get Channel History power-up so your bot can read messages from a Discord channel when it needs them, for example to summarise another channel or to find messages older than the recent context it sees when someone @mentions it.

Who can do this: team owners and admins.

🚨

Connect the Discord channel first

This power-up uses your bot's Discord connection. Set up the Discord channel before adding it. Until you do, the power-up's settings page shows Discord channel not setup.

Steps

  1. Open your bot, go to the Power-ups tab and click New power-up.
  2. Choose Discord Get Channel History and click Create power-up.
    The Discord Get Channel History card in the power-up catalog, found by searching for discord
  3. Edit the Power-up name and Description. For example: "Use this to read recent messages in a channel when the user asks what's been discussed there."
  4. Optionally choose a Channel under Channel settings to limit the bot to one channel. Leave it blank to let the bot choose a channel by name.
    Discord get channel history settings with the power-up name, description and an optional Channel dropdown
  5. Click Save.

The bot reads up to 100 messages per request (50 by default), and can page back to older messages.

Check it works

In Discord, @mention your bot and ask "What was discussed in #general today?" The bot should reply with a summary of that channel.

Troubleshooting

The bot can't read a channel

Your bot can only read channels its Discord role has permission to view. Give it access to the channel in Discord's channel permissions, then try again.

Last updated