Detect replies and edit own message

Can I make my bot detect when a user is replying to it and then update the message that was replied to? I have a bot that writes messages. And I want the ability to tell it to correct a message if I'm replying to it.
6 Replies
d.js toolkit
d.js toolkit10mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button!
d.js docs
d.js docs10mo ago
property Message#reference Message reference data
jiins5
jiins510mo ago
i think u have to do ur own logical there is nothing like that in discord js so u have to create ur own
주체사상공부모임 위원장 매트
I know I have to do the logic on my own. I just wanted to know if the basic components to assemble that logic existed. I.e. does a variable/property exist that holds an instance of the message that was replied to, and does a function/method exist that lets me edit that message, if that message was indeed authored by the bot? I’m asking for a variable/property and a function/method. I know I have to write my own command using them, but I have to know whether they exist before I can use them to write my command/the logic.
treble/luna
treble/luna10mo ago
read this
zackderose
zackderose10mo ago
Having a similar question. Working on a bot that will let an admin move questions to our forums channel. From what I've seen we can easily get a reference to the parent message given we have the child via Message#reference as mentioned. But what I really need is a way to gather all child replies given a parent Message. I imagine we could listen to any ReplyMessage and keep them in the bot's memory. This seems overkill, but would work I believe.