telegram

how to add contacts in telegram-cli by using vcard?

天涯浪子 提交于 2019-12-06 22:50:33
im trying to add my contacts in telegram-cli by using vcard. but when i use this command: import_card <card> nothing happen! it just goes to next line without any error and no contact added. my vcard is VERSION:2.1 how can i improt my contacts to my telegram account by using vcard? Install-Package TLSharp client = new TelegramClient(apiId, apiHash); await client.ConnectAsync(); var phoneContact = new TLInputPhoneContact() { phone = "", first_name = "", last_name = "" }; var contacts = new List<TLInputPhoneContact>() { phoneContact }; var req = new TeleSharp.TL.Contacts.TLRequestImportContacts(

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

假如想象 提交于 2019-12-06 19:30:14
问题 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. 回答1: 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

Telegram (Telesharp) - Massive requests (discuss about flood prevention limit)

可紊 提交于 2019-12-06 12:04:38
(I'm using TLSharp for connect to Telegram Service) I want search 400,000 channels, so call service SearchUserAsync for 400,000 times. I call this service every 15 seconds, but I get flood prevention for 1 day (~70000 seconds). What's best way for Call telegram services for n times? 来源: https://stackoverflow.com/questions/45256430/telegram-telesharp-massive-requests-discuss-about-flood-prevention-limit

Telegram for Android, confusing NDK error

こ雲淡風輕ζ 提交于 2019-12-06 11:07:25
So I have downloaded Telegram messenger source from GitHub, and I am trying to get it to run on Android Studio for the first time. Now the error is as below: The build failed message is: Error:error: CreateProcess: No such file or directory The detailed log in Gradle Console is: FAILURE: Build failed with an exception. What went wrong: Execution failed for task ':TMessagesProj:externalNativeBuildArmv7Debug'. Build command failed. Error while executing process D:\AndroidStudio\sdk\ndk-bundle\ndk-build.cmd with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=C:\TMessagesProj\jni\Android.mk NDK

Delete Message from Telegram Group

可紊 提交于 2019-12-06 10:19:08
问题 I'm working application that integrates with telegram and I had issue I create group and have admin on it and bot I add bot that I can get messages update from the group chat problem is when I delete message from group chat by admin is should not be showing here https://api.telegram.org/bot123456789token/getUpdates/ but I get all message history even I delete them any idea of what's is wrong? 来源: https://stackoverflow.com/questions/44770316/delete-message-from-telegram-group

Chat API to add and remove members automatically [closed]

你离开我真会死。 提交于 2019-12-06 05:12:06
Closed. This question is off-topic . It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 12 months ago . I'm working with a guy who uses telegram app to send bet tips on football matches. He wants the group to be private, right now he is adding and removing all members manually. The group is growing and now has more than 300 members which makes his job harder, what he wants is an automatic way of adding and removing members from the group . Is there any api that let me do this? I'm open to change to another chat

Telegram bot to wait for user reply

梦想与她 提交于 2019-12-06 04:52:04
The code below is for a Telegram Bot which basically takes a person username and password and verifies it to provide his average expenditures. The problem as we see is the bot waits for the user to send his username and password for 10 sec either waste of time (or) not sufficient time was given. How could I program such that the bot waits for user message and then executes the next lines ( wait till the trigger ) def highest(intent,chatid,text): seq=["What is your Username ?","Password?"] send_message(seq[0],chatid) time.sleep(6) name,chatid = reply_function() print name send_message(seq[1]

Using Telegram to send a message

冷暖自知 提交于 2019-12-06 03:13:28
问题 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 Bot API: getChatMember throws USER_ID_INVALID for valid user

£可爱£侵袭症+ 提交于 2019-12-06 03:01:18
问题 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

Read the messages of the public channels from Telegram

随声附和 提交于 2019-12-05 21:50:38
I need to read the messages of some public channels in the application, as for example it happens https://tlgrm.ru/channels/tech As I understood, the bot for this business will not work. You need to use client api, but everywhere that with the channel methods are connected everywhere you need channel_id but where do I get it I do not know, I only have channel names, and how do I get it from it id I did not find such a method. How can I get the channel's id by its name? Assuming you're using python, I suggest Telethon library. You can use this piece of code to get channel_id and access_hash