Skip to content

Commit 32ad79a

Browse files
committed
comment out some logging because logs were getting spammed
1 parent e8373ed commit 32ad79a

1 file changed

Lines changed: 13 additions & 12 deletions

File tree

events/notifications/bumpReminder.js

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ const fs = require("fs");
33
const DISBOARD_ID = "302050872383242240";
44
const BUMP_COOLDOWN = 2 * 60 * 60 * 1000; // 2 hours in ms
55
const CONFIG_FILE = "./bump-config.json";
6+
const logger = require("../../utils/logger");
67

78
// In-memory store: guildId -> { channelId, roleId, timer }
89
const guildConfig = new Map();
@@ -16,9 +17,9 @@ function loadConfig() {
1617
for (const [guildId, config] of Object.entries(data)) {
1718
guildConfig.set(guildId, { ...config, timer: null });
1819
}
19-
console.log(`[BumpReminder] Loaded config for ${guildConfig.size} guild(s).`);
20+
logger.info(`[BumpReminder] Loaded config for ${guildConfig.size} guild(s).`);
2021
} catch (err) {
21-
console.error("[BumpReminder] Failed to load config:", err);
22+
logger.error("[BumpReminder] Failed to load config:", err);
2223
}
2324
}
2425

@@ -58,11 +59,11 @@ async function handleMessage(message) {
5859

5960
// DEBUG: log every message from DISBOARD so we can see what it sends
6061
if (message.author.id === DISBOARD_ID) {
61-
console.log("[BumpReminder] DISBOARD message detected:");
62-
console.log(" Guild:", message.guild?.id ?? "DM");
63-
console.log(" Embeds:", message.embeds.length);
62+
// console.log("[BumpReminder] DISBOARD message detected:");
63+
// console.log(" Guild:", message.guild?.id ?? "DM");
64+
// console.log(" Embeds:", message.embeds.length);
6465
if (message.embeds[0]) {
65-
console.log(" Embed description:", message.embeds[0].description);
66+
// console.log(" Embed description:", message.embeds[0].description);
6667
}
6768
}
6869

@@ -73,16 +74,16 @@ async function handleMessage(message) {
7374
const embed = message.embeds[0];
7475
const isBumpSuccess = embed.description?.includes("Bump done");
7576

76-
console.log("[BumpReminder] isBumpSuccess:", isBumpSuccess);
77+
// console.log("[BumpReminder] isBumpSuccess:", isBumpSuccess);
7778

7879
if (!isBumpSuccess) return;
7980

8081
const config = guildConfig.get(message.guild.id);
8182

82-
console.log("[BumpReminder] Guild config:", config);
83+
// console.log("[BumpReminder] Guild config:", config);
8384

8485
if (!config) {
85-
console.log(
86+
logger.warn(
8687
"[BumpReminder] No config found for guild",
8788
message.guild.id,
8889
"— run /setup-bump set first."
@@ -96,7 +97,7 @@ async function handleMessage(message) {
9697
// Send confirmation
9798
const channel = message.guild.channels.cache.get(config.channelId);
9899

99-
console.log("[BumpReminder] Sending to channel:", config.channelId, "— found:", !!channel);
100+
// logger.info("[BumpReminder] Sending to channel:", config.channelId, "— found:", !!channel);
100101

101102
if (!channel) return;
102103

@@ -111,7 +112,7 @@ async function handleMessage(message) {
111112
},
112113
],
113114
})
114-
.catch((err) => console.error("[BumpReminder] Failed to send confirmation:", err));
115+
.catch((err) => logger.error("[BumpReminder] Failed to send confirmation:", err));
115116

116117
// Schedule reminder
117118
config.timer = setTimeout(async () => {
@@ -128,7 +129,7 @@ async function handleMessage(message) {
128129
},
129130
],
130131
})
131-
.catch((err) => console.error("[BumpReminder] Failed to send reminder:", err));
132+
.catch((err) => logger.error("[BumpReminder] Failed to send reminder:", err));
132133

133134
config.timer = null;
134135
}, BUMP_COOLDOWN);

0 commit comments

Comments
 (0)