Telegram bot error in sending message

I write the following code

but I get this error

what should I do now?

@waqar9637877247
Check if you’ve entered the correct chat id of the public channel you created on Telegram. Also ensure you’ve added your bot to the channel and given your bot admin privileges. Channel id are usually like this: t.me/bot_channel, so in your conf file give the telegram_chat_id as @botchannel.
Hope this helps! :smiley:

@waqar9637877247
check your chat-id remove t.me/ and add @ before chat-id and your problem will be solved.
Example:
if your telegram chat_id is t.me/xyz_abcd2
then your chat_id will be @xyz_abcd2
let me know if this solve your problem.

Check whether the chat id entered for your channel by you is correct and is preceded by ‘@’ symbol. The error being shown might be because it is unable to find the channel because of invalid chat id.

heyy @waqar9637877247 just double check your telegram_chat_id (this will be after t.me/)and it is starting with “@XXXX” . And also check for your Telegram Channel ID (which will be given as token in the BotFather Chat).
If you want to check your Bot Details then In BotFather in Telegram application You Can use /help and then type /mybots and get your Bot Information.
Let Me know if this solves your problem

Hello! The same thing happened with me earlier.The problem is in the conf.py file and not in the telegram_alert.py file,make sure you type the correct telegram_chat_id .We can find it in our telegram account ,click on the channel you have created(i.e Temperature Alert) there you will find it after t.me/ and don’t forget to add @ before the chat_id.

Try this out :slightly_smiling_face:
This might help you.