summaryrefslogtreecommitdiff
path: root/include/py
diff options
context:
space:
mode:
Diffstat (limited to 'include/py')
-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):