BuildcordDocs

Wait for a reply

Wait for someone to send a message or react, or give up after a while.

flow.waitFor pauses the run until someone answers: a message in a channel, or a reaction to a message. Use it for quizzes, confirmations by reaction, and setup flows that ask questions one at a time.

Settings

SettingWhat it does
ForA message, or a reaction.
FromWho: empty is whoever started the flow; anyone is anyone; or a member's ID or token.
In channelFor a message: where. Empty is the flow's own channel.
On messageFor a reaction: which message. Empty is the one this flow last sent.
Give up afterHow long to wait: 60 seconds, 5 minutes, 10 minutes, 1 hour, 1 day, 1 week, or any length. The default is 5 minutes.

Ways out

Way outTaken when
They repliedThe answer came. Its values are the run's now: {message.content}, {message.id} and {user.id} for a message, {reaction.emoji} for a reaction.
No reply in timeThe time ran out.

Turn on If it fails for a red way out.

Notes

  • It needs a gateway bot, which the paid plan includes, and reading what a reply says needs the Message Content intent, which the builder adds.
  • The run is saved while it waits and takes no memory.
  • The first answer wins. If two runs wait for the same person in the same channel, the newer one gets the answer.

Example

A /quiz command asks a question, waits 30 seconds for a message from them, and compares {message.content} with the answer.

On this page