From f1c3285905c7a90ea92f5c651af5799f87b7d9fc Mon Sep 17 00:00:00 2001 From: Cesium Date: Mon, 10 Nov 2025 18:11:24 -0500 Subject: [PATCH] why do i do it like that. what if i dont. --- tasks/noItemOC.js | 4 ++-- tasks/unavailableOC.js | 4 ++-- tasks/unpaidOC.js | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tasks/noItemOC.js b/tasks/noItemOC.js index 6e355e6..6639e8e 100644 --- a/tasks/noItemOC.js +++ b/tasks/noItemOC.js @@ -1,9 +1,9 @@ -module.exports = async (client, torn, config, state) => { +module.exports = async (client, torn, config) => { console.debug("Task: Executing noItemOC"); const fs = require('fs'); const channel = client.channels.resolve(config.channels.ocAlert); const now = new Date(); - state = require('../state.json'); + const state = require('../state.json'); const data = await torn.api(`https://api.torn.com/v2/faction/crimes?cat=planning&sort=DESC`); let itemsneeded = 0; let message = "OCs with unavailable items:\n"; diff --git a/tasks/unavailableOC.js b/tasks/unavailableOC.js index a73b488..856ca00 100644 --- a/tasks/unavailableOC.js +++ b/tasks/unavailableOC.js @@ -1,9 +1,9 @@ -module.exports = async (client, torn, config, state) => { +module.exports = async (client, torn, config) => { console.debug("Task: Executing unavailableOC"); const { EmbedBuilder } = require('discord.js'); const fs = require('fs'); const channel = client.channels.resolve(config.channels.ocAlert); - state = require('../state.json'); + const state = require('../state.json'); let factionMaxCrime = 0; const crimeLevel = (await torn.faction.upgrades()).core.upgrades.find(upgrade => upgrade.name.startsWith("Organized Crimes")).level diff --git a/tasks/unpaidOC.js b/tasks/unpaidOC.js index 0e5d8a9..754c513 100644 --- a/tasks/unpaidOC.js +++ b/tasks/unpaidOC.js @@ -1,10 +1,10 @@ -module.exports = async (client, torn, config, state) => { +module.exports = async (client, torn, config) => { console.debug("Task: Executing unpaidOC"); const { EmbedBuilder } = require('discord.js'); const fs = require('fs'); const channel = client.channels.resolve(config.channels.ocAlert); const now = new Date(); - state = require('../state.json'); + const state = require('../state.json'); let embeds = []; const data = await torn.api(`https://api.torn.com/v2/faction/crimes?cat=successful&from=${now.getTime() / 1000 - 7 * 24 * 60 * 60}&sort=DESC`); for (const crime of data.crimes) {