lc_cleanup

This commit is contained in:
AF 2024-05-17 12:26:42 +00:00
parent 833a2383c4
commit 0bcede6afb
Signed by: alisa
SSH Key Fingerprint: SHA256:vNY4pdIZvO1FYJKHROkdHLtvyopizvZVAEwg9AF6h04

View File

@ -129,6 +129,14 @@ class Night(commands.Cog):
for url in urls:
tg.create_task(self.leetcode_one(ctx, url))
@commands.command()
@commands.is_owner()
async def lc_cleanup(self, ctx: commands.Context):
async for message in ctx.channel.history(limit=1000):
if message.author == ctx.me and message.content.startswith("exists:"):
await message.delete()
await ctx.reply("done")
@commands.hybrid_command()
async def tex(self, ctx: commands.Context, *, code: Annotated[list[str], CodeblockConverter]):
print(code)