alfem/telegram-download-daemon

Error

DLX23 opened this issue · 3 comments

DLX23 commented

i go the following error (Win10,Python 3.9.2):

Telegram Download Daemon 1.4
Traceback (most recent call last):
  File "M:\telepy\telegram-download-daemon.py", line 224, in <module>
    client.loop.run_until_complete(start())
  File "C:\Users\Maik\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 642, in run_until_complete
    return future.result()
  File "M:\telepy\telegram-download-daemon.py", line 218, in start
    await sendHelloMessage(client, peerChannel)
  File "M:\telepy\telegram-download-daemon.py", line 100, in sendHelloMessage
    await client.send_message(entity, "Telegram Download Daemon "+TDD_VERSION)
  File "C:\Users\Maik\AppData\Local\Programs\Python\Python39\lib\site-packages\telethon\client\messages.py", line 826, in send_message
    result = await self(request)
  File "C:\Users\Maik\AppData\Local\Programs\Python\Python39\lib\site-packages\telethon\client\users.py", line 30, in __call__
    return await self._call(self._sender, request, ordered=ordered)
  File "C:\Users\Maik\AppData\Local\Programs\Python\Python39\lib\site-packages\telethon\client\users.py", line 79, in _call
    result = await future
telethon.errors.rpcerrorlist.ChatAdminRequiredError: Chat admin privileges are required to do that in the specified chat (for example, to send a message in a channel which is not yours), or invalid permissions used for the channel or group (caused by SendMessageRequest)
[ERROR/2021-03-22 11:34:47,712]asyncio:Task was destroyed but it is pending!
task: <Task pending name='Task-10' coro=<worker() running at M:\telepy\telegram-download-daemon.py:189> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x000001FB4FA01520>()]>>

alfem commented

Probably the channel_id you are using is not correct. Please, check this id belongs to the daemon user.

DLX23 commented

Channel ID is the number after "C" and before "_" in Telegram Web URL?

alfem commented

No, it is not.

Check this: https://gist.github.com/mraaroncruz/e76d19f7d61d59419002db54030ebe35

You can also get your channel id programatically or simply add one of those "get my id" bots to the channel.