windkh / node-red-contrib-telegrambot

Telegram bot nodes for node-red.
Other
256 stars 116 forks source link

[FR] Update documentation on sending-objects? #290

Closed ozett closed 1 year ago

ozett commented 1 year ago

i wanted to send a "dice" object. and discovered room for hints on that in the documentation here: https://github.com/windkh/node-red-contrib-telegrambot#sending-photos-videos- as the dice object differs slightly (but generally) from your photo-example

it normally problematic on node-red to create "objects" instead of "strings" (mostly to find discussions on their forum, example). so it seems to me helpful to give hints for noobs like me on this dice structure, because its somehow "nested" and needs "special" care

string vs object

image

maybe it helps showing how to create the needed "objects" (for a dice) in node red?

with function node:

msg.payload.content = {};
msg.payload.content.emoji = "🎲" ;
msg.payload.content.value = 6;  // int 1-6, no string?!
with change node: screenshot

image

what do you think?