3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-15 05:41:51 +00:00

!reminders uses timestamps

This commit is contained in:
srqc 2023-04-01 19:34:24 -04:00 committed by GitHub
parent d2aff3979e
commit 2595cfb173
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -29,7 +29,12 @@ export const RemindersCmd = remindersCmd({
const prettyRemindAt = timeAndDate
.inGuildTz(moment.utc(reminder.remind_at, DBDateFormat))
.format(timeAndDate.getDateFormat("pretty_datetime"));
return `\`${paddedNum}.\` \`${prettyRemindAt} (${result})\` ${reminder.body}`;
const remindIn =
diff > 0
? `in ${humanizeDuration(diff, { largest: 2, round: true })}`
: `${humanizeDuration(Math.abs(diff), { largest: 2, round: true })} ago`;
const timestamp = `<t:${target.unix()}:f>`;
return `\`${paddedNum}.\` ${timestamp} (${remindIn}): ${reminder.body}`;
});
createChunkedMessage(msg.channel, lines.join("\n"));