Telegram Bot. Get User timezone
It’s imposible by standard Bot API. You can ask user for location, and next, from this location calculate timezone for user.
It’s imposible by standard Bot API. You can ask user for location, and next, from this location calculate timezone for user.
Just another one moment, why your webhooks not work. In my case the reason was in allowed_updates webhook parameter. By calling : https://api.telegram.org/bot<your_bot_token>/getWebhookInfo You can see { “ok”: true, “result”: { “url”: “<your webhook url should be here>”, “has_custom_certificate”: false, “pending_update_count”: 0, “max_connections”: 40, “allowed_updates”: [ “callback_query” ] } } It means, that your bot … Read more
If the issue still persists, try to modify your curl request. For me adding header ‘Content-Type: application/json’ and -d ‘{“chat_id”:12309832,”text”:”any text”}’ fixed issue
The FAQ reads: All bots, regardless of settings, will receive: All service messages. All messages from private chats with users. All messages from channels where they are a member. Bot admins and bots with privacy mode disabled will receive all messages except messages sent by other bots. Bots with privacy mode enabled will receive: Commands … Read more
NEW and SIMPLE answer : Just ask the bot father (https://t.me/BotFather) to help you create a new bot and give you the api key . very simple and lovely . (thanks Mr.https://stackoverflow.com/users/5485852/john) go to https://t.me/BotFather type /newbot choose a name for your bot choose a username for your bot Done! it will send you the … Read more
There is no such functionality in Telegram Bot API right now. UPD 2017-05-19: There is an official method deleteMessage, more info: https://core.telegram.org/bots/api#deletemessage https://stackoverflow.com/a/43965602/1140438
You have to use the @BotFather bot to set the Group Privacy off. This let the bot to access all the group messages. By default, Group Privacy is enabled for bots. This setting has to be changed used the @BotFather bot >> Bot Settings >> Group Privacy >> Turn off Please note that this change … Read more
Set the Telegram API parse_mode parameter to HTML and wrap the message in <pre></pre> , but remember that telegram API does not support nested tags. <pre> | Tables | Are | Cool | |———-|:————-:|——:| | col 1 is | left-aligned | $1600 | | col 2 is | centered | $12 | | col 3 … Read more
String escapedMsg = toEscapeMsg .replace(“_”, “\\_”) .replace(“*”, “\\*”) .replace(“[“, “\\[“) .replace(“`”, “\\`”); Do not escape ] character. If [ is escaped, ] is treated like a normal character.