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;

View file

@ -3,7 +3,7 @@
namespace Boyfriend.Commands;
public sealed class UnbanCommand : ICommand {
public string[] Aliases { get; } = { "unban", "разбан" };
public string[] Aliases { get; } = { "unban", "pardon", "разбан" };
public async Task RunAsync(CommandProcessor cmd, string[] args, string[] cleanArgs) {
if (!cmd.HasPermission(GuildPermission.BanMembers)) return;