debug collect income
This commit is contained in:
3 files changed
+3
-4
No files matched your search
@@ -65,6 +65,8 @@ module.exports = {
|
|||||||
const success = addUser(banking.guilds, GuildDB.serverID, interaction.member.user.id, client, GuildDB.startingBalance);
|
const success = addUser(banking.guilds, GuildDB.serverID, interaction.member.user.id, client, GuildDB.startingBalance);
|
||||||
if (!success) return client.sendInternalError(interaction, 'Failed to add bank');
|
if (!success) return client.sendInternalError(interaction, 'Failed to add bank');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!client.exists(banking.guilds[GuildDB.serverID].lastIncome)) banking.guilds[GuildDB.serverID].lastIncome: new Date('2000-01-01T00:00:00');
|
||||||
|
|
||||||
let now = new Date();
|
let now = new Date();
|
||||||
let diff = (now - banking.guilds[GuildDB.serverID].lastIncome) / 1000;
|
let diff = (now - banking.guilds[GuildDB.serverID].lastIncome) / 1000;
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "dayz-armbands",
|
"name": "dayz-armbands",
|
||||||
"version": "6.12.2",
|
"version": "6.12.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": {
|
||||||
|
|||||||
@@ -102,9 +102,6 @@ module.exports = {
|
|||||||
if (alarm.disabled || !alarm.rules.includes('ban_on_kill')) continue; // ignore if alarm is disabled or not ban on kill;
|
if (alarm.disabled || !alarm.rules.includes('ban_on_kill')) continue; // ignore if alarm is disabled or not ban on kill;
|
||||||
if (alarm.ignoredPlayers.includes(data.killerID)) continue;
|
if (alarm.ignoredPlayers.includes(data.killerID)) continue;
|
||||||
|
|
||||||
console.log(data);
|
|
||||||
console.log(alarm);
|
|
||||||
|
|
||||||
let diff = [Math.round(alarm.origin[0] - data.killerPOS[0]), Math.round(alarm.origin[1] - data.killerPOS[1])];
|
let diff = [Math.round(alarm.origin[0] - data.killerPOS[0]), Math.round(alarm.origin[1] - data.killerPOS[1])];
|
||||||
let distance = Math.sqrt(Math.pow(diff[0], 2) + Math.pow(diff[1], 2)).toFixed(2)
|
let distance = Math.sqrt(Math.pow(diff[0], 2) + Math.pow(diff[1], 2)).toFixed(2)
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user