Closed ayoubqrt closed 11 months ago
@luca-montaigut @potb @neolectron some of you can review ?
@potb as I said for the partials, it's mandatory to fetch all the messages because when u have a partial message, u only have the ID. It's a decision to take but for me it's no necessary. Let's try with this version of this feature and we will see
And sorry for the force push, I need to see for the next time how to manage the fact that you merged master on my branch @potb
⚠️ This feature needs a new environment variable:
FIX_EMBED_TWITTER_VIDEO_EXCLUDED_CHANNEL_ID
For this feature, I use native custom buttons of Discord. I use them for multiple reasons because the UX and the DX is better.
Now this feature is called only when the tweet contains a video. So the bot will reply with the link of the fxtweet. Two buttons will be available, one if the user want to delete the bot's answer, and the other to ignore the buttons (because buttons take a lot a place). If the user has ignored buttons and still want to delete the bot's answer, he can react with the emoji 🚮 (limitation: if the bot restart, it will not work).
The only problem with buttons is that it can't be only displayed to the user that sent the message. The message can ONLY be ephemeral after a user use a slash command.
I used native buttons because there is some limitations with emoji reaction:
messageReactionAdd
will not be longer fired. You need the refetch the message, so maybe you need to store the IDs in the DB 😴. Or we can usePartials
: https://discordjs.guide/popular-topics/reactions.html#listening-for-reactions-on-old-messages But with partials we have to fetch all messages who receive a reaction.