summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEvgeny Zinoviev <me@ch1p.io>2023-06-11 03:06:54 +0300
committerEvgeny Zinoviev <me@ch1p.io>2023-06-11 03:06:54 +0300
commit975d2bc6ed6d588187fea4bb538e04ac30cbd989 (patch)
tree428fd34dc44aa126900f171f899a342f49bca211 /include
parentd1331c2904703efc2e10b6942170726930b630c8 (diff)
telegram/bot: fix missing async/await in some functions
Diffstat (limited to 'include')
-rw-r--r--include/py/homekit/telegram/bot.py26
1 files changed, 13 insertions, 13 deletions
diff --git a/include/py/homekit/telegram/bot.py b/include/py/homekit/telegram/bot.py
index cf68b1d..8a78c6f 100644
--- a/include/py/homekit/telegram/bot.py
+++ b/include/py/homekit/telegram/bot.py
@@ -545,27 +545,27 @@ async def notify_user(user_id: int, text: Union[str, Exception], **kwargs) -> No
**kwargs)
-def send_photo(user_id, **kwargs):
- _application.bot.send_photo(chat_id=user_id, **kwargs)
+async def send_photo(user_id, **kwargs):
+ await _application.bot.send_photo(chat_id=user_id, **kwargs)
-def send_audio(user_id, **kwargs):
- _application.bot.send_audio(chat_id=user_id, **kwargs)
+async def send_audio(user_id, **kwargs):
+ await _application.bot.send_audio(chat_id=user_id, **kwargs)
-def send_file(user_id, **kwargs):
- _application.bot.send_document(chat_id=user_id, **kwargs)
+async def send_file(user_id, **kwargs):
+ await _application.bot.send_document(chat_id=user_id, **kwargs)
-def edit_message_text(user_id, message_id, *args, **kwargs):
- _application.bot.edit_message_text(chat_id=user_id,
- message_id=message_id,
- parse_mode='HTML',
- *args, **kwargs)
+async def edit_message_text(user_id, message_id, *args, **kwargs):
+ await _application.bot.edit_message_text(chat_id=user_id,
+ message_id=message_id,
+ parse_mode='HTML',
+ *args, **kwargs)
-def delete_message(user_id, message_id):
- _application.bot.delete_message(chat_id=user_id, message_id=message_id)
+async def delete_message(user_id, message_id):
+ await _application.bot.delete_message(chat_id=user_id, message_id=message_id)
def set_database(_db: BotDatabase):