Hey there, I'm currently working on a web project and I want to send messages in a Discord server using Puppeteer without relying on the Discord.js library. While I have successfully set up user authentication and navigated to the correct chat room, I'm facing difficulty in triggering the popup for the last message in order to send a private message.
For example:
https://i.sstatic.net/w3juQ.png
I've included a snippet of my code below which attempts to trigger the opening of the popup and extract the latest messages:
DiscordPage.exposeFunction('puppeteerLogMutation', (latestMessageId, latestMessage, username, userProfileId, userProfile) => {
sendUserAMessage(DiscordPage, latestMessageId, latestMessage, username, userProfileId, userProfile);
});
...
The issue I'm encountering is that even though the latest message is selected and highlighted, the popup isn't being opened as expected. If anyone has any suggestions or ideas on how to resolve this, I'd greatly appreciate it!