telegram

Telegram bot api keyboard

依然范特西╮ 提交于 2019-12-05 04:54:40
I have problem with Telegram Bot Api and with "ReplyKeyboard". I'm using Python 2.7 and I send post request: TelegramAPI.post(TELEGRAM_URL + "sendMessage", data=dict(chat_id=CHAT_ID, text="", keyboard={'keyboard': keyboard, 'one_time_keyboard': False, 'resize_keyboard': True}) keyboard in this format: [["A button"], ["B button"]] But in Telegram I don't see keyboard. What problem can be? According to the Bot API documentations , a custom keyboard requires a reply_markup parameter, whose value is a JSON-serialized specification of the keyboard. Assuming your TelegramAPI.post() function does not

How to hide Telegram BOT commands when it is part of a group?

江枫思渺然 提交于 2019-12-05 04:25:42
I'm trying to use a Telegram BOT to send messages to a group. First, I thought that it'd be enough to know the group chat id to accomplish that, but it's not. The BOT MUST be part of that group. OK, it kind of make sense, but the problem is: When you add a BOT into a group (a large group in this case) everyone start seeing a new icon on their devices, a "slash" icon. And what do they do ? They click on it, see the list of commands, choose one of them, and all of a sudden everyone is getting a new message from the group: a "/something". Imagine dozens of people doing that ? It's pretty annoying

Telegram, getting file_id for existing sticker

大憨熊 提交于 2019-12-05 00:51:47
I'm writing a Telegram bot and I want it to send a sticker. It is said here , that to send a sticker that already exists on Telegram servers we can simply pass file_id . The thing is, I have absolutely no idea how to obtain file_id of any sticker. E.g. how do I send any sticker from Greater Minds pack? I suppose, this pack is on Telegram servers since they include it in every app. To discover a sticker's file_id : Send the sticker from Telegram App to your bot. Use the bot's getUpdates method to receive the sticker. You should see the sticker's file_id in the message. Your bot may use that

How can I send a message to someone with my telegram bot using their Username

Deadly 提交于 2019-12-05 00:43:19
I am using the telepot python library, I know that you can send a message when you have someone's UserID(Which is a number). I wanna know if it is possible to send a message to someone without having their UserID but only with their username(The one which starts with '@'), Also if there is a way to convert a username to a UserID. You can't send message to users using their username that is in form of @username , you can just send messages to channel usernames which your bot is administrator of it. Telegram bot api uses chat_id identifier for sending messages. If you want to achieve chat_id of

How can I redirect messages from telegram channels that are in certain format?[telegram bot]

丶灬走出姿态 提交于 2019-12-04 21:11:57
I have many telegram channels, 24\7 they send messages in the format "buy usdjpy sl 145.2 tp 167.4" "eurusd sell sl 145.2 tp 167.4" "eurusd sl 145.2 tp 167.4 SELL" or these words in some order My idea is to create app that checks every channel's message, and redirects it to my channel if it is in the above format. Does telegram api allow it? I solved a similar problem with TdLib . Their GitHub site has full C++, Java and C# examples that you can just modify. I worked on the Java example, and applied most of my changes to the UpdatesHandler.onResult method (line 353). The C++ and C# examples

NDK Error occured while importing telegram source code from github

让人想犯罪 __ 提交于 2019-12-04 14:41:00
问题 I downloaded telegram open source code for android from the following the link https://github.com/DrKLO/Telegram. While importing the project am getting the following errors: External Native Build Issues Build command failed. Error while executing process C:\Users\user\AppData\Local\Android\sdk\ndk -bundle\ndk-build.cmd with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=C:\Users\user\AndroidStudioProjects\Telegram-master\TMessagesProj\jni\Android.mk NDK_APPLICATION_MK=C:\Users\user

How to hide ReplyKeyboardMarkup after user click in Telegram Bot API

扶醉桌前 提交于 2019-12-04 11:16:54
问题 I am using Node.js telegram-bot-api. Idea: Show a custom keyboard with one button - "Share my phone number". When user clicks this button, contact should be sent and button should be removed from screen. Here is a code I am using right now: bot.sendMessage({ text: 'Please give us your phone number', reply_markup: JSON.stringify({ keyboard: [ [{ text: 'Share my phone number', request_contact: true }] ], resize_keyboard: true, one_time_keyboard: true }) }); Problems: When user clicks "Share my

Telegram Bot How to delete or remove a message or media from a channel or group

让人想犯罪 __ 提交于 2019-12-04 08:57:42
问题 I want to know an example of removing message or file like a photo I did not find any functional tutorial in this regard, 回答1: 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 回答2: There is an official support of deleteMessage method in Bot API 3.0. More details here: https://core.telegram.org/bots/api#deletemessage

Telegram Bot API: getChatMember throws USER_ID_INVALID for valid user

女生的网名这么多〃 提交于 2019-12-04 07:34:39
I'm trying to find out if a specific User is present in a supergroup, in order to keep track of those who left. For that, I'm calling the Bot API method getChatMember for each User and checking if their status is either Left or Kicked . However, I noticed that (recently?) I'm getting USER_ID_INVALID errors for many valid users that are either in the supergroup or have been in the past and then left. I also confirmed that those accounts are still active on Telegram. Here's the HTTP request I'm sending: POST https://api.telegram.org/botXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXX/getChatMember HTTP/1.1

Using Telegram to send a message

旧街凉风 提交于 2019-12-04 07:14:05
I'm trying to send a message to a telegram-app user, but the intent opens only the telegram app - it don't choose a conctact and send the message: public void shareTelegram(String message) { Intent waIntent = new Intent(Intent.ACTION_SEND); waIntent.setType("text/plain"); waIntent.setPackage("org.telegram.messenger"); if (waIntent != null) { waIntent.putExtra(Intent.EXTRA_TEXT, message);// startActivity(Intent.createChooser(waIntent, "Daniel")); } else { Toast.makeText(getApplicationContext(), "Telegram is not installed", Toast.LENGTH_SHORT).show(); } } Is there a way to send the message