1
0
Fork 1
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:
Octol1ttle 2023-01-17 22:34:42 +05:00
parent 905cf5619c
commit f1bd54d6f6
Signed by: Octol1ttle
GPG key ID: B77C34313AEE1FFF
16 changed files with 255 additions and 144 deletions

View file

@ -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);