If there is no moderators file then create it

This commit is contained in:
bashrc committed 2019-08-11 12:27:29 +01:00
1 parent 9938be63bf
commit 57f1b99a85
1 file changed
+3
+3
View File
@@ -34,6 +34,9 @@ def addModerator(baseDir: str,nickname: str):
moderator=moderator.strip('\n')
if len(moderator)>1:
f.write(moderator+'\n')
else:
with open(moderatorsFile, "w+") as f:
f.write(nickname+'\n')
def removeModerator(baseDir: str,nickname: str):
"""Removes a moderator nickname from the file