chore: merge branch dev to main #200

Merged
Anri merged 19 commits from dev into main 2024-11-02 17:36:38 +01:00
Showing only changes of commit 399b3285df - Show all commits

View file

@ -199,14 +199,18 @@ const sendReminderAux = (client: Client, info: infoReminder, option: OptionRemin
// Channel // Channel
client.channels.fetch(info.channelId!).then((channel) => { client.channels.fetch(info.channelId!).then((channel) => {
if (channel?.isSendable()) { if (channel?.isSendable()) {
let content = `<@${info.userId}>`; const author_mention = `<@${info.userId}>`;
let content = author_mention;
embed.setFooter({ embed.setFooter({
text: `${loc.get("c_reminder17")} ${timeDeltaToString(info.createdAt)}`, text: `${loc.get("c_reminder17")} ${timeDeltaToString(info.createdAt)}`,
}); });
// Mention everybody if needed // Mention everybody if needed
if (option === OptionReminder.Mention) { if (option === OptionReminder.Mention) {
(info.message?.match(/<@\d+>/g) ?? []).forEach((mention) => { [...new Set(info.message?.match(/<@\d+>/g) ?? [])]
.filter((mention) => mention !== author_mention)
.forEach((mention: string) => {
content += " " + mention; content += " " + mention;
}); });
} }