When I try to run the command I always get this error message: "TypeError: '>' not supported between instances of 'Context' and 'int'"
from discord.ext import commands
class clear(commands.Cog):
def __init__(self, client):
self.client = client
# Events
@commands.Cog.listener()
async def on_ready(self):
print('Clear modul started')
# Command
@commands.command()
async def clear(ctx, amount=5, max=100, min=1):
if (amount > max):
await ctx.send(f"The value is too high! Enter a value `{min}-{max}` between.", delete_after=5)
elif (amount < min):
await ctx.send(f"The value is too small! Enter a value `{min}-{max}` between.", delete_after=5)
else:
await ctx.channel.purge(limit=amount+1)
await ctx.send(f"Törölve {amount}", delete_after=5)
def setup(client):
client.add_cog(clear(client))```
Aucun commentaire:
Enregistrer un commentaire