Autoresponder
Make the bot reply automatically when a message contains a phrase you choose, and understand what that matching does and does not catch.
An autoresponder watches every message in your server and replies when one contains a trigger phrase. Nobody has to call it. That is the whole difference between this and a tag: a tag is a thing a member asks for by name, an autoresponder is a thing that happens to them. Autoresponders cost nothing and every subcommand needs Manage Server.
A trigger matches anywhere in a message, not as a whole word
Matching is a plain substring test. A trigger of hi fires on this, on chip and on
whichever, because the letters are in there. Triggers are also case-insensitive in both
directions. The trigger is stored lowercased and the message is lowercased before the check, so
CashApp? catches cashapp? and the other way round. Pick phrases long enough that they cannot
turn up inside ordinary words.
Add an autoresponder
,autoresponder add takes the trigger,
then ||, then the reply.
Syntax
,autoresponder add <phrase> || <response>
Example
,autoresponder add cashapp? || my tag is $jasonquack
| Part | Means | Accepts |
|---|---|---|
<phrase> | the trigger, matched as a substring of every message | any text; stored lowercased |
|| | the separator between trigger and reply | spaces on both sides |
<response> | what the bot replies with | plain text and {variables} |
The || is matched as a whole word, so cashapp?||text is rejected as invalid syntax while
cashapp? || text works. Spaces around it are trimmed off both halves, so you do not have to count
them. A trigger that already exists in the server is refused rather than duplicated.
On slash, /autoresponder add takes the
phrase and the response as two separate options and joins them for you. There is no || to type.
The bot replies to the triggering message, as a Discord reply, in the same channel.
Delete the reply after a few seconds
Put ++delete <seconds> at the end of the response and the bot removes its own reply after that
long. It is the only flag the response takes.
Syntax
,autoresponder add <phrase> || <response> ++delete <seconds>
Example
,autoresponder add cashapp? || my tag is $jasonquack ++delete 10
| Flag | Means | Accepts | Default |
|---|---|---|---|
++delete | seconds before the bot removes its own reply | a whole number, 1 to 60 | none: the reply stays |
Everything from ++delete onwards is cut off the response, so put it last: a ++delete in the
middle of a reply silently truncates every word after it, and the timer still gets set. A value that
is not a whole number in range is refused outright rather than saved and quietly ignored.
To take a timer back off, run edit with the same response and no ++delete: an edit rewrites the
timer every time, and leaving the flag off rewrites it to none. A flag you forget is a flag you
removed.
Use variables in the response
The response goes through the variable pass, so {user}, {user.mention}, {guild.name} and their
relatives resolve to whoever sent the triggering message. Run
,customembed variables in Discord for
the current list.
Syntax
,autoresponder add <phrase> || <response>
Example
,autoresponder add rules? || {user.mention} the rules are in #rulesAn autoresponder never renders an embed
The reply is plain text. Embed codes are not parsed here, so
{title: Hi} posts as the literal text title: Hi and $p prints as itself. Last.fm and Spotify
tokens are not filled in either. They come out with their braces still attached.
An unrecognised {token} is not an error and does not stop the reply: it keeps its own text and
loses its braces, so {usr} posts as usr. If a bare word turns up in a reply where you expected a
name, that word is a variable you spelled wrong.
Change one you already made
,autoresponder edit replaces the
response and leaves the trigger alone.
Syntax
,autoresponder edit <phrase> || <response>
Example
,autoresponder edit cashapp? || ask a mod instead
It rewrites the ++delete timer as well, from whatever the
new response carries. So an edit with no ++delete clears a timer the autoresponder used to have.
Re-type the flag whenever you meant to keep it.
,autoresponder rename replaces the
trigger and leaves the response alone. It refuses a new trigger that another autoresponder already
uses, because two rows with the same phrase means one of them can never fire.
Syntax
,autoresponder rename <phrase> || <newname>
Example
,autoresponder rename cashapp? || paypal?
,autoresponder remove deletes one.
It only ever touches this server's autoresponders.
Syntax
,autoresponder remove <phrase>
Example
,autoresponder remove cashapp?
edit, rename, remove and author all find an existing autoresponder however you capitalise
its trigger. They normalise what you type the same way add did on the way in. info is the one
that does not, which is why it can answer "Invalid Phrases" for a trigger the others find.
See what the server already has
,autoresponder list pages through
every trigger in the server, numbered, with the total in the footer. It shows the triggers, not the
replies.
Syntax
,autoresponder list
,autoresponder info shows one
trigger's phrase and its full response.
Syntax
,autoresponder info <phrase>
Example
,autoresponder info cashapp?
,autoresponder author names whoever
created it. If that person has left the server it says so and gives the ID rather than guessing at a
member who is still around.
Syntax
,autoresponder author <phrase>
Example
,autoresponder author cashapp?
Clear every autoresponder
,autoresponder reset deletes all of
them for the server at once. There is no confirmation and no undo.
Syntax
,autoresponder reset
What an autoresponder will not do
Some of this is the useful half of the feature, and some of it is a limit worth knowing before you build around it.
| Question | Answer |
|---|---|
| Can I turn one off in a single channel? | No. There is no per-channel disable and no ignore list: a trigger applies in every channel the bot can see |
Does ,command disable stop it? | No. That switches off commands, and an autoresponder is not a command. It fires before any command is looked up |
| Do the message filters suppress it? | No. A message the word filter deletes was still checked against your triggers |
| Does it reply to other bots? | No. Bot messages are dropped before anything in this pipeline runs |
| Does it fire in a trap channel? | No. A trap catch ends the message there |
| Does it fire on a message that trips flood protection? | No. A spam trip ends the message there too |
If you genuinely need an autoresponder silenced in one room, the only lever the bot gives you is the channel's own permissions: take the bot's Send Messages away there and it cannot reply.
Only one autoresponder fires per message
When a message contains two triggers, exactly one reply is sent. Which one wins is not the longer trigger and not the more specific one. It is whichever the bot reaches first in the list it holds for your server. That list comes back from the database in no particular order, so today it will usually look like the oldest trigger wins, and that is not a rule you can hold the bot to. An order nobody set is an order that can change under you.
The practical consequence: a short trigger that is a substring of a longer one can make the longer
one unreachable. If cash and cashapp? both exist, a message containing cashapp? contains both,
and only one of them will ever answer. Overlapping triggers are not a way to layer replies. They
are a way to lose one.
Common issues
My autoresponder fires on words I never meant. That is substring matching working as designed.
Lengthen the trigger, or add the surrounding punctuation you actually expect: cashapp? is far
safer than cash.
Two triggers overlap and the wrong one keeps answering. Only one fires per message and the order is not something you can set. Rename one of them so they cannot both match the same text.
I want it off in one channel only. You cannot do that with the autoresponder itself. Remove the bot's Send Messages permission in that channel, or drop the trigger.
,autoresponder info says the phrase is invalid but list shows it. info looks the phrase up
exactly as you typed it, while triggers are stored lowercased, so copy the phrase out of
,autoresponder list rather than retyping it
with capitals.
The reply is showing title: Hi instead of an embed. Autoresponders do not parse embed codes.
See Use variables in the response above.
My ++delete timer vanished after I edited the reply. Every edit rewrites the timer from the
response you just gave it, so an edit without the flag removes one. Run edit again with ++delete
on the end.
A ++delete timer never took effect. Check it is a whole number between 1 and 60 and that it is
the last thing in the response: anything after ++delete is cut off, so a timer in the middle of a
reply also truncates the text you meant to send.
Nothing here fixed it. The shared common issues page works the same ground from the symptom end.