17 lines
567 B
JavaScript
17 lines
567 B
JavaScript
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);
|
|
} |