BuildcordDocs

Message check

Branch on what a message holds, for auto-moderation.

logic.message looks at a message's text for what moderation bots look for: banned words, links, invites, files, mentions, shouting and spam.

Settings

SettingWhat it does
Check whether itSee the table below.
Words, pattern or amountWhat the check needs, if anything.
TextThe text to check. Empty is the message that started the flow, {message.content}.
CheckPasses when the message
Contains any of these wordsHas one of a list of words, separated by commas, such as {var.bannedWords}. Words match whole and ignore capitals and punctuation, so cat doesn't match catalog.
Has a linkHas a web address.
Has a server inviteHas a discord.gg or discord.com/invite link.
Has a fileHas an attachment.
Mentions someoneMentions a member.
Is mostly capitalsIs at least 8 letters and mostly capitals: 70% unless you give another share.
Has at least this many emojiHas that many emoji or more: 5 unless you say.
Is at least this many characters, linesIs that long.
Matches a patternMatches a regular expression.

Ways out

Way outTaken when
It doesThe check passes.
It doesn'tIt doesn't.

Notes

  • Reading a message's text needs the Message Content intent, which the builder adds when a flow reads {message.content}.

Example

On Message sent: a Message check for invites, then Delete a message and Timeout a member for 10 minutes.

On this page