Telethon
Telethon copied to clipboard
Send Message as Channel
Is this option available yet? to send message as your channels instead of your personal account. Didn't find anything similar in the docs or the issues.
there is send_as
parameter in send_message
method, present in master
branch. You can use that to send as a channel.
This error I'm having while trying to sign in to telethon
Traceback (most recent call last):
File "test.py", line 13, in <module>
asyncio.run(main())
File "/usr/lib/python3.8/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
return future.result()
File "test.py", line 10, in main
await client.start()
File "/home/ubuntu/.local/lib/python3.8/site-packages/telethon/_client/auth.py", line 25, in __aenter__
await self.start_fn()
File "/home/ubuntu/.local/lib/python3.8/site-packages/telethon/_client/auth.py", line 143, in _start
me = await self.sign_in(phone, code=value)
TypeError: sign_in() takes 1 positional argument but 2 positional arguments (and 1 keyword-only argument) were given
Unfortunately this will have to be done through raw API in the meantime. v2 is still not ready for public use. I do not intend to add new features to v1, other than updating the layer used by the library to remain compatible with Telegram.
This means you can use raw API in v1.25 (available in PyPi) to achieve this but there is no send_as
. For questions on how please use the official Telegram group or StackOverflow.