fixed recently played maps

This commit is contained in:
Davide Fantino 2022-11-07 12:58:39 +01:00
parent 7422a4f06d
commit 07cf40008a

View File

@ -490,7 +490,7 @@ export default class MapVote extends DiscordBasePlugin {
const sanitizedLayers = Layers.layers.filter((l) => l.layerid && l.map);
const maxOptions = this.options.showRerollOption ? 5 : 6;
if (!cmdLayers || cmdLayers.length == 0) {
const recentlyPlayedMaps = this.objArrToValArr(this.server.layerHistory.splice(0, this.options.numberRecentMapsToExlude), "layer", "map", "name");
const recentlyPlayedMaps = this.objArrToValArr(this.server.layerHistory.slice(0, this.options.numberRecentMapsToExlude), "layer", "map", "name");
this.verbose(1, "Recently played maps: " + recentlyPlayedMaps.join(', '))
const all_layers = sanitizedLayers.filter((l) =>