telegram

How can I mention Telegram users without a username?

Deadly 提交于 2020-02-03 04:40:34
问题 I want mention users even those which d o not have a username . If a user has set up a username I return Hi @username as an answer but if a user does not have one I can't do that. I tried using the unique User ID e.g. @5642166 but that did not work. How can I achieve that? 回答1: According to official documentation it is possible to mention user by its numerical id with markup: Markdown style To use this mode, pass Markdown in the parse_mode field when using sendMessage . Use the following

Remove telegram profile photo by telethon library or any API

有些话、适合烂在心里 提交于 2020-01-25 06:53:48
问题 I can't delete profile photo by telethon library or any else API What I already did below (using telethon) but it doesn't work from telethon import TelegramClient, sync from telethon.tl.functions.photos import DeletePhotosRequest api_id = "id" api_hash = "hash" client = TelegramClient("bot_5", api_id, api_hash) client.start() client(DeletePhotosRequest(client.get_profile_photos('me'))) I expected what this code would delete my profile photo How can I delete it with API? 回答1: this will work

how to make a hyperlink in telegram without bot?

本小妞迷上赌 提交于 2020-01-22 05:10:21
问题 How to make a HyperLink in telegram? how to make a hyperlink in telegram without bot? 回答1: As of Telegram Desktop 1.3 you can format your messages and add links. [Ctrl+K] = create link (https://my.website) Other useful hotkeys are: [Ctrl+B] = bold [Ctrl+I] = italic [Ctrl+Shift+M] = monospace [Ctrl+Shift+N] = clear formatting 回答2: On Telegram Desktop for macOS, the shortcuts differ. You can right-click a highlighted text, then hover over Transformations to see the available options: 回答3: You

php telegram answercallbackquery sendmessage

安稳与你 提交于 2020-01-17 06:39:10
问题 I'm trying to develop a Telegram Bot in PHP, but i failed to make my bot answer the user when he press an inline button. Can someone help me sending a message (sendMessage method) after calling the answerCallback method? Here's my last trial code: if ($call_back_query != null) { $response = $call_back_query; $botUrl = "https://api.telegram.org/bot" . BOT_TOKEN . "/answerCallbackQuery"; $postFields = array('callback_query_id' => $call_back_id, 'text' => $response); $ch = curl_init(); curl

How to write dynamic keyboard with conversationhandler in python telegram bot?

不打扰是莪最后的温柔 提交于 2020-01-16 11:59:44
问题 I am trying to write dynamic keyboard (buttons from a table in database ) But I am unable to get response in callbackqueryhandler in conversation handler. I am unable to go to next state which is response stored from a database column, My code : def menu(update,context): bot = context.bot name = db_execute("SELECT event_name FROM menu ", fetchall=True) button_list = [] for each in name: button_list.append(InlineKeyboardButton(each, callback_data = each)) reply_markup = InlineKeyboardMarkup

Google Dialogflow Quick Replies formatting issues in Telegram

两盒软妹~` 提交于 2020-01-16 08:42:53
问题 I had create a chatbot using Dialogflow and integrated it with Facebook Messenger & Telegram. I noticed that for the Quick Replies in Telegram (Link 1) appears differently in FB Messenger (Link 2). Is there any way to make it nicer and more presentable in Telegram? Telegram Facebook Messenger This is my Quick Replies settings in Dialogflow. Dialogflow 回答1: in DialogFlow you can indeed (as Marc pointed out) use a Custom Payload for Telegram, here it is an example: { "telegram": { "text": "What

Google Dialogflow Quick Replies formatting issues in Telegram

只谈情不闲聊 提交于 2020-01-16 08:42:38
问题 I had create a chatbot using Dialogflow and integrated it with Facebook Messenger & Telegram. I noticed that for the Quick Replies in Telegram (Link 1) appears differently in FB Messenger (Link 2). Is there any way to make it nicer and more presentable in Telegram? Telegram Facebook Messenger This is my Quick Replies settings in Dialogflow. Dialogflow 回答1: in DialogFlow you can indeed (as Marc pointed out) use a Custom Payload for Telegram, here it is an example: { "telegram": { "text": "What

How To Click On Telegram Contacts Menu With Pywinauto

不羁岁月 提交于 2020-01-15 09:06:41
问题 I Want To Click On The Contacts Menu In Telegram With Pywinauto . I Run This Code But Has Error : >>> import pywinauto >>> from pywinauto.application import Application >>> app = Application.start ("C:\Users\Ali\AppData\Roaming\Telegram Desktop\Telegram.exe") >>> app.Telegram.MenuSelect ("Contacts") Traceback (most recent call last): File "<pyshell#5>", line 1, in <module> app.Telegram.MenuSelect ("Contacts") File "C:\Python27\lib\site-packages\pywinauto-0.5.1-py2.7.egg\pywinauto\application

Telegram group ban/boot/kick user

梦想与她 提交于 2020-01-14 14:14:57
问题 I need to create a Telegram bot to moderate a group and be able to ban/boot/kick users from the group. I could not find anything in the Telegram API to boot a user from a group, how can a bot do this through the API? 回答1: You can use kickChatMember to remove a user from a group. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. 来源: https://stackoverflow.com/questions/39817082/telegram-group-ban-boot-kick-user

Telegram group ban/boot/kick user

孤街浪徒 提交于 2020-01-14 14:14:29
问题 I need to create a Telegram bot to moderate a group and be able to ban/boot/kick users from the group. I could not find anything in the Telegram API to boot a user from a group, how can a bot do this through the API? 回答1: You can use kickChatMember to remove a user from a group. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. 来源: https://stackoverflow.com/questions/39817082/telegram-group-ban-boot-kick-user