aboutsummaryrefslogtreecommitdiff
path: root/chat/apiNew.js
diff options
context:
space:
mode:
authorNinjune x <enderknight537@gmail.com>2023-01-08 02:12:14 -0600
committerNinjune x <enderknight537@gmail.com>2023-01-08 02:12:14 -0600
commit688e13930681bca7881d19468745f7067e9bc5c2 (patch)
tree9e95e59359dd2ae6e2e7761666b99a191bb62a1f /chat/apiNew.js
parent1891ada92ab1911cfaaa7ad0e72c85573f4fcbb6 (diff)
downloadcoleweight-688e13930681bca7881d19468745f7067e9bc5c2.tar.gz
coleweight-688e13930681bca7881d19468745f7067e9bc5c2.tar.bz2
coleweight-688e13930681bca7881d19468745f7067e9bc5c2.zip
v1.8.6future
Diffstat (limited to 'chat/apiNew.js')
-rw-r--r--chat/apiNew.js12
1 files changed, 5 insertions, 7 deletions
diff --git a/chat/apiNew.js b/chat/apiNew.js
index eaab375..36025e3 100644
--- a/chat/apiNew.js
+++ b/chat/apiNew.js
@@ -7,18 +7,16 @@ 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!`)
+ ChatLib.chat(`${PREFIX}&eKey might not be valid!`)
+ constants.data.api_key = key
+ constants.data.save()
})
.catch(err => {
- ChatLib.chat(`${PREFIX}&eKey is not valid!`)
+ ChatLib.chat(`${PREFIX}&eKey is not valid! if this is a mistake report: ${err}`)
})
- ChatLib.chat(ChatLib.getCenteredText(`${PREFIX}&aApi Key Successfully Set!`))
+ ChatLib.chat(`${PREFIX}&aApi Key Successfully Set!`)
}).setCriteria(/Your new API key is (.+)/)
export default "" \ No newline at end of file