diff --git a/src/modules/misc.js b/src/modules/misc.js index 2a46138..07d4f47 100644 --- a/src/modules/misc.js +++ b/src/modules/misc.js @@ -14,6 +14,7 @@ const {tinycolor, random: randomColor} = require("@ctrl/tinycolor"); const sharp = require("sharp"); const net = require("node:net"); const fs = require("node:fs"); +const {resolve} = require("node:path"); const imagesClient = new GoogleImages(hf.apikeys.gimg, hf.apikeys.google); @@ -629,7 +630,7 @@ searchInteraction.callback = async function (interaction) { }; hf.registerCommand(searchInteraction); -const colornamesRaw = fs.readFileSync("../../data/colornames.csv").split("\n"); +const colornamesRaw = fs.readFileSync(resolve(__dirname, "../../data/colornames.csv")).split("\n"); colornamesRaw.shift(); const colornamesMapped = colornamesRaw.map((line) => { const [hex, name] = line.split(",");