Commit 5eb36bc7 authored by zeroone2numeral2's avatar zeroone2numeral2
Browse files

Case-insensitive y/n

parent f06f3952
import re
import logging
from random import choice
from telegram.ext.dispatcher import run_async
......@@ -7,7 +8,7 @@ from bot import strings as s
logger = logging.getLogger(__name__)
YESNO_REGEX = r".*(?:y(?:es)?\/no?|no?\/y(?:es)?)$"
YESNO_REGEX = re.compile(r".*(?:y(?:es)?\/no?|no?\/y(?:es)?)$", re.I)
@run_async
def on_yesno(bot, update):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment