Closed Lida1606 closed 2 years ago
That is because the variables are not configured, you can replace that data with an environment variable, to protect your information or place the values to do the tests.
please help i finished the app but still no messages forwarded note im forwarding messages from a bot to a group
If it is the first time, it will ask for your phone number and send a code to your telegram app. Luck.
APP_ID = app_id API_HASH =api_hash
try: BotzHubUser = TelegramClient('name', APP_ID, API_HASH) BotzHubUser.start() except Exception as ap: print(f"ERROR - {ap}") exit(1)
@BotzHubUser.on(events.NewMessage(incoming=True, chats=id_channel)) async def sender_bH(event):
await client.forward_messages(idchannel,event.message)
print("Bot has started.") BotzHubUser.run_until_disconnected()
its the first time and i got the phone number code already and the bot has started but still no messages forwarded and i tried 2 times and deleted the app and do it again and still the same problem
If I already send you the code it means that we are doing well Can you paste your code, so I can see the forwarding option?
im sorry i was trying to forward messages from bot to channel is it possible ?
On Thu, Apr 21, 2022 at 9:33 PM devmexican @.***> wrote:
If I already send you the code it means that we are doing well Can you paste your code, so I can see the forwarding option?
— Reply to this email directly, view it on GitHub https://github.com/Ayush7445/telegram-forwarder_auto/issues/6#issuecomment-1105674708, or unsubscribe https://github.com/notifications/unsubscribe-auth/AY2CB5EVIBP5RVZFJNN333DVGGUQRANCNFSM5TIFM3JQ . You are receiving this because you commented.Message ID: @.***>
of course it is possible
Traceback (most recent call last): File "/home/pi/Desktop/Telegrambots/telegram-forwarder_auto/bot.py", line 24, in
APP_ID = config("APP_ID", default=None, cast=int)
File "/home/pi/.local/lib/python3.9/site-packages/decouple.py", line 243, in call
return self.config(*args, *kwargs)
File "/home/pi/.local/lib/python3.9/site-packages/decouple.py", line 105, in call
return self.get(args, **kwargs)
File "/home/pi/.local/lib/python3.9/site-packages/decouple.py", line 99, in get
return cast(value)
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'