Markoudstaal / node-red-contrib-discord-advanced

Recieve, send, edit and delete Discord messages in node-red.
MIT License
47 stars 16 forks source link

Support flags for sent messages #109

Open skylord123 opened 6 months ago

skylord123 commented 6 months ago

I need to set sent message flags so I can disable notifications for specific messages the bot sends (and/or disable embeds).

Also as a side note: I didn't know that channel was supposed to be the id of the channel. I thought it was the name. This should be documented somewhere (preferably right under the channel config field) to prevent confusion.

javis86 commented 1 month ago

I need to set sent message flags so I can disable notifications for specific messages the bot sends (and/or disable embeds).

Also as a side note: I didn't know that channel was supposed to be the id of the channel. I thought it was the name. This should be documented somewhere (preferably right under the channel config field) to prevent confusion.

I think you need to keep in nodered the id of messages that you want to avoid . When you send a new message, keep in a db or in a flow variable the array of ids that you send, and then after your discordMessage node, filter in a function node that messages.

https://flowfuse.com/blog/2024/05/understanding-node-flow-global-environment-variables-in-node-red/