From c577b1bde58f9b5b07548969984a1d0c0d343d99 Mon Sep 17 00:00:00 2001 From: snipe <72265661+notsniped@users.noreply.github.com> Date: Tue, 2 Apr 2024 13:12:20 +0530 Subject: [PATCH] Switch from `commands.wait_for()` to `self.bot.wait_for()` --- cogs/minigames.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cogs/minigames.py b/cogs/minigames.py index aff1ed7c..69d637f9 100644 --- a/cogs/minigames.py +++ b/cogs/minigames.py @@ -23,16 +23,16 @@ def __init__(self, bot): @commands.cooldown(1, 10, commands.BucketType.user) async def guessthenumber(self, ctx: ApplicationContext): number = randint(1, 10) - localembed = discord.Embed(name="Guess the number!", description="I am currently thinking of a number from 1 to 10. Can you guess what it is?", color=color) + localembed = discord.Embed(title="Guess the number!", description="I am currently thinking of a number from 1 to 10. Can you guess what it is?", color=color) localembed.set_footer(text="If you guess what it is, you will win 500 to 1000 coins!") await ctx.respond(embed=localembed) def check(msg): return msg.author == ctx.author and msg.channel == ctx.channel and msg.content - msg = await commands.wait_for("message", check=check) + msg = await self.bot.wait_for("message", check=check) if int(msg.content) == number: randcoins = randint(500, 1000) currency.add(ctx.author.id, randcoins) - await ctx.respond(f"Correct! You've just won **{randcoins} coins** by guessing the correct number.") - else: return await ctx.respond("Too bad bozo, you guessed the number wrong and you won nothing.") + await ctx.channel.send(f"Correct {ctx.author.mention}! You've just won **{randcoins} coins** by guessing the correct number.") + else: return await ctx.channel.send(f"{ctx.author.mention} Too bad bozo, you guessed the number wrong and you won nothing.") @commands.slash_command( name="highlow",