3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-25 10:25:01 +00:00
This commit is contained in:
srqc 2023-04-04 15:31:55 -04:00 committed by GitHub
commit 2561962838
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 5 deletions

View file

@ -63,14 +63,11 @@ export const RemindCmd = remindersCmd({
const msUntilReminder = reminderTime.diff(now);
const timeUntilReminder = humanizeDuration(msUntilReminder, { largest: 2, round: true });
const prettyReminderTime = (await timeAndDate.inMemberTz(msg.author.id, reminderTime)).format(
pluginData.getPlugin(TimeAndDatePlugin).getDateFormat("pretty_datetime"),
);
sendSuccessMessage(
pluginData,
msg.channel,
`I will remind you in **${timeUntilReminder}** at **${prettyReminderTime}**`,
`I will remind you in **${timeUntilReminder}** at <t:${reminderTime.unix()}:f>`,
);
},
});

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"));