made nsfw and sfw folders on plugin startup
This commit is contained in:
parent
eaf928ba8e
commit
44d656c15d
1 changed files with 3 additions and 1 deletions
|
|
@ -24,6 +24,8 @@ class StableDiffusion(commands.Cog):
|
||||||
try:
|
try:
|
||||||
if not os.path.exists(self.working_dir):
|
if not os.path.exists(self.working_dir):
|
||||||
os.mkdir(self.working_dir)
|
os.mkdir(self.working_dir)
|
||||||
|
os.mkdir(f"{self.working_dir}sfw")
|
||||||
|
os.mkdir(f"{self.working_dir}nsfw")
|
||||||
if not os.path.exists(self.db_dir):
|
if not os.path.exists(self.db_dir):
|
||||||
os.mkdir(self.db_dir)
|
os.mkdir(self.db_dir)
|
||||||
except:
|
except:
|
||||||
|
|
@ -297,7 +299,7 @@ class StableDiffusion(commands.Cog):
|
||||||
pnginfo.add_text("parameters", response2.get("info"))
|
pnginfo.add_text("parameters", response2.get("info"))
|
||||||
try:
|
try:
|
||||||
if ctx.channel.is_nsfw():
|
if ctx.channel.is_nsfw():
|
||||||
folder = self.working_dir
|
folder = self.working_dir + "nsfw/"
|
||||||
else:
|
else:
|
||||||
folder = self.working_dir + "sfw/"
|
folder = self.working_dir + "sfw/"
|
||||||
except:
|
except:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue