forgor something
This commit is contained in:
2
index.js
2
index.js
@@ -86,7 +86,7 @@ const commandFolders = fs.readdirSync(foldersPath);
|
|||||||
// On client ready, generate upgrades image if missing or on first run
|
// On client ready, generate upgrades image if missing or on first run
|
||||||
client.on(Events.ClientReady, async () => {
|
client.on(Events.ClientReady, async () => {
|
||||||
try {
|
try {
|
||||||
const imgDir = path.resolve(__dirname, 'public', 'images');
|
const imgDir = path.resolve(__dirname, 'public');
|
||||||
if (!fs.existsSync(imgDir)) fs.mkdirSync(imgDir, { recursive: true });
|
if (!fs.existsSync(imgDir)) fs.mkdirSync(imgDir, { recursive: true });
|
||||||
const imgPath = path.join(imgDir, 'upgrades.png');
|
const imgPath = path.join(imgDir, 'upgrades.png');
|
||||||
if (stateWasCreated || !fs.existsSync(imgPath)) {
|
if (stateWasCreated || !fs.existsSync(imgPath)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user