diff --git a/cogs/general.py b/cogs/general.py index 0f8a0d092..a33a006f4 100644 --- a/cogs/general.py +++ b/cogs/general.py @@ -339,7 +339,7 @@ class General: if "@everyone" in check or "@here" in check: await self.bot.say("Nice try.") return - p = NewPoll(message, self) + p = NewPoll(message, " ".join(text), self) if p.valid: self.poll_sessions.append(p) await p.start() @@ -377,13 +377,12 @@ class General: return user.joined_at class NewPoll(): - def __init__(self, message, main): + def __init__(self, message, text, main): self.channel = message.channel self.author = message.author.id self.client = main.bot self.poll_sessions = main.poll_sessions - msg = message.content[6:] - msg = msg.split(";") + msg = [ans.strip() for ans in text.split(";")] if len(msg) < 2: # Needs at least one question and 2 choices self.valid = False return None