Skip to main content

Event Filter

The Event Filter block allows you to filter events based on their properties. You can specify conditions that must be met for the event to trigger your flow.

You can add several filters to the same event listener. The flow only runs when the event matches all of them.

Filter targets​

TargetValueEvents
Message contentText, compared with the filter modeMessage create, Message update, Message delete, Direct message received
User IDA user IDAll except Bot joined server and Bot left server
Server IDA server IDAll except Direct message received
Channel IDA channel IDMessages, reactions, Server boost, Audit log entry
Message IDA message IDMessages, reactions, Server boost
Member roleA role ID or mention, with Has role or Doesn't have roleMessage create, Message update, Message reaction add, Server member add, Server boost, Server boost remove
Reaction emojiAn emoji, picked with the emoji pickerMessage reaction add, Message reaction remove
Message has attachmentYes or NoMessage create, Message update, Direct message received
Message mentions botYes or No, whether the message pings your botMessage create, Message update, Direct message received
User is botYes or No. Choose No to ignore botsServer member add, Server member remove, Message reaction add
Audit log actionThe actions, picked from a listAudit log entry
Voice actionThe actions, picked from a listVoice state update

The editor only offers the targets the event of your listener has. A filter on something the event doesn't have, like the message content of a Member Join, would stop the listener from ever running, so it can't be saved. Messages from bots are always ignored, which is why User is bot isn't offered for message events.

Message Content filters are case-sensitive. Enable Ignore Case so that !help also matches !Help.

Is One Of and Is Not One Of compare with several values separated by commas, for example a few channel IDs.

Values that aren't picked from a list can use parameters, like {{params.suggestion_channel}} for a Channel ID or {{params.staff_role}} for a Member role. Other placeholders don't work in filters, because filters run before the flow starts.

For Audit log entry listeners, filter on the Audit log action and pick the actions the flow runs for, like Member Banned and Member Kicked.

On Message delete, the message content and the user ID of the author are only known for messages Kite saw before they were deleted.

Filtering on the message ID and the reaction emoji is useful for reaction roles: the flow only runs for the right emoji on the right message.

How filters run​

Kite checks filters before the flow starts. Events that don't match don't run any blocks, unlike a condition block, which only runs once the flow has started. If a listener only cares about some events, like messages in one channel, a filter is the better choice.

Loading...