txlyre 1 년 전
부모
커밋
9bf92ac6c6
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      commands.py

+ 5 - 0
commands.py

@@ -427,6 +427,11 @@ async def run_handler(bot, event, command):
 
   language_name, text = re.match(r'^(\w+)(?:\s|\n)((?:\n|.)*)$', command.args_string).groups()
 
+  if not text.strip():
+    await event.reply('Пожалуйста, не оставляйте ввод пустым!')
+
+    return
+
   async with ClientSession() as session:
     try:
       async with session.post(