All guides

How to auto-publish only some messages in Discord

Can a bot publish only some of my announcements?

Yes. Auto Publisher (auto-publisher.gg) publishes your announcement channel messages for you, and with Premium it publishes only the ones you choose: by text, author, mention or webhook. Text filters also read embeds, so feed posts can be filtered too. Messages that don't match are never published (crossposted) and stay in your server.

How do I set up a filter?

  1. Add Auto Publisher to your server and enable the channel, as described in How to auto-publish announcement channel messages.

  2. Get Premium for that server. Filters are a Premium feature.

  3. Open the channel's rule. In Discord, run /ap filters and pick the channel (you need the Manage Channels permission). Or sign in to the dashboard, choose your server and open Filters.

  4. Add conditions and pick All or Any. The change applies from the next message.

A channel with no conditions publishes every message.

What can a filter match?

A filter is one rule per channel. The rule is a list of conditions, and each condition is a field, an operator and one or more values. A condition matches when any one of its values matches.

FieldOperatorsValues
Contentcontains, doesn't containWords in the message text, embeds included
Authoris, is notThe users or bots that posted it
Mentionmentions, doesn't mentionRoles or users it mentions
Webhookis, is notThe webhook that posted it, by ID

Content values ignore capital letters. A plain word such as spam matches that whole word only. Use * as a wildcard:

  • spam* matches a word that starts with "spam"
  • *spam matches a word that ends with "spam"
  • *spam* matches a word that contains "spam"

All publishes a message only when every condition matches. Any publishes it when at least one does. Use a negative operator, such as "doesn't contain", to keep a kind of message out.

Example: publish only posts that contain a word

Your team posts patch notes and chat in the same channel, and only the patch notes should go out.

Messages will be published when this condition matches:

  • Contentcontainspatchrelease*

release* also matches "released" and "releases". A message without either word is not published.

Example: publish only one webhook's posts in a shared channel

Several bots and webhooks post in one channel, and followers should only get your changelog webhook. Copy the webhook's ID from its URL: it is the number after /webhooks/.

Messages will be published when this condition matches:

  • Webhookis123456789012345678

To publish everything except one noisy bot instead, use Author is not and pick that bot.

Example: filter RSS and news feed posts by their embed text

Feed bots usually post an embed with an empty message, so a filter that only read the message text would see nothing. Content conditions also read the embed's title, description, fields, author and footer, and the text of messages built from Discord's newer components.

Messages will be published when All of these conditions match:

  • Contentcontainsdiscordbot*
  • Contentdoesn't containsponsored

This publishes feed items about Discord or bots, unless they are marked as sponsored.

What happens to my filters if Premium ends?

They are kept. A channel with a filter is paused on the Free plan instead of publishing everything, and resumes, filter included, when the server has Premium again. To publish every message in it on the Free plan, remove the filter and enable the channel again.

Messages a filter holds back are never published, so they don't count toward Discord's limit of 10 published messages per hour. For every command in one place, see How It Works.