36 lines
1.0 KiB
JavaScript
36 lines
1.0 KiB
JavaScript
import { readFileSync } from 'fs';
|
|
|
|
export function getConfig() {
|
|
return JSON.parse(readFileSync("./config/botConfig.json"));
|
|
}
|
|
|
|
export function getTOKEN() {
|
|
const parsedJSON = getConfig();
|
|
return parsedJSON.TOKEN;
|
|
}
|
|
|
|
export function getGuildID() {
|
|
const parsedJSON = getConfig();
|
|
parsedJSON.GuildID = BigInt(parsedJSON.GuildID);
|
|
//console.log("Guild ID: ", parsedJSON.GuildID);
|
|
return parsedJSON.GuildID;
|
|
}
|
|
|
|
export function getApplicationID() {
|
|
const parsedJSON = getConfig();
|
|
parsedJSON.ApplicationID = BigInt(parsedJSON.ApplicationID);
|
|
//console.log("Application ID: ", parsedJSON.ApplicationID);
|
|
return parsedJSON.ApplicationID;
|
|
}
|
|
|
|
export function getDeviceID(){
|
|
const parsedJSON = getConfig();
|
|
//console.log("Device ID: ", parseInt(parsedJSON.DeviceID));
|
|
return parseInt(parsedJSON.DeviceID);
|
|
}
|
|
|
|
export function getDeviceName(){
|
|
const parsedJSON = getConfig();
|
|
//console.log("Device Name: ", parseInt(parsedJSON.DeviceName));
|
|
return parsedJSON.DeviceName;
|
|
} |