diff --git a/sparkytron3000.py b/sparkytron3000.py index e1e1f7e..8e2e3b5 100644 --- a/sparkytron3000.py +++ b/sparkytron3000.py @@ -49,35 +49,6 @@ intents.message_content = True bot = commands.Bot(command_prefix='!', intents=intents) #discord stuff END -#delete save_image function once it has been used. this is temporary -@bot.command() -async def save_image(ctx): - try: - if ctx.message.content.startswith("!describe "): - file_url = ctx.message.content.split(" ", maxsplit=1)[1] - elif ctx.message.attachments: - file_url = ctx.message.attachments[0].url - else: - print("No image linked or attached.") - return - except Exception as error: - await handle_error(error) - print("Couldn't find image.") - return - - r = requests.get(file_url, stream=True) - - imageName = "blank_image.png" - - with open(imageName, 'wb') as out_file: - print(f"Saving image: {imageName}") - shutil.copyfileobj(r.raw, out_file) - - if os.path.exists(imageName): - await ctx.send("Saved Image!") - else: - await ctx.send("Something went wrong.") - @bot.command() async def moderate(ctx, filename): await ctx.send("Reminder, 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.")