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 ;-) ^_^
Related
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 group in Telegram that is bombarded by spammers/bots. We have Shieldy enabled, which gets rid of most of the spammers within a few seconds, but the notifications that come a few times per day get really annoying. There is no setting in the group setting that is able to prevent it. How can I restrict the group so that only invited people can join the group?
It can't be entirely avoided.
Change the group settings to "Invite link" in Settings > Manage Group. Revoke the permanent link to regenerate it.
That should reduce your visibility to only "Groups nearby" and require the invite link for anyone else. BUT invite links can be easily generated and tested for validity by a spam bot.
Add a bot like Shieldy (https://botostore.com/c/shieldy_bot/) to your group. It will further aid in restricting new members capabilities, especially bot ID's and uses Captcha verification. Bots can kick genuine people though so watch it carefully.
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.
I want to develope a bot in telegram to set as the admin of my channel.
And I want it to notify me whenever a member leaves the channel. And I want it to tell me who it was. and I prefer to have name or username.
I think you can. If you can see all subscribers in your channel and you can make a program to identify who lives your channel by checking and substracting existing members vs last members & you can set activity starter when member counts change
#fkadeal this is my idea & it's not tested yet
Unfortunately, you can only get member count at this time, even your bot is admin, can't get full list of member, you can just clumsy track users by their ID.
i create a private channel in telegram.
i want to know if there is any way to create an unique invite link that i can share to people i want to join my channel. unique like single use.
actually telegram gives you an invite link but its always the same so if i give it to a person he can give it to anyone he wants. i need a method to avoid this. i'd tried some url shortening services to hide the invite link but at the end they still show the iniztial invite link.
any suggestion?
i'd tried http://once.ly/index.html
Edit:
Now you can generate unique links for different people, and limit how many people can join and change the expiring time!
Original answer (2017):
There is no way to create a unique invite link at this time.
But if I were you, I would create a bot, send link via bot with inline button, which is default hiding link behind text.
For example, you give your user a link like t.me/bot?start=channel_link, and when your bot received /start channel_link, send a message with inline button with url parameter.
Try this one from the documentation.
start=channel_link
Ok, now this is possible using tg bots: the createchatinvitelink endpoint is available and has member_limit param. Set the latter to 1 and the link becomes "unique".