1
0
mirror of https://gitlab.com/akasroua/covot synced 2025-12-24 16:11:55 +01:00

Rewrite bot logic as a sequential conversation

This commit is contained in:
2020-11-26 01:59:50 +01:00
parent e10a9508a0
commit aaaaed3c40
2 changed files with 92 additions and 19 deletions

View File

@@ -64,7 +64,7 @@ def parse_boolean_string(value) -> bool:
"""
Converts string response to a boolean
"""
mapping = {r"[S-s][i-í]": True, r"[N-n]o": False}
mapping = {"si": True, "": True, "no": False}
return mapping[value]