1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-23 19:44:20 +00:00

Removed error catching in send_message

This commit is contained in:
Steffo 2017-03-27 12:45:22 +02:00
parent f452bcc468
commit d98b4e919c

View file

@ -231,11 +231,7 @@ class Chat:
# TODO: This could give problems if a class inherits Bot # TODO: This could give problems if a class inherits Bot
if not isinstance(bot, Bot): if not isinstance(bot, Bot):
raise TypeError("bot is not an instance of Bot.") raise TypeError("bot is not an instance of Bot.")
# Catch TelegramAPI exceptions await bot.api_request("sendMessage", text=text, chat_id=self.chat_id, **params)
try:
await bot.api_request("sendMessage", text=text, chat_id=self.chat_id, **params)
except TelegramAPIError as e:
print(f"[Telegram] sendMessage failed: {e.args[0]}")
class User: class User: