Merge branch 'master' of github.com:Biganon/cambot

This commit is contained in:
Simon Junod
2022-04-27 17:57:32 +02:00
2 changed files with 4 additions and 2 deletions

View File

@@ -19,5 +19,5 @@ class Button(nextcord.ui.Button):
class ButtonView(nextcord.ui.View):
def __init__(self, owner):
super().__init__()
super().__init__(timeout=None)
self.add_item(Button(owner=owner))

4
run.py
View File

@@ -182,7 +182,9 @@ async def on_message(message):
letter = part[0].lower()
else: # the part is an option
poll.options[letter] = part
if len(poll.options) > 20:
if len(poll.options) < 2:
pass
elif len(poll.options) > 20:
await message.channel.send("Erreur : 20 options maximum")
else:
output = f"{intro}\n\n"