samirsalman / AmazonOffers-TelegramBot

This project is a Telegram Bot connected to a Telegram Channel that checks Amazon offers and send them to your Channel.
140 stars 48 forks source link

'Bot' object has no attribute 'send_message' #13

Closed alek911 closed 2 years ago

alek911 commented 2 years ago

Hello, can someones help me? When I run the bot I obtain this error in shell and no post in telegram channel.

Request received Request received Request received Requests Completed Creating post Sending posts to channel 'Bot' object has no attribute 'send_message' Sending posts to channel 'Bot' object has no attribute 'send_message'

I have edited the bot.py with botfathers token and channel id and the amazon_api with my aapi keys. What's wrong?

How can I fix it? Thank you

alek911 commented 2 years ago

same error with channel name instead of channel's id

alek911 commented 2 years ago

After reinstall I receive this error: Sending posts to channel Object of type InlineKeyboardMarkup is not JSON serializable Sending posts to channel Unauthorized

alek911 commented 2 years ago

solved (wrong character in token). Sometimes got "Object of type InlineKeyboardMarkup is not JSON serializable" but the bot works.

hitesh1435 commented 2 years ago

Hello can you help me how did you setup

alek911 commented 2 years ago

I have fix my problems in this way: reinstall bot using python3 set the right bot's token (I have mistyped the first time) set the channel name (you have to set public channel and set channel link. in my case t.me/aklabofferte : @aklabofferte is the channel name to use) set the bot admin of channel

Il giorno lun 20 dic 2021 alle ore 05:27 hitesh1435 < @.***> ha scritto:

Hello can you help me how did you setup

— Reply to this email directly, view it on GitHub https://github.com/samirsalman/AmazonOffers-TelegramBot/issues/13#issuecomment-997585710, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADF2LEUG6NXZOQ5ZB5J3AADUR2WBXANCNFSM5KFXS3VA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you modified the open/close state.Message ID: @.***>