mirror of
https://github.com/qwerinope/qweribot.git
synced 2025-12-18 23:01:38 +01:00
no more logging about perma banned users
This commit is contained in:
@@ -35,8 +35,11 @@ streamerUsers.forEach(async id => await Promise.all([addAdmin(id), addInvuln(id)
|
||||
const banned = await streamerApi.moderation.getBannedUsers(streamerId).then(a => a.data);
|
||||
banned.forEach(async ban => {
|
||||
await redis.set(`user:${ban.userId}:timeout`, '1');
|
||||
if (ban.expiryDate) redis.expire(`user:${ban.userId}:timeout`, Math.floor((ban.expiryDate.getTime() - Date.now()) / 1000) + 1);
|
||||
logger.info(`Set the timeout/ban of ${ban.userDisplayName} in the Redis/Valkey database.`);
|
||||
const banlength = ban.expiryDate;
|
||||
if (banlength) {
|
||||
redis.expire(`user:${ban.userId}:timeout`, Math.floor((ban.expiryDate.getTime() - Date.now()) / 1000) + 1);
|
||||
logger.info(`Set the timeout of ${ban.userDisplayName} in the Redis/Valkey database.`);
|
||||
};
|
||||
});
|
||||
|
||||
const mods = await streamerApi.moderation.getModerators(streamerId).then(a => a.data);
|
||||
|
||||
Reference in New Issue
Block a user