diff options
author | Ninjune x <enderknight537@gmail.com> | 2022-11-17 16:56:06 -0600 |
---|---|---|
committer | Ninjune x <enderknight537@gmail.com> | 2022-11-17 16:56:06 -0600 |
commit | fb63481d2c5b7b468df6c5ebdee30178bc9155f5 (patch) | |
tree | 3ec467f8acb9594c7b5547426a3b640856dc7e37 /chat/apiNew.js | |
parent | 9085ac77ce364572b14f132b64ead5cde2194607 (diff) | |
download | coleweight-fb63481d2c5b7b468df6c5ebdee30178bc9155f5.tar.gz coleweight-fb63481d2c5b7b468df6c5ebdee30178bc9155f5.tar.bz2 coleweight-fb63481d2c5b7b468df6c5ebdee30178bc9155f5.zip |
1.6.0 Changelog in releasesv1.6.1
Diffstat (limited to 'chat/apiNew.js')
-rw-r--r-- | chat/apiNew.js | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/chat/apiNew.js b/chat/apiNew.js new file mode 100644 index 0000000..eaab375 --- /dev/null +++ b/chat/apiNew.js @@ -0,0 +1,24 @@ +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 |