mirror of
https://github.com/TeamOctolings/Octobot.git
synced 2025-01-31 09:09:00 +03:00
Edit reminder message & add "!pardon" alias for "!unban" (#25)
This commit is contained in:
parent
f2e337153f
commit
30a4a94f1b
2 changed files with 4 additions and 3 deletions
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue