I am trying to make a script that you type !settopic (topic here) it then creates a file with what the user inputted BUT it creates the file name with their channel. Then for !topic it checks if there is a file with the channel name then it says the topic.
Example: Lets say Bob(mod of channel) wants to create a topic and his channel is called Bob's Corner. He would type !settopic Just Hanging Out , it then puts Just Hanging Out in a .txt file named Bob's Corner.txt since that is his channel name. Then when someone types !topic in his channel it looks for the file called Bob's Corner.txt since someone said it in his channel. I am doing this so the bot I am making can be in multiple channels and can set different topics for each one. Also make it so only if your a mod of the channel you can only set a topic. Thank you for whoever helps