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

How can I know my telegram-cli account is blocked or not authorized? #133

Open
ghost opened this issue Apr 23, 2018 · 2 comments
Open

How can I know my telegram-cli account is blocked or not authorized? #133

ghost opened this issue Apr 23, 2018 · 2 comments

Comments

@ghost
Copy link

ghost commented Apr 23, 2018

Hello. Here is a code snippet I use in my project:

tg = Telegram(telegram='/home/tg/bin/telegram-cli', pubkey_file='/home/tg/tg-server.pub', port=9600)
sender = tg.sender

Can I somehow check is my telegram-cli account is blocked or not authorized when I create tg or call sender.execute_function(...) method by catching some exception for example?

Component Version
python 3.6.3
pytg   0.4.10
OS     Linux 4.13.0-38-generic #43-Ubuntu SMP x86_64 GNU/Linux
@luckydonald
Copy link
Owner

You might get a pytg.exceptions.NoResponse, but I'm not quite sure.

@luckydonald
Copy link
Owner

Or the error described in #132.

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

1 participant