diff options
| author | Ninjune <enderknight537@gmail.com> | 2022-11-08 13:30:41 -0600 |
|---|---|---|
| committer | Ninjune <enderknight537@gmail.com> | 2022-11-08 13:30:41 -0600 |
| commit | e72c42345ef32fe9f3eeaf92844c0b77f175fac6 (patch) | |
| tree | a67ca92dfd4bbd5df1fcdf1beccad9bc0ba36da8 /util/apiNew.js | |
| parent | f2d535d6979cf6cb04a7245925a5bcf71bee2c67 (diff) | |
| download | coleweight-1.5.5.tar.gz coleweight-1.5.5.tar.bz2 coleweight-1.5.5.zip | |
1.5.4 Fixed bugs (changelog in discord)v1.5.5
Diffstat (limited to 'util/apiNew.js')
| -rw-r--r-- | util/apiNew.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/util/apiNew.js b/util/apiNew.js new file mode 100644 index 0000000..dd03c5f --- /dev/null +++ b/util/apiNew.js @@ -0,0 +1,23 @@ +import constants from "../util/constants" +import axios from "../../axios" +const PREFIX = constants.PREFIX + +register("chat", (key) => { + axios.get(`https://api.hypixel.net/key?key=${key}`) + .then(res => { + if(res.data.success == true) + { + constants.data.api_key = key + constants.data.save() + ChatLib.chat(`${PREFIX}&aSuccsessfully set api key!`) + } + else + ChatLib.chat(`${PREFIX}&eKey is not valid!`) + }) + .catch(err => { + ChatLib.chat(`${PREFIX}&eKey is not valid!`) + }) + ChatLib.chat(ChatLib.getCenteredText(`${PREFIX}&aApi Key Successfully Set!`)) +}).setCriteria(/Your new API key is (.+)/) + +export default ""
\ No newline at end of file |
