I am working on a bot, I am working on the db. But I ran into an issue which is providing a space into the file, whenever I do "[bot-prefix]new_file testfile This has spaces in it," it'll only write "This," does anyone have a solution for my issue? (ignore the below comments I had to edit this message for posting privelages, I honestly do wish StackOverflow understood different devs has different styles of programming and that a different question won't always help.)
Here is my code for it:
async def new_file(ctx, filename: str, data: str):
newfile = open(f'{filename}.txt',"a+")
newfile.write(data)
newfile.close()```