Hello so I just writed a timeout code but when I typed !timeout @warped karma 15 it won`t timeout and it prints 1 to the console hope you can help me about it.
Here is my code:
@commands.command()
@commands.has_permissions(moderate_members=True)
async def timeout(self, ctx, member: discord.Member, time: int, *, reason=None):
if time < 1 or time > 2419200:
conf_embed = discord.Embed(title="Error!", color=discord.Color.red(), timestamp=datetime.utcnow())
conf_embed.add_field(name="Invaild Duration:", value="The duration should between **1** and **2419200**", inline=False)
await ctx.send(embed=conf_embed)
return
print(1)
await member.timeout(duration=time, reason=reason)
print(2)
await ctx.send(f"Timed out {member.mention} for {time} seconds")
print(3)