check kill in no kill zone

This commit is contained in:
SowinskiBraeden committed 2023-04-04 15:31:44 -07:00
1 parent e909500f13
commit b723341578
2 files changed
+4 -1

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "dayz-armbands", "name": "dayz-armbands",
"version": "6.3.2", "version": "6.3.3",
"description": "A General Purpose Discord Bot for DayZ Servers.", "description": "A General Purpose Discord Bot for DayZ Servers.",
"main": "index.js", "main": "index.js",
"nodemonConfig": { "nodemonConfig": {
+3
View File
@@ -1,5 +1,6 @@
const { EmbedBuilder } = require('discord.js'); const { EmbedBuilder } = require('discord.js');
const { User, addUser } = require('../structures/user'); const { User, addUser } = require('../structures/user');
const { KillInAlarm } = require('./AlarmsHandler');
module.exports = { module.exports = {
@@ -27,6 +28,8 @@ module.exports = {
distance: data[12] distance: data[12]
}; };
KillInAlarm(client, guildId, info); // check if kill happened in a no kill zone
if (!client.exists(info.victim) || !client.exists(info.victimID) || !client.exists(info.killer) || !client.exists(info.killerID)) return stats; if (!client.exists(info.victim) || !client.exists(info.victimID) || !client.exists(info.killer) || !client.exists(info.killerID)) return stats;
let killerStat = stats.find(stat => stat.playerID == info.killerID) let killerStat = stats.find(stat => stat.playerID == info.killerID)