Skip to content

Commit 1c8df47

Browse files
committed
patch up some stuff
1 parent 86b66f2 commit 1c8df47

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

events/notifications/bumpReminder.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ function getConfig(guildId) {
5454
// ─── Message Handler ─────────────────────────────────────────────────────────
5555

5656
async function handleMessage(message) {
57-
// Only care about DISBOARD messages in guilds
57+
// Guard against system/webhook messages that have no author or guild
58+
if (!message.author) return;
5859
if (message.author.id !== DISBOARD_ID) return;
5960
if (!message.guild) return;
6061
if (!message.embeds.length) return;

index.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,18 +171,17 @@ client.helpers.InteractionHandler = InteractionHandler;
171171
(async () => {
172172
try {
173173
await Promise.all([connectToMongo(), loadEvents(client), loadComponents(client)]);
174+
174175
const token = process.env.DISCORD_TOKEN;
175176
if (!token) {
176177
logger.error("DISCORD_TOKEN environment variable is not set. Aborting startup.");
177178
process.exit(1);
178179
}
180+
179181
await client.login(token);
180182
logger.info(
181183
`Logged in as ${client.user?.tag ?? "unknown user"}, please wait until terminal says Java Lava Helper is ready.`
182184
);
183-
184-
try {
185-
} catch (_) {}
186185
} catch (error) {
187186
logger.error("An error occurred during startup/login", error);
188187
}

0 commit comments

Comments
 (0)