import discord
from discord.ext import commands
class Purge(commands.Cog):
def __init__(self, client):
self.client = client
@commands.command()
async def clear(ctx, amount = 5):
if amount == 0:
await ctx.send("AMOUNT CANNOT BE 0!")
else:
await ctx.channel.purge(limit = amount + 1)
def setup(client):
client.add_cog(Purge(client))
当我输入命令 -clear 时,它不执行任何操作,也没有错误消息告诉我任何事情