2025-05-11 23:46:56 +07:00

25 lines
709 B
Python

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))