I want to make a very simple project that does this:
An user (let's call him John) opens a Telegram chat with my bot, and inputs this:
User John: /join channel1
My bot responds adding user 'John' to Channel 'channel1'
That's actually all I want. The problem is that Telegram BOT API does not implement any method to add users to groups. I tried to use telegram-cli but 'chat_add_user' only seems to accept adding user to chats, not to groups.
Is there any way I can add an user to a channel like that? (Without manually doing it) or should I forget about this?
Thank you!
The "Telegram Bot to Add Members" is one of the bots in the "Telegram Bulk Message Sender " bot package, and as its name implies, is a software program used to add people to Telegram groups automatically. Actually, using this software, you can add a bulk list of Telegram usernames to your group.
Yes you can, you have to invite the bot into the group, grab the chat_id of the group and send the message as you are sending a normal message to a private user.
The bot ability is limited. It can only send and receive messages in a chat conversation and collect some information about other chat participants. It can not start a new conversation or other client functionality.
For automate your task, you should use telegram API. There are some clients such as telegram-cli that use the telegram api and have high level methods.
Other clients:
You can invite other users to your channel using:
channels.inviteToChannel#199f3a6c channel:InputChannel users:Vector<InputUser> = Updates;
You can invite several uses at a time, via a list (Vector) of InputUser.
This seems consistent with Telegram Desktop and the mobile clients, which allows you to select multiple contacts and add them to your group.
InputUser is of the form:
inputUser#d8292816 user_id:int access_hash:long = InputUser;
Short Answer: No
It would be very Bad design for Telegram to Expose Any Way Kind of API or Way To Anonymously Join User to Any Channel.
If You only want to Send Text to Some Group of Peoples Then Possibly Use Firebase database With Hooks to Send Message to Each User when Certain message Happens
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With