ソースを参照

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])

読み込み中…
キャンセル
保存