telethonchat | Unsorted

Telegram-канал telethonchat - Telethon Chat

6097

Official Telethon's chat! Rules: • Speak English • Stay on topic (questions about Telethon) • Be respectful • Don't ask to ask • Spam-related uses lead to ban • Read https://docs.telethon.dev before asking things here Read more about us @TelethonUpdates

Subscribe to a channel

Telethon Chat

File "G:\python311\Lib\site-packages\telethon\client\downloads.py", line 438, in download_media
return await self._download_document(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "G:\python311\Lib\site-packages\telethon\client\
downloads.py", line 929, in _download_document
result = await self._download_file(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "G:\python311\Lib\site-packages\telethon\client\
downloads.py", line 584, in _download_file
return await self._download_file(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "G:\python311\Lib\site-packages\telethon\client\
downloads.py", line 563, in _download_file
async for chunk in self._iter_download(
File "G:\python311\Lib\site-packages\telethon\
requestiter.py", line 58, in __anext__
if await self._init(**self.kwargs):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "G:\python311\Lib\site-packages\telethon\client\
downloads.py", line 45, in _init
self._client = await self.client._get_cdn_client(cdn_redirect)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "G:\python311\Lib\site-packages\telethon\client\
telegrambaseclient.py", line 899, in _get_cdn_client
dc = await self._get_dc(cdn_redirect.dc_id, cdn=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "G:\python311\Lib\site-packages\telethon\client\
telegrambaseclient.py", line 809, in _get_dc
raise ValueError(f'Failed to get DC {dc_id} (cdn = {cdn})')
ValueError: Failed to get DC 203 (cdn = True)


I don't understand why I can successfully download this file through portable, but not through Teleton

Читать полностью…

Telethon Chat

Api bot can receive channel services?!

Читать полностью…

Telethon Chat

This has nothing to do with anything

Читать полностью…

Telethon Chat

in my research i can take file_token, any ideas how to get file if i have cd and file_token?

Читать полностью…

Telethon Chat

Hi and welcome to the group. Before asking any questions, please read the rules from the group's description, and don't forget to read the docs. Make sure you are using the latest version with pip3 install -U telethon, since most problems have already been fixed in newer versions.

Читать полностью…

Telethon Chat

how to get_entity with phone_number?

Читать полностью…

Telethon Chat

can i write in dm u?

Читать полностью…

Telethon Chat

sorry for sending long message

Читать полностью…

Telethon Chat

use help(ReportRequest) to see the parameters your installed version has

Читать полностью…

Telethon Chat

its layer 185 not 190

Читать полностью…

Telethon Chat

TL Reference for GetFullUser

Читать полностью…

Telethon Chat

because it requires a reason: https://core.telegram.org/method/messages.report

Читать полностью…

Telethon Chat

Alright thanks
I'll try methods on wiki and share the results

Читать полностью…

Telethon Chat

Doesn't the parser do that?

Читать полностью…

Telethon Chat

you can't send MessageEntityMentionName. you must send InputMessageEntityMentionName, or whatever it was called.

i cannot remember what part of v1 modifies urls-that-look-like-mentions for actual mentions

Читать полностью…

Telethon Chat

why wouldn't they, bots are likely to have more reliable updates than users. especially in channels/supergroups

Читать полностью…

Telethon Chat

if you receive no event, Telegram sent no event. don't use a userbot and switch to bot

Читать полностью…

Telethon Chat

Hello

I wan't delete this service message via client. I checked in multiple channels and sometimes, I didn't get event's update.

My code:


import telethon
client = TelegramClient('s', api_id, api_hash)

@client.on(telethon.events.Raw)
async def my_event_handler(event):
if isinstance(event, telethon.types.UpdateNewChannelMessage):
if isinstance(event.message, telethon.types.MessageService):
if isinstance(event.message.action, telethon.types.MessageActionPinMessage):
await client.delete_messages(event.message.chat_id, event.message.id)


async def main():
await client.start()
while True:
await asyncio.sleep(1)

if __name__ == '__main__':
asyncio.run(main())

Читать полностью…

Telethon Chat

/channel/TelethonChat/553281

where target_group_id == message.chat_id

Читать полностью…

Telethon Chat

TL Reference for ResolvePhone

Читать полностью…

Telethon Chat

yes that’s working thank you i tested than in previous version but seems working on this version

Читать полностью…

Telethon Chat

it's not optional argument in tl. the representation is off in this

you mostly pass default values like option=b''

Читать полностью…

Telethon Chat

its not problem
the problem is telegram changed report options completely and its no longer like before
in first request in telegram logs it sends empty option and message and in return gets all options

Читать полностью…

Telethon Chat

thank you but still asking for option

Читать полностью…

Telethon Chat

no its not check latest version it dosent need reason
messages.report(peer: inputPeerChannel(channelId: 1, accessHash: -1), id: [6767], option: <null>, message: )]

Читать полностью…

Telethon Chat

/channel/TelethonChat/618825

Читать полностью…

Telethon Chat

i guess its not working also with this version
still getting error

Читать полностью…

Telethon Chat

the parser can't use the input version. it needs the hash

Читать полностью…

Telethon Chat

☔️☔️

Читать полностью…

Telethon Chat

Alright thanks I'll give that a test either

Читать полностью…
Subscribe to a channel