remove the last comma in prompt before uploading

This commit is contained in:
phixxy 2024-01-20 22:13:37 -08:00
parent 754d3b466c
commit d90c8a4418

View file

@ -35,6 +35,7 @@ class PhixxyCom(commands.Cog):
for line in reversed(lines): for line in reversed(lines):
if filename in line: if filename in line:
prompt = line[line.index("Prompt: ") + 7:line.index("Filename: ")] prompt = line[line.index("Prompt: ") + 7:line.index("Filename: ")]
prompt = ''.join(prompt.rsplit(',', 1)) # Remove the last comma
return prompt return prompt
return "Unknown Prompt" return "Unknown Prompt"