aboutsummaryrefslogtreecommitdiffstats
path: root/bot
diff options
context:
space:
mode:
authorGravatar twhaley6 <[email protected]>2019-04-26 16:59:06 -0400
committerGravatar twhaley6 <[email protected]>2019-04-26 16:59:06 -0400
commit6de1c25335d818928e594edddbf715451a4506c5 (patch)
tree6e8355ef984b87d540b95ccb926643259d3a7343 /bot
parenteaster riddle .py created (diff)
added user input checks
Diffstat (limited to 'bot')
-rw-r--r--bot/seasons/easter/easter_riddle.py24
1 files changed, 18 insertions, 6 deletions
diff --git a/bot/seasons/easter/easter_riddle.py b/bot/seasons/easter/easter_riddle.py
index 0fff5542..2562fa17 100644
--- a/bot/seasons/easter/easter_riddle.py
+++ b/bot/seasons/easter/easter_riddle.py
@@ -23,6 +23,7 @@ class EasterRiddle(commands.Cog):
def __init__(self, bot):
self.bot = bot
self.quiz_messages = {}
+ self.mention = " "
@commands.command(aliases=["riddlemethis", "riddleme"])
async def riddle(self, ctx):
@@ -38,30 +39,41 @@ class EasterRiddle(commands.Cog):
q_embed = discord.Embed(title=question, description=description, colour=Colours.pink)
- msg = await ctx.send(embed=q_embed)
+ await ctx.send(embed=q_embed)
await asyncio.sleep(TIMELIMIT)
"""
- a_embed = discord.Embed(
+ h_embed = discord.Embed(
title=f"Here's a hint: {hints[0]}!",
colour=Colours.pink
)
- msg = await ctx.send(embed=q_embed)
+ await ctx.send(embed=h_embed)
await asyncio.sleep(TIMELIMIT)
- a_embed = discord.Embed(
- title=f"Here's a hint: {hints[0]}!",
+ h_embed = discord.Embed(
+ title=f"Here's a hint: {hints[1]}!",
colour=Colours.pink
)
+
+ await ctx.send(embed=h_embed)
+ await asyncio.sleep(TIMELIMIT)
"""
+ content = f"Well done {mention} for getting it correct!" if mention else "Nobody got it right..."
+
a_embed = discord.Embed(
title=f"The answer is: {correct}!",
colour=Colours.pink
)
- await ctx.send(embed=a_embed)
+ await ctx.send(content, embed=a_embed)
+
+ @commands.Cog.listener()
+ async def on_message(self, message):
+ if message.lower() == self.correct.lower():
+ self.mention = message.author
+
def setup(bot):