Read a message
Look up any message by its link or id, and use what it says.
message.fetch reads a message the bot can see, anywhere in the server.
Settings
| Setting | What it does |
|---|---|
| Message | The message's link, or its id. Tokens such as {message.replyTo.id} or a link kept in a row work. |
| In channel | Only needed for an id of a message in another channel. A link already says which channel. |
Ways out
| Way out | When |
|---|---|
found | The message was read. |
missing | It's been deleted, or the bot can't see its channel. |
Turn on If it fails for a red way out for anything else.
Tokens
| Token | Value |
|---|---|
{fetched.content} | Its text |
{fetched.author.id}, {fetched.author.name}, {fetched.author.mention} | Who wrote it |
{fetched.author.bot} | true if a bot wrote it |
{fetched.link}, {fetched.id}, {fetched.channel} | Where it is |
{fetched.attachments} | How many files it has |
{fetched.attachment} | The address of its first file |
{fetched.embeds} | How many embeds it has |
{fetched.pinned}, {fetched.edited} | true or false |
{fetched.createdAt} | When it was sent, in seconds since 1970 |
Notes
- The bot needs the Read Message History permission in that channel.
Example
On Message sent, if the message is a reply, read the message it replies to and quote it in a log channel.