#message id shenanigans
1 messages · Page 1 of 1 (latest)
okay, let's try it like this.
- what is your context? a message create event? which message are you receiving right now?
- what message do you want to get
Message reference ID is the ID of the message that the person is replying to, right?
if 2 is the current message the reference is 1
Yes, now I want the ID of the 2nd message, the reply message
out of the context of that same message, 2?
But I only want the reply message ID and not any randomly sent ID
Sorry what?
again. you receive message 2 in that screenshot, with your bot
so the context is message 2
is what message is
the reference is message 1, because that is being replied to
my bad let me rephrase it
My bot will send the first message, then when I reply to that, I want the bot to log my replied text ID
<bot message>
Yes, now I want the ID of this
so you want the message that happens AFTER the bot message
that means you'd have to listen for messages after your bots message and wait for one to have the initial bot message as reference
this raises one issue: what if nobody ever replies to it?
They will, but that's irrelevant
https://discordjs.guide/popular-topics/collectors.html#message-collectors sounds like what you want then
with a filter that checks for the reference in collected messages to be the bot"s messages id
Alright, thanks man
collectors are "temporary listeners" in essence
Ye