mirror of
https://github.com/AsgardEternal/squad-js-map-vote.git
synced 2025-01-24 00:13:52 -06:00
fixes2
This commit is contained in:
parent
11878c368a
commit
87ae29ccc6
@ -7,6 +7,7 @@ import axios from "axios"
|
|||||||
import Layer from '../layers/layer.js';
|
import Layer from '../layers/layer.js';
|
||||||
import fs from 'fs'
|
import fs from 'fs'
|
||||||
import process from 'process'
|
import process from 'process'
|
||||||
|
import Logger from "core/logger";
|
||||||
|
|
||||||
export default class MapVote extends DiscordBasePlugin {
|
export default class MapVote extends DiscordBasePlugin {
|
||||||
static get description() {
|
static get description() {
|
||||||
@ -1104,6 +1105,11 @@ export default class MapVote extends DiscordBasePlugin {
|
|||||||
return;
|
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) {
|
for (const layer of response.data.Maps) {
|
||||||
if (!Layers.layers.find((e) => e.layerid === layer.rawName)){
|
if (!Layers.layers.find((e) => e.layerid === layer.rawName)){
|
||||||
const hellolayer = new Layer(layer);
|
const hellolayer = new Layer(layer);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user