소스 검색

Added a message if /cr section is not found

master
Mikhail Chernov 8 년 전
부모
커밋
745402c3c4
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4
    0
      magic-judge-telegram-bot.py

+ 4
- 0
magic-judge-telegram-bot.py 파일 보기

@@ -187,6 +187,10 @@ def comp_rules(bot, update, args):
elif not diff[-1:].isalpha():
other.append(name)

if not results:
update.message.reply_text('This section doesn\'t exist, my master!', quote=False)
return

text = '\n'.join(['<b>{}</b> {}'.format(name, crData['sections'][name][lang]) for name in results])
if other:
text += '\n<i>(Subsections: {}-{})</i>'.format(other[0], other[-1])

Loading…
취소
저장