i have 1800 contact in my telegram account , when i want add more number it's return empty array like below:
{"_writeBuffers":null,"_readOffset":828,"_buffer":{"type":"Buffer","data":[21,67,82,173,21,196,181,28,0,0,0,0,21,196,181,28,100,0,0,0,0,0,0,0,0...]},"_typeId":"15c4b51c","_typeName":"Vector","module":"api.type","type":"Long","list":["0x0000000000000000","0x0000000000000000"],"_byId":{}},"users":{"_writeBuffers":null,"_readOffset":8,"_buffer":{"type":"Buffer","data":[21,196,181,28,0,0,0,0]},"_typeId":"15c4b51c","_typeName":"Vector","module":"api.type","type":"User","list":[],"_byId":{}}}
and cant add contact from telegram mobile or other telegram app with current number,is any limit for that?
how can add more number ?
Related
I have created a link of telegram group using createChatInviteLInk using my bot present in that group now i want see how many users have joined through particular link programtically
You should check invite_link in ChatMemberUpdated object. You'll receive it as Update (field chat_member) when a user join from link.
Note: chat_member is not default in allowed_updates. You have to specify "chat_member" there
I have a telegram bot that can do several tasks in my telegram group.
I want to add a new task that can count the number of messages a specific user sends in a group.
Every time it will be updated, Let say a user name drhunter, if he sends a message then it will save in a text file as,
drhunter 1 for the next message will be updated to drhunter 2 and so on.
I can do it using telegram username but If a user hasn't set username then occurs a problem. It shows None
I get username using message.from_user.username
I use username & count the number of messages each time then save it in a file. Like this
count.txt
drhunter 5
drhunter2 45
Is there any way to do this? or more specifically is there any way to identify a telegram user without their username (inside a telegram group)?
Use the id instead, which is a unique identifier for the user independent of whether the user has a username.
I'm trying to make chat app in flutter using firebase. And i want to know, can i make chat using users id? I mean chatID=user1ID+user2ID, is it possible?
I think you can add a field of type array to your chat document and name it as chat _user and just pass the two users ids to it as like this =>
I'm in a private Telegram group that has a continual stream of many messages from a large number of people. I need to somehow pull out just those from a handful of specific people, and forward them to myself somehow - e.g. a new group I'm the only member of, or private chat, or some other way (email?). I just need to read them, not reply.
I'm a full stack developer (PHP back end but willing to consider others if works better) and know how to interface with APIs etc so can write some code to do this.
Can anyone advise on what API functions I'd use, or other approach here - and is it the Telegram or Bots API? Or is there a pre-existing solution out there?
Asking here as I've done my own research and not finding any solutions!
You can create a bot and put it in the private group. Set the bot as administrator so it can read all messages from all users. For each message the users send in the group, the bot will recive an update containing a message object. The message object contains all the information about the message just sent in the group, including the user's data. To filter a message from a specific user you can compare the user_id in $update['message']['from']['id'] with an array containing all the user_ids of the users you want to forward their messages to you, with the in_array php function passing the user_id and the array. Then, if it match, use the forwardMessage method with these parameters:
{
"chat_id": "YOUR_USER_ID",
"from_chat_id": "PRIVATE_GROUP_CHAT_ID",
"message_id": "THE_FILTERED_MESSAGE_ID"
}
If you use your user_id in the chat_id field, the bot will forward the message from the private group to your chat with it. The from_chat_id field is the chat_id of the private group (you can get it from $update['message']['chat']['id']). The message_id is the unique identifier for a message in that private group. It's contained in $update['message']['message_id'].
Instead of comparing the user_id to filter users, you can compare the first_name, last_name or username of the users but only the user_id is unique for each user and can not be changed.
You are using the Bot API.
Im using Buddypress JSON Api plugin, wanted to know how single User Activity can be displayed.
The function which is provided by BP JSON API is activity_get_activities() which display all user's activity through out the website.But i wanted to display only for single user.
For Example: http://websiteurl/api/buddypressread/activity_get_activities/?userid=1
In the above example, if i pass userid=1 then all the activity by the user 1 will be displayed not by all other user's