voidbar / forwardgram

Forward messages from multiple Telegram channels to one of your own!
154 stars 183 forks source link

SEND AN IMAGE #40

Open KsKFabietto opened 2 years ago

KsKFabietto commented 2 years ago

When the telegram channel sent an image, the bot didn't recognize that, how can i fix it?

sharkcf commented 2 years ago

Hey, i have a problem. after i try to login, return this message: Traceback (most recent call last): File "C:\Users\victo\nova\forwardgram\forwardgram.py", line 49, in start(config) File "C:\Users\victo\nova\forwardgram\forwardgram.py", line 16, in start client.start() File "C:\Python39\lib\site-packages\telethon\client\auth.py", line 133, in start else self.loop.run_until_complete(coro) File "C:\Python39\lib\asyncio\base_events.py", line 642, in run_until_complete return future.result() File "C:\Python39\lib\site-packages\telethon\client\auth.py", line 207, in _start me = await self.sign_in(phone, code=value) File "C:\Python39\lib\site-packages\telethon\client\auth.py", line 368, in sign_in result = await self(request) File "C:\Python39\lib\site-packages\telethon\client\users.py", line 30, in call return await self._call(self._sender, request, ordered=ordered) File "C:\Python39\lib\site-packages\telethon\client\users.py", line 79, in _call result = await future telethon.errors.rpcbaseerrors.AuthKeyError: RPCError 406: UPDATE_APP_TO_LOGIN (caused by SignInRequest)

How u fix that ?

devmexican commented 2 years ago

if event.photo : file = await client.download_media(event.message.media, file=bytes)

else : file = await client.download_media(event.message.media, file=bytes)

await client.send_message(Channel_dest,info,file=file)