From 87ae29ccc68a619aed7fe6cb5b7e44d27ac34e4d Mon Sep 17 00:00:00 2001 From: Skillet Date: Mon, 17 Apr 2023 19:24:32 -0400 Subject: [PATCH] fixes2 --- mapvote.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mapvote.js b/mapvote.js index 2e5aa04..b66f944 100644 --- a/mapvote.js +++ b/mapvote.js @@ -7,6 +7,7 @@ import axios from "axios" import Layer from '../layers/layer.js'; import fs from 'fs' import process from 'process' +import Logger from "core/logger"; export default class MapVote extends DiscordBasePlugin { static get description() { @@ -1104,6 +1105,11 @@ export default class MapVote extends DiscordBasePlugin { return; } + Logger.verbose('Layers', 1, 'Pulling layers...'); + const response = await axios.post( // Change get to post for mod support + 'http://hub.afocommunity.com/api/layers.json', [0, 1959152751] + ); + for (const layer of response.data.Maps) { if (!Layers.layers.find((e) => e.layerid === layer.rawName)){ const hellolayer = new Layer(layer);