madmax3365 / node-red-node-discord

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

example code makes no sence it needs clarification #22

Closed geekgarage closed 3 years ago

geekgarage commented 3 years ago

In msg.rich you can do this. i tried and it gives absolutely nothing. i was guessing inside the [] i should add at string to a file or a website that it would use inside the embedded message but nothing shows up

attachments?: Attachment[];

EDIT: Working example "attachments": ["https://static-cdn.jtvnw.net/jtv_user_pictures/a1d61ae5-b7e3-403b-8c73-8eab099fd0c2-profile_image-70x70.png"],

Again here we have some code that does nothing. The 'field' part isn't doing anything, I'm suspecting that it's a mistake that it was included or is it actually inserted incorrect and is a part of the attachment array above???

field?: { name: string; value: string; inline?: boolean; };

EDIT2: Okay so in this case i finally figured it out. 'field' can only be used if you don't use 'fields' thats it. either one or the other