import { data } from "./wwwroot/core/appData.js"; import path from "path"; import {readFileSync} from "fs"; import {Logger} from "./wwwroot/core/logging/logger.js"; try{ const filePath = "./patchnote.md"; const fullPath = path.resolve(filePath); const patchNoteContent = readFileSync(fullPath, 'utf8'); await data.client.login(process.env.DISCORD_TOKEN); await data.sender.send(data.updateChannelID, patchNoteContent); await data.client.destroy(); } catch (err){ await Logger.log("An error occurred while publishing patch note", err); }