Message
Everything you do with a single message: catch it when it arrives, read it, reply, edit, delete, pin and react.
Show the whole Message flyout

Catching a message
when a message is received fires for every message in every channel your bot can see, including messages from other bots and from your own bot.
when a message is received from a human is the same event with bot messages filtered out. Use this one unless you specifically want to react to bots. It saves you an if and prevents the classic loop where your bot replies to itself forever.
Inside any of these events, message received is the message itself.
When the bot receives a DM
when the bot receives a DM fires when someone sends your bot a direct message. Messages sent in servers are ignored, and so are messages from bots, so replying to a DM won't make your bot answer itself.
Use message received inside it just like the other message events. content of the message, channel of the message and the reply blocks all work here, and get author (user) of message received gives you the person who sent the DM. There is no server or member in a DM, so blocks that read the server or the member who sent the message don't belong in this event.
Reading a message
One block with a dropdown covers the common properties: content, author (user) and channel.
| Block | Returns |
|---|---|
| True when the message is a reply to another. | |
| The message it replied to. | |
| Whether the reply pinged the person being replied to. |
Getting a specific message
get the message with id equal to ... on the channel ... fetches a message you know the ID of. Enable Developer Mode in Discord to copy a message ID from the right-click menu.
To fetch several at once, use get last ... messages of channel from Channels.
Sending and editing
| Block | What it does |
|---|---|
| Replies to the message, in the same channel. | |
| Replaces the components of a message the bot sent. | |
| The message that was just sent. Use it right after a send or reply block. |
Both take a components input. See Components for what goes in it.
Messages only ping users unless you change it with the gear on the block. See Allowing pings.
A bot can only edit its own messages. Discord does not allow anything else.
Deleting
delete message removes it. The bot needs the Manage Messages permission unless the message is its own.
To clear a lot at once, use delete the last ... messages on channel from Channels.
Pinning
| Block | What it does |
|---|---|
| Pins the message. | |
| Unpins it. |
A channel can hold 50 pinned messages.
Reactions
react to message ... with emoji adds a reaction. Use a standard emoji directly, or the name of a custom emoji from the server.
Reading reactions
get users of reaction ... with emoji gives you a list of everyone who reacted with a specific emoji. The dropdown also offers the count.
for each reaction in ... loops over every reaction on the message. Inside the loop:
| Block | Returns |
|---|---|
| The emoji of the current reaction. | |
| How many people used it. | |
| The members who used it. |
For the event that fires the moment somebody reacts, see Message Actions.
A worked example: a starboard
when a reaction is added to a messagefrom Message Actions.- Check the emoji is ⭐ and the count is at least 3.
- Build a message with a container, the original text, and a link back.
send message in channelinto your starboard channel.- Store the original message ID in a database so you never post the same message twice.