add events to database, remove kleur dependency/slightly nicer logging, update twurple

This commit is contained in:
2026-01-29 21:06:01 +01:00
parent f3c6f6a6b3
commit b88a93a6cf
31 changed files with 478 additions and 210 deletions

View File

@@ -161,7 +161,7 @@ for (const ban of banned) {
Math.floor((ban.expiryDate.getTime() - Date.now()) / 1000) + 1,
);
logger.info(
`Set the timeout of ${ban.userDisplayName} in the Redis/Valkey database.`,
`Set the timeout of \x1b[3;4;1;95m${ban.userDisplayName}\x1b[0;97m in the Redis/Valkey database.`,
);
}
}
@@ -170,7 +170,7 @@ const mods = await api.moderation.getModerators(streamerId).then((a) => a.data);
for (const mod of mods) {
await redis.set(`user:${mod.userId}:mod`, "1");
logger.info(
`Set the mod status of ${mod.userDisplayName} in the Redis/Valkey database.`,
`Set the mod status of \x1b[3;4;1;95m${mod.userDisplayName}\x1b[0;97m in the Redis/Valkey database.`,
);
}
@@ -185,7 +185,7 @@ for (const remod of bannedmods) {
duration = Math.floor((durationdata * 1000 - Date.now()) / 1000);
remodMod(target!, duration);
logger.info(
`Set the remod timer for ${target?.displayName} to ${duration} seconds.`,
`Set the remod timer for \x1b[3;4;1;95m${target?.displayName}\x1b[0;97m to \x1b[3;4;1;95m${duration}\x1b[0;97m seconds.`,
);
}