moved moderate command to phixxycom

This commit is contained in:
phixxy 2024-01-21 14:32:28 -08:00
parent e401ef8af8
commit 6c2dcabeb1
2 changed files with 11 additions and 12 deletions

View file

@ -55,18 +55,7 @@ async def update(ctx):
else:
await ctx.send("You don't have permission to do this.")
@commands.command(
description="Moderate",
help="This currently tool works by replacing the filename on the ftp server with a black image. The description will remain the same and may need to be altered.",
brief="Moderation Tools"
)
async def moderate(ctx, filename):
await upload_sftp("blank_image.png", (os.getenv('ftp_public_html') + 'ai-images/'), filename)
output = "Image " + filename + " replaced"
await ctx.send(output)
async def setup(bot):
bot.add_command(update)
bot.add_command(reset)
bot.add_command(kill)
bot.add_command(moderate)
bot.add_command(kill)

View file

@ -311,5 +311,15 @@ class PhixxyCom(commands.Cog):
except Exception as error:
print("Failed to generate blog")
@commands.command(
description="Moderate",
help="This currently tool works by replacing the filename on the ftp server with a black image. The description will remain the same and may need to be altered.",
brief="Moderation Tools"
)
async def moderate(self, ctx, filename):
await self.upload_sftp(f"{self.data_dir}blank_image.png", (os.getenv('ftp_public_html') + 'ai-images/'), filename)
output = "Image " + filename + " replaced"
await ctx.send(output)
async def setup(bot):
await bot.add_cog(PhixxyCom(bot))