Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request - target Group Chat ID #37

Closed
jevgen opened this issue Dec 6, 2022 · 4 comments
Closed

Feature request - target Group Chat ID #37

jevgen opened this issue Dec 6, 2022 · 4 comments

Comments

@jevgen
Copy link

jevgen commented Dec 6, 2022

I tried unsuccessfully targeting group chat ID.
Currently script works for channels, but not for groups it seem.
Is it possible to add support to archive and analyse Group Chats?

@aaarghhh
Copy link
Contributor

Just tested,
I can confirm that it works using "name_id" not the numeric one "(-100)xxxxxxxx" without the @.

Can you try to analyze a public chat using it's "nickname" xxxxxxxx, or a private using the related link, like https://t.me/joinchat/xxxxxxxxxxx .

The usage is:

telepathy.py -t xxxxxxxx -c

where xxxxxxxx is the name of the chat.

@jevgen
Copy link
Author

jevgen commented Dec 19, 2022

Just tested, I can confirm that it works using "name_id" not the numeric one "(-100)xxxxxxxx" without the @.

Can you try to analyze a public chat using it's "nickname" xxxxxxxx, or a private using the related link, like https://t.me/joinchat/xxxxxxxxxxx .

The usage is:

telepathy.py -t xxxxxxxx -c

where xxxxxxxx is the name of the chat.

This is not how I can use it. On attempt to run from prompt I'm getting:

'Traceback (most recent call last):
File "/opt/homebrew/bin/telepathy", line 8, in
sys.exit(cli())
File "/opt/homebrew/lib/python3.10/site-packages/click/core.py", line 829, in call
return self.main(*args, **kwargs)
File "/opt/homebrew/lib/python3.10/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/opt/homebrew/lib/python3.10/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/opt/homebrew/lib/python3.10/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/opt/homebrew/lib/python3.10/site-packages/telepathy/telepathy.py", line 1740, in cli
client.loop.run_until_complete(main())
File "/opt/homebrew/Cellar/python@3.10/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
return future.result()
File "/opt/homebrew/lib/python3.10/site-packages/telepathy/telepathy.py", line 444, in main
entity = await client.get_entity(t)
File "/opt/homebrew/lib/python3.10/site-packages/telethon/client/users.py", line 335, in get_entity
result.append(await self._get_entity_from_string(x))
File "/opt/homebrew/lib/python3.10/site-packages/telethon/client/users.py", line 574, in _get_entity_from_string
raise ValueError(
ValueError: Cannot find any entity corresponding to "-1756425942"'

and on attempt on running from full path I get:

'my@computer ~ % which telepathy.py
telepathy.py not found
my@computer ~ % locate telepathy.py
/opt/homebrew/lib/python3.10/site-packages/telepathy/telepathy.py
my@computer ~ % /opt/homebrew/lib/python3.10/site-packages/telepathy/telepathy.py -t -1756425942 -c
zsh: permission denied: /opt/homebrew/lib/python3.10/site-packages/telepathy/telepathy.py
'

Besides, telepathy seems not accepting non-ASCII chat names, so referring to those from numeric ID is the pnly way and it seems very much broken from attempted use.

@proseltd
Copy link
Owner

Hi @jevgen! @aaarghhh has included better support for this in the latest update. Let me me know how you get on with that and if you need any more help, I'm here!

@jevgen
Copy link
Author

jevgen commented Jan 27, 2023

Great news! Thank you so much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants