"Create a new poll using poll 'ice cream' vs cake, optionally followed by voting time in seconds (max 1h), "
"then respond with vote a/b or vote cake to place a vote. Use pollstatus for a report on current votes.")
- vote_duration = 60 * 1
- max_vote_duration = 60 * 60 * 12
+ vote_duration = 60 * 15 # 15min
+ max_vote_duration = 60 * 60 * 24 * 14 # two weeks
KEY_ACTIVE = "active".encode()
else:
prior_poll = self.get_poll(poll.key)
if prior_poll and prior_poll.votes:
-
- return Action(msg=f"This was already decided at {prior_poll.end_date}: {prior_poll.status_report()}")
+ return Action(
+ msg=f"This was already decided at {prior_poll.end_date}: {prior_poll.status_report()}")
# enable poll
self.start_poll(poll)
if i % 2 == 1 or i == len(words) - 1:
if word == "vs":
options.append(words[i - 1])
- elif i == len(words) - 1 and words[i-1] == "vs":
+ elif i == len(words) - 1 and words[i - 1] == "vs":
options.append(word)
elif i == len(words) - 1 and word.isnumeric():
options.append(words[i - 1])