Q:

Number Guessing Game with discord.py rewrite

I tried this code, bot says guess but doesn't respond to my guess.
@commands.command()
async def game(self, ctx):
    number = random.randint(0, 100)
    for guess in range(0, 5):
        await ctx.send('guess')
        Message = await bot.wait_for('message')
        Message = int(Message)
        if Message.cleant_content > number:
            await ctx.send('bigger')
        elif Message.cleant_content < number:
            await ctx.send('smaller')
        else:
            await ctx.send('true')

A:

Because you're using cogs, I'd imagine you've got your bot initialised as self.bot instead of just bot.
Also, you're converting a message object to an integer, and trying to access an attribute of an integer named cleant_content.
This is how your code should look:
@commands.command()
async def game(self, ctx):
    number = random.randint(0, 100)
    for i in range(0, 5):
        await ctx.send('guess')
        response = await self.bot.wait_for('message')
        guess = int(response.content)
        if guess > number:
            await ctx.send('bigger')
        elif guess < number:
            await ctx.send('smaller')
        else:
            await ctx.send('true')

I also changed up a few of the variable names for readability purposes. If you want to, you can add some checks for whether their guess was actually a number or not.
Additionally, I changed what was meant to be clean_content to content instead, as clean_content is completely void of its purpose because you can't convert <, @, #, !, > and such to an integer, meaning it would error either way. I'm hoping that made some sense.

References:

Client.wait_for()
Message.content
Message.clean_content - Read the difference between content and clean_content to better understand what I was getting at

