Explorar el Código

Added a message if /cr section is not found

master
Mikhail Chernov hace 9 años
padre
commit
745402c3c4
Se han modificado 1 ficheros con 4 adiciones y 0 borrados
  1. 4
    0
      magic-judge-telegram-bot.py

+ 4
- 0
magic-judge-telegram-bot.py Ver fichero

elif not diff[-1:].isalpha(): elif not diff[-1:].isalpha():
other.append(name) 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]) text = '\n'.join(['<b>{}</b> {}'.format(name, crData['sections'][name][lang]) for name in results])
if other: if other:
text += '\n<i>(Subsections: {}-{})</i>'.format(other[0], other[-1]) text += '\n<i>(Subsections: {}-{})</i>'.format(other[0], other[-1])

Cargando…
Cancelar
Guardar