• Welcome to Simple Machines Community Forum. Please login or sign up.
September 26, 2021, 01:55:21 AM

News:

Want to get involved in developing SMF, then why not lend a hand on our github!


Telegram Autopost Bot

Started by vbgamer45, April 11, 2020, 05:57:59 AM

Previous topic - Next topic

Matthias

Maybe or not.
Thinking about the telegram bot API...
I had though of it and got some result for my own, it changes from time to time.
https://core.telegram.org/bots/api



Quality first

kesulin

this mod not allow bold text? any solutions about it?

Forget it, I find the solution.

-Open telegram2.php
-Find function "telegram_sendCURL($message)"
Change:
curl_setopt($ch, CURLOPT_URL,  'https://api.telegram.org/bot'.$modSettings['telegram_enable_bot_auth_token'].'/sendMessage?chat_id=' .$modSettings['telegram_enable_chat_id'] . "&text=". urlencode($message['text']));

to

curl_setopt($ch, CURLOPT_URL,  'https://api.telegram.org/bot'.$modSettings['telegram_enable_bot_auth_token'].'/sendMessage?chat_id=' .$modSettings['telegram_enable_chat_id'] . "&text=". urlencode($message['text'])."&parse_mode=html");

now html tags works

Advertisement: