topkecleon / telegram-bot-bash

Telegram bot written in bash
Other
426 stars 123 forks source link

sendMessage: disable_web_page_preview #186

Open dmnc-net opened 2 years ago

dmnc-net commented 2 years ago

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

gnadelwartz commented 2 years ago

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}"