mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-22 05:04:58 +05:00
Проверка не работает
This commit is contained in:
parent
fe38bc8038
commit
12855f99e9
1 changed files with 1 additions and 1 deletions
|
@ -5,7 +5,7 @@ const fetch = require("node-fetch");
|
||||||
|
|
||||||
const fetchMee6 = async args => {
|
const fetchMee6 = async args => {
|
||||||
const response = await fetch(`https://mee6.xyz/api/plugins/levels/leaderboard/${args}`).then(res => res.json());
|
const response = await fetch(`https://mee6.xyz/api/plugins/levels/leaderboard/${args}`).then(res => res.json());
|
||||||
if (response.statusCode !== 200) {
|
if (response.statusCode) {
|
||||||
if (response.error && response.error.message) throw new Error(`${response.statusCode}: ${response.error.message}`);
|
if (response.error && response.error.message) throw new Error(`${response.statusCode}: ${response.error.message}`);
|
||||||
else throw new Error(`${response.statusCode}: ${response.statusMessage}`);
|
else throw new Error(`${response.statusCode}: ${response.statusMessage}`);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue