I'm rellay happy with that community here. I found many answers in different cases. But this time I don't find one. So maybe someone can help me?
I'm working on a telegram bot using php and webhook updates. I track if my bot is added in a group chat by "new_chat_member" or "group_chat_created" and by "left_chat_member" if it got deleted from that groupe. UNtil then everything works fine.
If I - as admin - and the bot are the last two members and I delete the chat in the telegram app, I just get a "left_chat_member" for me (the last user in the groupe). But what about the bot? Isn't the chat deletet completely? Is the groupe remaining just with the bot as a member? Got someone an idea how to catch that situation? I would need something like "chat_deleted"
Thanks a lot,
Markus
I found a possible solution:
https://core.telegram.org/bots/api#getchatmemberscount
Always on "left_chat_member" event, I check how many members are left. And if there is just two left I delete the chat of my "tracking" list. Still don't know if the bot is registered to that groub-chat on the telegram side, but don't really have another idea.
Related
I'm a dumb sparrow and can't find a bot or app.
I am looking for a telegram program that will create the app of communication in a group.
as I see it, I prescribe phrases for comments, and the app randomly select N number and posts them from !different accounts! to the chat. (I posted the news, turned on the bot and it threw various reactions) manually jumping between accounts writing comments to the group is very dreary.
Has anyone seen something like this? I only find services, not the app.
find app or advise for supporting tg group.
I want to make message history for new group users visible. For now I have managed to find channels.togglePreHistoryHidden method in the API but it takes channel as an argument, not a group. There is no similar method for groups. Moreover, as far as I know there is no such option to hide message history for channels in telegram so i'm a bit confused. Could anyone explain me how should I do this. Code snippet in telethon would be greate.
I have a chat feature in my app where I am sending push notification to users but I've come across a problem as I don't want to send the push if 2 users are already chatting with each other. How can I know if the chat is active between the 2 users? And how to know if someone has closed the chat session?
Would really appreciate the help.
Cheers!!
Okay so here the deal.
Let suppose there are two Users, A & B.
User A has entered the Chat screen, at the same time a [Map:bool] will be send to the firestore that "IsActive_A: true". (This is for User A, Use similar field for UserB).
and when the User A leaves the Chat, Or click the back button or onDispose method is called. the same function of sending [Map:bool] will be send to there firestream with value equal to false.
This is all i can give you right now, if you want further explaination please share some related code!
I’m part of a telegram group. I can see other users on the group, and I can message them individually (and manually). Is it possible to automatically (programmatically) message all the users on the group individually? Note I am not the admin.
If it is indeed possible, is there any sample code you can share?
It would be particularly awesome if the message could be customized for admin and non-admin. This means I’d need to detect if a particular user is an admin.
Thanks
I'm not sure if I get what you are looking for but I assume you have a Telegram Bot and wanna message all users in an specific group/supergroup. First I have to remind you bot can't start private message according to this link
Bots can't initiate conversations with users. A user must either add them to a group or send them a message first.
If I got it wrong feel free leave comment and I will update the answer ASAP ;-) ^_^
I'm looking for a way to see all chats/channels/groups my bot participating in except to use webhook or getUpdates method. These methods are not suitable for me because to use them you need to send a message to chat or do something like that and you have to repeat this procedure for every chat. Is there any way to get a list of all the groups at once not making any changes to them except adding the bot itself?
Unfortunately currently its not possible.