mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-12-17 23:24:20 +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
|
# 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
|
|
||||||
try:
|
|
||||||
await bot.api_request("sendMessage", text=text, chat_id=self.chat_id, **params)
|
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:
|
||||||
|
|
Loading…
Reference in a new issue