mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-25 10:25:01 +00:00
Merge c85d87209c
into 3e2862306d
This commit is contained in:
commit
2561962838
2 changed files with 7 additions and 5 deletions
|
@ -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>`,
|
||||
);
|
||||
},
|
||||
});
|
||||
|
|
|
@ -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"));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue