mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-07-06 18:47:20 +00:00
refactor: remove Timeout imports and constructor syntax sugar
This commit is contained in:
parent
62da0a6e34
commit
f607ad424b
20 changed files with 32 additions and 42 deletions
|
@ -5,12 +5,11 @@ import { lazyMemoize, MINUTES } from "../../utils.js";
|
|||
import { VCAlert } from "../entities/VCAlert.js";
|
||||
import { emitGuildEvent, hasGuildEventListener } from "../GuildEvents.js";
|
||||
import { VCAlerts } from "../VCAlerts.js";
|
||||
import Timeout = NodeJS.Timeout;
|
||||
|
||||
const LOOP_INTERVAL = 15 * MINUTES;
|
||||
const MAX_TRIES_PER_SERVER = 3;
|
||||
const getVCAlertsRepository = lazyMemoize(() => new VCAlerts());
|
||||
const timeouts = new Map<number, Timeout>();
|
||||
const timeouts = new Map<number, NodeJS.Timeout>();
|
||||
|
||||
function broadcastExpiredVCAlert(alert: VCAlert, tries = 0) {
|
||||
console.log(`[EXPIRING VCALERTS LOOP] Broadcasting expired vcalert: ${alert.guild_id}/${alert.user_id}`);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue