Skip to content

Commit

Permalink
updated_ptrivia
Browse files Browse the repository at this point in the history
  • Loading branch information
danger-ahead committed Jun 24, 2021
1 parent 44dc0e9 commit 4600a29
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions commands/api_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,7 @@ async def ptrivia(discord, message):
random.shuffle(all_answers)

channel = message.channel
author = message.author

i = 1
output = ""
Expand All @@ -533,14 +534,15 @@ async def ptrivia(discord, message):
+ category
+ "\n\nOptions:\n"
+ output
+ "\nType `correctanswer` for the correct answer...\
\nType your answer (not case-sensitive)",
+ "\nType `correctanswer` for the correct answer.\
\nType your answer (not case-sensitive).\
You\'ve 60 seconds.",
color=discord.Color.blue(),
)
msg = await message.channel.send(embed=embed)

def check(m):
return m.channel == channel
return m.channel == channel and m.author == author

client = loader.client_loaded()
all_answers = [x.lower() for x in all_answers]
Expand All @@ -554,7 +556,7 @@ def check(m):
await bot_message.add_reaction("\U0001f44d")
await bot_message.reply(correct_answer)
elif bot_message.content.lower() in all_answers:
await bot_message.reply("Wrong answer!")
await bot_message.reply("Wrong answer!\nCorrect answer: "+correct_answer)
await bot_message.add_reaction("\U0001f44E")

except asyncio.TimeoutError:
Expand Down

0 comments on commit 4600a29

Please sign in to comment.