fixed error in logging where newlines were not being removed
This commit is contained in:
parent
2b127c225d
commit
225e715639
2 changed files with 2 additions and 2 deletions
|
|
@ -238,7 +238,7 @@ class ChatGPT(commands.Cog):
|
|||
await self.download_image(image_url, image_filepath)
|
||||
with open(image_filepath, "rb") as fh:
|
||||
f = discord.File(fh, filename=image_filepath)
|
||||
log_data = f'Author: {ctx.author.name}, Prompt: {prompt}, Filename: {my_filename}\n'
|
||||
log_data = f'Author: {ctx.author.name}, Prompt: {prompt.replace('\n',' ')}, Filename: {my_filename}\n'
|
||||
with open(f"{self.data_dir}logs/dalle3.log", 'a') as log_filepath:
|
||||
log_filepath.writelines(log_data)
|
||||
await ctx.send(f'Generated by: {ctx.author.name}\nPrompt: {prompt}', file=f)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue