diff options
author | Ninjune x <enderknight537@gmail.com> | 2023-01-08 02:12:14 -0600 |
---|---|---|
committer | Ninjune x <enderknight537@gmail.com> | 2023-01-08 02:12:14 -0600 |
commit | 688e13930681bca7881d19468745f7067e9bc5c2 (patch) | |
tree | 9e95e59359dd2ae6e2e7761666b99a191bb62a1f /util/constants.js | |
parent | 1891ada92ab1911cfaaa7ad0e72c85573f4fcbb6 (diff) | |
download | coleweight-688e13930681bca7881d19468745f7067e9bc5c2.tar.gz coleweight-688e13930681bca7881d19468745f7067e9bc5c2.tar.bz2 coleweight-688e13930681bca7881d19468745f7067e9bc5c2.zip |
v1.8.6future
Diffstat (limited to 'util/constants.js')
-rw-r--r-- | util/constants.js | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/util/constants.js b/util/constants.js index 776f3f7..16a0e6e 100644 --- a/util/constants.js +++ b/util/constants.js @@ -1,4 +1,6 @@ import PogObject from "PogData" +import axios from "../../axios" +import settings from "../settings" let PogData = new PogObject("Coleweight", { "api_key": "", @@ -39,20 +41,28 @@ let AbilityData = new PogObject("Coleweight", { }, "config/.ability_data.json") const PREFIX = "&2[CW] " -export default -{ +export default constants = { PREFIX: PREFIX, CALCULATEERRORMESSAGE: `${PREFIX}&cInvalid arguments. '/cw calculate help' for more information.`, INVALIDARGS: `${PREFIX}&cInvalid arguments. '/cw help' for more information.`, VERSION: (JSON.parse(FileLib.read("Coleweight", "metadata.json"))).version, + CWINFO: undefined, data: PogData, powderdata: PowderData, timerdata: TimerData, downtimedata: DowntimeData, collectiondata: CollectionData, abilitydata: AbilityData, - throneValues: [], - spiralValues: [], beta: false, serverData: {} -}
\ No newline at end of file +} + +register("gameLoad", () => { + axios.get(`https://ninjune.dev/api/cwinfo?new=true`) + .then((res) => { + constants.CWINFO = res.data + }) + .catch((e) => { + if(settings.debug) console.log(`[CW] Error loading CWINFO: ${e}`) + }) +})
\ No newline at end of file |