telegram/bot: fix missing async/await in some functions
This commit is contained in:
parent
d1331c2904
commit
975d2bc6ed
@ -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):
|
||||
|
Loading…
x
Reference in New Issue
Block a user