You probably have not added the bot you created from BotFather to your telegram channel.
Go to the channel options and ‘Add administrator’. Search for your bot name and add it. Then try again.
@Sinhamaitry6 The error message is self-explanatory. You will need to add the bot as a channel admin.
Hey!! @Sinhamaitry6, Greetings of the day!
As in your Error message, in the description key, it is mentioned that, “Forbidden: Bot is not a member of the channel chat” which indicate that the bot that you have created on BotFather on Telegram, has not yet has right to send messages to your created channel i.e. your bot is not yet the administrator of your created channel.
In order to do so, follow the steps:
- Open BotFather and copy the user name of your bot that you created e.g. tetris_bot
- Open your Telegram Channel and tap on the name of your channel on the top.
- On doing Step 2, you’ll see the details of your channels, click on Administrators and then click on Add Administrators.
- Paste the username you copied in Step 1. and click on tick sign.
- Allow the rights of sending messages.
That’s it!! now run your code again. Hope that this time it works.
Thanks! Let me know if you have any Queries.