txlyre 6 달 전
부모
커밋
54f192b40a
1개의 변경된 파일8개의 추가작업 그리고 2개의 파일을 삭제
  1. 8 2
      commands.py

+ 8 - 2
commands.py

@@ -290,9 +290,15 @@ async def markov_handler(bot, event, command):
         except:
             await event.reply("Ошибка!!!!!")
     elif command.args[0] == "say":
-        await markov_say(bot, peer_id)
+        if not bot.markov.is_ready:
+          await event.reply("Not ready:(")
+        else:
+          await markov_say(bot, peer_id)
     elif command.args[0] == "reply":
-        await markov_say(bot, peer_id, reply_to=peer_id)
+        if not bot.markov.is_ready:
+          await event.reply("Not ready:(")
+        else:
+          await markov_say(bot, peer_id, reply_to=peer_id)
     elif command.args[0] == "is_ready":
         await event.reply(str(bot.markov.is_ready))
     elif command.args[0] == "corpus_size":