Version 0.1.0 - Mise en place de Discord.js

This commit is contained in:
2025-02-23 13:54:07 +01:00
parent cb206ffa22
commit b054c8a316
19 changed files with 2465 additions and 2 deletions

View File

@@ -0,0 +1,33 @@
const {Database} = require("./Database")
const {__glob} = require("../GlobalVars")
const {LogType} = require("loguix")
const path = require("path")
const clog = new LogType("Configuration")
const config = new Database("config", __glob.DATA + path.sep + "config.json", {
token: "",
report: {
channel : "",
contact : ""
}
})
function getToken() {
return config.data.token
}
function getReportChannel() {
return config.data.report.channel
}
function getReportContact() {
return config.data.report.contact
}
if(getToken() == "") {
clog.error("Impossible de démarrer sans token valide")
process.exit(1)
}
module.exports = {getToken, getReportChannel, getReportContact}