How to join my Telegram Bot to PUBLIC channel - python

My question is:
how to join my telegram bot to a telegram public channel that I am not an administrator of it, and without asking the channel's admin to add my bot to the channel?
Maybe, the chatId of channel or thru link of channel?
I have heard that some people claim to do this join their bot to channels, and scrape data.
So if Telegram does not allow it, how can they do it? can you think of any work around?
Thank you in advance :)

Answer to your edited question.
It was possible to add a bot to a group/channel with just an invite link. This was achieved by allowing a bot to access the mtproto methods like messages.importChatInvite for private links and channels.joinChannel. However telegram patched this. However, you can still do this with normal user accounts! Since you are using python you can give this a shot. I can confirm the methods still work on Madeline Proto.

Till today, only the Channel Creator can add a bot (as Administrator or Member) to the Channel, whether public or private. Even the other Channel Administrators cannot add a normal member leave alone adding a bot, rather they can only post into the channel.
As far as joining the bot via the invite link, there is yet no such method in Bot API to do so. All such claims of adding the bot to a channel by non Creator are false.

Another way of "scraping the data" from several channels would be to listen to these channels with a Junction Bot aka Channels, Multi Feed Edge Bot, or alike. You just need to go to the channel info and share the link of the desired channel with the Junction Bot to automate the process of receiving new messages from the(se) channel(s). There are also other quite advanced ways described in their FAQ.
Multi Feed Edge Bot also seems to work O'kay, however, you need to follow these steps to add the redirection:
/add #TelespaceNews https://t.me/joinchat/AAAAAFIaTHjZp8ltykgwEQ

You can only add bots to channels you are an admin in them and bots can only be added as admins. for this go to Manager Channel, click on Administrators / Add Administrator then search for the bot you want to add to your channel.

Related

Telegram Bot - Persist Pickle Context across all Users in a Group Chat

I set out to create a Telegram bot that tracks 'upvote' like functionality in a Group Chat. To try to do this, I adapted the persistentconversationbot.py code from the python-telegram-bot package. I got the bot running and managed to deploy it on to Heroku.
Once I invited the bot into a private group chat, I noticed that this approach is only remembering conversations with specific users. I'd like to have the bot remember conversations it has had with all users in a group chat. Would any of you happen to know how I can do this?
Thank you!
Please see this explanation on the per_* parameters of ConversationHandler. Note that this is independent of whether your bot uses persistence or not.

Is it possible to get all channels a slack bot is allowed to write?

I am trying to build a slack bot based on heroku and python which writes messages every 10 minutes to all channels the bot is allowed to write messages. It would be perfect if I could just read from the slack api to which channelId's the bot is connected and let the bot post the message to all channels at the same time.
Till now I couldnt find such function in the slack api. On the other hand I have to addmit that I am pretty new to slack. Is there a similiar function out there or can you think of a work around? If possible I would like to avoid storing data additionally somewhere.
Yes there is. Call users.conversations with your bot token to get the list of channels it is a member of.
From the documentation:
This method helps answer questions like:
Which conversations am I a member of?
Which public channels is my bot user in?
Do I have any direct messages open with my friend Suzy?
Is my bot a member of any private channels?

Is it possible to create a telegram bot which forwards messages from another bot to telegram group or channel?

I want to create a telegram bot which would immediately forward message from another bot, that regularly posts some info. I've tried to find some ready templates, but alas... I would be grateful for any useful info. Thanks!
I don't think this is possible. As far as I know, bots can't communicate with other bots.
But you can add bots to groups

Slack Bot: invite a non-bot user when # mentioning them

I'm working on a Slack bot that #-mentions non-bot users into a particular channel. Is it possible to also invite these users to the channel when they are mentioned? (Like when a non-bot user mentions another non-bot user)
I'm using the Python slack client for this, but I suspect what I want to do is at the API level. Any ideas would be appreciated!
The python library don't have the api call wrapped (you could open an issue for that) but the API itself have a way to invite users to a channel, you just need to make a request to channels.invite

Scrape Telegram channel for changes

Can anyone point me to a way to programatically check for changes in a Telegram room? I can't decipher the API. I want to do something like:
telegram.onMessageReceived('room_id', (msg) => {
console.log(msg.content);
}
I usually use Python, but open to using NodeJS because I want to have it always running, monitoring for changes on an Ubuntu server.
As far as I can find on the internet, everything is pointing to the bot API, but as I understand it, it would only be notified of updates to messages to the bot. I want to monitor public rooms in which I cannot add the bot as an administrator since I did not create the room. Or is there some way to add a bot to public rooms? I don't think so.
Also the room I want to monitor doesn't allow anyone to chat. It's just to notify subscribers.
I've read these SOs so far and am still confused:
Can a Telegram bot read messages of channel
How do I join my bot to the Channel?
How to join my Telegram Bot to PUBLIC channel
in node.js telegram library you can check the last message.date and compare with last date you have stored. if changed there is new message

Categories

Resources