aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/main.py b/main.py
index e54c349..a603e2f 100644
--- a/main.py
+++ b/main.py
@@ -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: