6

i'm trying to create a bot which can read/receive all messages in a specific channel and send them to me . my problem here is that i can't find a way to access those messages in my bot

important thing is:

  1. i'm not admin or creator of that channel
  2. i don't want to ask the creator to add my bot as administrator

i've searched in google but i wasn't able to find a solution and i'm also sure that it is possible to do it, because there are already some junction bots with exact same performance . any references or suggestions are appreciated .

maryam
  • 61
  • 1
  • 2
  • All bots, regardless of settings, will receive all messages from channels where they are a member. [See here](https://core.telegram.org/bots/faq#what-messages-will-my-bot-get) – Harshad Raval Aug 09 '21 at 09:49

1 Answers1

3

As already pointed out in the Telegram group of python-telegram-bot, bots can't receive messages from channels where they are not an admin. If you want something like this, you'll have to use a user bot, e.g. a program that controls your private Telegram account (in contrast to controlling a bot account). See here for some info on user bots.

Note that also the provider that you linked seems to be using userbots behind the scenes. More precisely, the docs on the so called "DirectConnection" state that you need to enter a phone number (associated to a telegram account) and then "Follow the instructions" which probably just means to enter the verification code that Telegram sends you. Phone number + verification code is exactly what is needed to control your private Telegram account.


Disclaimer: I'm currently the maintainer of python-telegram-bot.

siliconpi
  • 8,105
  • 18
  • 69
  • 107
CallMeStag
  • 5,467
  • 1
  • 7
  • 22