mirror of
https://github.com/TeamOctolings/Octobot.git
synced 2025-05-01 19:49:55 +03:00
Fixing bugs and other problems
This commit is contained in:
parent
905cf5619c
commit
f1bd54d6f6
16 changed files with 255 additions and 144 deletions
|
@ -10,7 +10,7 @@ public sealed class UnmuteCommand : ICommand {
|
|||
public async Task RunAsync(CommandProcessor cmd, string[] args, string[] cleanArgs) {
|
||||
if (!cmd.HasPermission(GuildPermission.ModerateMembers)) return;
|
||||
|
||||
var toUnmute = cmd.GetMember(args, cleanArgs, 0, "ToUnmute");
|
||||
var toUnmute = cmd.GetMember(args, 0, "ToUnmute");
|
||||
if (toUnmute is null) return;
|
||||
var reason = cmd.GetRemaining(args, 1, "UnmuteReason");
|
||||
if (reason is not null && cmd.CanInteractWith(toUnmute, "Unmute"))
|
||||
|
@ -27,6 +27,8 @@ public sealed class UnmuteCommand : ICommand {
|
|||
return;
|
||||
}
|
||||
|
||||
cmd.ConfigWriteScheduled = true;
|
||||
|
||||
var feedback = string.Format(Messages.FeedbackMemberUnmuted, toUnmute.Mention, Utils.Wrap(reason));
|
||||
cmd.Reply(feedback, ReplyEmojis.Unmuted);
|
||||
cmd.Audit(feedback);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue