1
0
Fork 1
mirror of https://github.com/TeamOctolings/Octobot.git synced 2025-05-03 20:49:54 +03:00

Edit reminder message & add "!pardon" alias for "!unban" (#25)

This commit is contained in:
Macintxsh 2023-02-14 17:44:29 +03:00 committed by GitHub
parent f2e337153f
commit 30a4a94f1b
Signed by: GitHub
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View file

@ -170,10 +170,11 @@ public static class Boyfriend {
if (now < reminder.RemindAt) continue;
var channel = guild.GetTextChannel(reminder.ReminderChannel);
var toSend = $"{ReplyEmojis.Reminder} {user.Mention} {Utils.Wrap(reminder.ReminderText)}";
if (channel is not null)
await channel.SendMessageAsync($"<@{mData.Id}> {Utils.Wrap(reminder.ReminderText)}");
await channel.SendMessageAsync(toSend);
else
await Utils.SendDirectMessage(user, reminder.ReminderText);
await Utils.SendDirectMessage(user, toSend);
mData.Reminders.RemoveAt(i);
saveData = true;