mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-27 13:34:28 +00:00
Removed error catching in send_message
This commit is contained in:
parent
f452bcc468
commit
d98b4e919c
1 changed files with 1 additions and 5 deletions
|
@ -231,11 +231,7 @@ class Chat:
|
|||
# TODO: This could give problems if a class inherits Bot
|
||||
if not isinstance(bot, Bot):
|
||||
raise TypeError("bot is not an instance of Bot.")
|
||||
# Catch TelegramAPI exceptions
|
||||
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]}")
|
||||
await bot.api_request("sendMessage", text=text, chat_id=self.chat_id, **params)
|
||||
|
||||
|
||||
class User:
|
||||
|
|
Loading…
Reference in a new issue