why do i do it like that. what if i dont.
This commit is contained in:
@@ -1,9 +1,9 @@
|
|||||||
module.exports = async (client, torn, config, state) => {
|
module.exports = async (client, torn, config) => {
|
||||||
console.debug("Task: Executing noItemOC");
|
console.debug("Task: Executing noItemOC");
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const channel = client.channels.resolve(config.channels.ocAlert);
|
const channel = client.channels.resolve(config.channels.ocAlert);
|
||||||
const now = new Date();
|
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`);
|
const data = await torn.api(`https://api.torn.com/v2/faction/crimes?cat=planning&sort=DESC`);
|
||||||
let itemsneeded = 0;
|
let itemsneeded = 0;
|
||||||
let message = "OCs with unavailable items:\n";
|
let message = "OCs with unavailable items:\n";
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
module.exports = async (client, torn, config, state) => {
|
module.exports = async (client, torn, config) => {
|
||||||
console.debug("Task: Executing unavailableOC");
|
console.debug("Task: Executing unavailableOC");
|
||||||
const { EmbedBuilder } = require('discord.js');
|
const { EmbedBuilder } = require('discord.js');
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const channel = client.channels.resolve(config.channels.ocAlert);
|
const channel = client.channels.resolve(config.channels.ocAlert);
|
||||||
state = require('../state.json');
|
const state = require('../state.json');
|
||||||
|
|
||||||
let factionMaxCrime = 0;
|
let factionMaxCrime = 0;
|
||||||
const crimeLevel = (await torn.faction.upgrades()).core.upgrades.find(upgrade => upgrade.name.startsWith("Organized Crimes")).level
|
const crimeLevel = (await torn.faction.upgrades()).core.upgrades.find(upgrade => upgrade.name.startsWith("Organized Crimes")).level
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
module.exports = async (client, torn, config, state) => {
|
module.exports = async (client, torn, config) => {
|
||||||
console.debug("Task: Executing unpaidOC");
|
console.debug("Task: Executing unpaidOC");
|
||||||
const { EmbedBuilder } = require('discord.js');
|
const { EmbedBuilder } = require('discord.js');
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const channel = client.channels.resolve(config.channels.ocAlert);
|
const channel = client.channels.resolve(config.channels.ocAlert);
|
||||||
const now = new Date();
|
const now = new Date();
|
||||||
state = require('../state.json');
|
const state = require('../state.json');
|
||||||
let embeds = [];
|
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`);
|
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) {
|
for (const crime of data.crimes) {
|
||||||
|
|||||||
Reference in New Issue
Block a user