diff options
Diffstat (limited to 'main.py')
| -rw-r--r-- | main.py | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -332,8 +332,13 @@ async def guest_middleware(handler, event, data): last_command_time[user_id][1] = False last_command_time[user_id][2] = [] - if result.startswith("[") and ":" in result: + if ":" in result and ("poll" in result or "quiz" in result): + pw = ["[poll]", "poll", "quiz"] rl = result.split("\n") + for i, line in enumerate(rl): + if any(line.startswith(w) for w in pw): + rl = rl[i:] + break poll_type = rl[0].split(":")[0].replace("[", "").replace("]", "") poll_name = rl[0].split(":")[1] if len(rl) > 1: |