This commit is contained in:
phixxy 2024-01-17 19:51:40 -08:00
parent 60d12e388c
commit 8ac831f6c9
2 changed files with 1 additions and 9 deletions

View file

@ -109,14 +109,8 @@ async def meme(ctx):
try: try:
topic = ctx.message.content.split(" ", maxsplit=1)[1] topic = ctx.message.content.split(" ", maxsplit=1)[1]
await ctx.send(f'Generating {topic} meme')
link, filepath = await generate_random_meme(topic) link, filepath = await generate_random_meme(topic)
'''channel_vars = await get_channel_config(ctx.channel.id)
try:
if channel_vars["ftp_enabled"]:
await update_meme_webpage(filepath)
except Exception as error:
print("COULDN'T UPLOAD TO FTP!")
await handle_error(error)'''
await ctx.send(link) await ctx.send(link)
except Exception as error: except Exception as error:
await handle_error(error) await handle_error(error)

View file

@ -263,8 +263,6 @@ async def delete_derp_files(server_folder):
print("Couldn't delete", filename) print("Couldn't delete", filename)
async def meme_handler(folder): async def meme_handler(folder):
if folder[:-1] != '/':
folder += '/'
for file in os.listdir(folder): for file in os.listdir(folder):
filepath = folder + file filepath = folder + file
await update_meme_webpage(filepath) await update_meme_webpage(filepath)