Skip to content

Commit

Permalink
fix: Notices not updating if the timestamp on them was farther into t…
Browse files Browse the repository at this point in the history
…he future than the current.
  • Loading branch information
vxern committed Jan 1, 2023
1 parent df4b96c commit 9dcd356
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/services/notices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ async function registerPastNotice([client, bot]: [Client, Bot], guild: Guild, ty
const latestNotice = notices.splice(0, 1).at(0)!;
const timestamp = extractTimestamp(latestNotice)!;

if (timestamp < lastUpdates[type].getTime() / 1000) {
if (timestamp !== lastUpdates[type].getTime() / 1000) {
client.log.info(`Found outdated notice in ${type} channel on ${guild.name}. Recreating...`);

deleteMessage(bot, latestNotice.channelId, latestNotice.id);
Expand Down

0 comments on commit 9dcd356

Please sign in to comment.