woodendoors7
woodendoors7

Reputation: 112

Detect if message is a reply

Is there any way to detect if message sent by a user is a reply or a standard message, and respond to each of those accordingly?

Upvotes: 0

Views: 3830

Answers (1)

Starman
Starman

Reputation: 319

You can check to see if the Message#type property is equal to "REPLY"


To answer your other question about whether a bot can "reply to other messages", I don't believe discord.js V12 currently covers this part of the Discord API. I have seen this will be part of discord.js V13 though. The official message on the discord.js discord server is this:

✨ Discord.js will support inline replies in v13, replacing Message#reply with the new functionality. If you'd like to try out the feature ahead of time, please install the master branch of Discord.js You can e.g. use NPM to do this: npm i discordjs/discord.js (this requires git to be added to PATH) ⚠ : There are many more breaking changes on master than just replies! ⚠

Update: v13 is out, so yes bots using discord.js v13 can now reply to messages using Message#reply

Upvotes: 6

Related Questions