madmax3365 / node-red-node-discord

Discord nodes for node-red
6 stars 9 forks source link

Rich Messaging #19

Open webhead404 opened 3 years ago

webhead404 commented 3 years ago

Can someone describe how to use the rich messaging feature? I would like to attach images to the messages in Discord. Currently I have this:

message = {
    payload: "Happy Thanksgiving!",
    channel: msg.channel.id
}
return message;
philosoma commented 3 years ago

An example for a function node to pass:

msg.rich = { author: { name: "Test" }, title: "title", description: "Description", url: "https://google.co.uk/", fields: [ {name: "Number 1", value: 3400, inline: true}, {name: "Number 2", value: 4000, inline: true}, {name: "Number 3", value: 600, inline: true} ] }; return msg;