1
0
Fork 0
mirror of https://gitlab.jonasled.de/jonasled/discordbot synced 2024-10-03 07:48:58 +02:00

fixed poll

This commit is contained in:
jonasled 2020-08-16 16:41:37 +02:00
parent 5a4ed91a2a
commit 51f6dfad04

3
bot.py
View file

@ -339,7 +339,8 @@ async def emoji(ctx, *message: str):#emojifies the string the user give as param
# |_|
@bot.command(pass_context=True, brief="starts a poll", description="starts a poll, please give as first argument the question (for sentences please use \") and then the posibilities (leave empty for yes or no)")
@commands.cooldown(1, cooldownTime, commands.BucketType.user) async def poll(ctx, question, *options: str):#this is a tool to create a poll
@commands.cooldown(1, cooldownTime, commands.BucketType.user)
async def poll(ctx, question, *options: str):#this is a tool to create a poll
if reactOnValidCommand: await ctx.message.add_reaction("")
if len(options) <= 1:#check if options were supplied, if not add yes and no to the options
options = list(options)