Switch to async!

This commit is contained in:
Rykov7
2023-10-28 18:47:34 +03:00
parent 65e04a36e0
commit 5d179b0de2
7 changed files with 136 additions and 233 deletions
+3 -3
View File
@@ -68,8 +68,8 @@ def is_white(message: types.Message) -> bool:
return message.from_user.id in WHITEIDS
def send_or_reply(m: types.Message, answer, **kwargs):
async def send_or_reply(m: types.Message, answer, **kwargs):
if m.reply_to_message:
bot.reply_to(m.reply_to_message, answer, **kwargs)
await bot.reply_to(m.reply_to_message, answer, **kwargs)
else:
bot.send_message(m.chat.id, answer, **kwargs)
await bot.send_message(m.chat.id, answer, **kwargs)