telegram-bot-bash icon indicating copy to clipboard operation
telegram-bot-bash copied to clipboard

sendMessage: disable_web_page_preview

Open dmnc-net opened this issue 2 years ago • 1 comments

Please is it possible to implement disable_web_page_preview=True parameter for the sendMessage API method?

dmnc-net avatar Dec 04 '21 01:12 dmnc-net

May be I extend the send_message functions to send any additional parameter, but this needs some thougths on how to do without breaking existing scripts.

If you need it urgent you may try to use the internal function '_format_message_url()' wiith hand crafted 'disable_web_preview' e.g. (not tested):

_format_message_url "${CHAT_ID}" "${TEXT}" ',"disable_web_page_preview":"true"' "${MSG_URL}"

gnadelwartz avatar Dec 04 '21 07:12 gnadelwartz