From b4c81a60b3c1a2afee4b2a322cf4a03be12ee21d Mon Sep 17 00:00:00 2001 From: Lonami Exo Date: Mon, 20 Mar 2017 12:44:10 +0100 Subject: [PATCH] Add more errors --- telethon/errors.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/telethon/errors.py b/telethon/errors.py index 06b168ab..c23a2061 100644 --- a/telethon/errors.py +++ b/telethon/errors.py @@ -126,6 +126,9 @@ class RPCError(Exception): '(for example, to send a message in a channel which is not yours).', 'PASSWORD_HASH_INVALID': 'The password (and thus its hash value) you entered is invalid.', + 'BOT_METHOD_INVALID': + 'The API access for bot users is restricted. The method you tried ' + 'to invoke cannot be executed as a bot.', # 401 UNAUTHORIZED 'AUTH_KEY_UNREGISTERED': 'The key is not registered in the system.',