import nextcord from nextcord.ext import commands from events import ai class AICommands(commands.Cog): def __init__(self, bot): self.client = bot @commands.command(description="Clear your AI history") async def clear(self, ctx: nextcord.Message): user = await ai.find(ai.SquogData, "id", ctx.author.id) if not user: return await ctx.reply("You don't have any AI data.") else: userIndex = ai.SquogData.index(user) print(userIndex) ai.SquogData.remove(userIndex) await ai.flush() await ctx.reply("Cleared your AI data.") return None def setup(bot): bot.add_cog(AICommands(bot))