Spaces:
Runtime error
Runtime error
Update index.js
Browse files
index.js
CHANGED
|
@@ -344,8 +344,8 @@ client.once('ready', async () => {
|
|
| 344 |
const config = storage.data.config[match.guildId] || {};
|
| 345 |
if (config.remindersEnabled && !match.reminded) {
|
| 346 |
const leadMs = (config.remindersLead || 30) * 60000;
|
| 347 |
-
// Remind if we are within the window
|
| 348 |
-
if (now >= match.timestamp - leadMs && now < match.timestamp) {
|
| 349 |
match.reminded = true;
|
| 350 |
changed = true;
|
| 351 |
const lineup = getGuildLineup(match.guildId);
|
|
|
|
| 344 |
const config = storage.data.config[match.guildId] || {};
|
| 345 |
if (config.remindersEnabled && !match.reminded) {
|
| 346 |
const leadMs = (config.remindersLead || 30) * 60000;
|
| 347 |
+
// Remind if we are within the window (with 30s buffer for loop timing)
|
| 348 |
+
if (now >= match.timestamp - leadMs - 30000 && now < match.timestamp) {
|
| 349 |
match.reminded = true;
|
| 350 |
changed = true;
|
| 351 |
const lineup = getGuildLineup(match.guildId);
|