Base bot.

This commit is contained in:
Alex Root Junior 2017-05-19 21:20:59 +03:00
parent 3a2fafae2b
commit 23525fd364
7 changed files with 230 additions and 0 deletions

11
aiogram/exceptions.py Normal file
View file

@ -0,0 +1,11 @@
class ValidationError(Exception):
pass
class TelegramAPIError(Exception):
def __init__(self, message, method, status, body):
super(TelegramAPIError, self).__init__(
f"A request to the Telegram API was unsuccessful (Status code: {status}). {message}")
self.method = method
self.status = status
self.body = body