From 1ab5a640a9d272058f33fa33a6be2e8bbb70d78e Mon Sep 17 00:00:00 2001 From: Macintosh II <95250141+mctaylors@users.noreply.github.com> Date: Wed, 27 Sep 2023 12:47:43 +0300 Subject: [PATCH] Set MemberData.BannedUntil to null in /unban (#114) Please keep `MemberData` clean of unnecessary values. --------- Signed-off-by: Macintosh II <95250141+mctaylors@users.noreply.github.com> --- src/Commands/BanCommandGroup.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Commands/BanCommandGroup.cs b/src/Commands/BanCommandGroup.cs index 6d662c6..25cd7e8 100644 --- a/src/Commands/BanCommandGroup.cs +++ b/src/Commands/BanCommandGroup.cs @@ -264,6 +264,8 @@ public class BanCommandGroup : CommandGroup return Result.FromError(unbanResult.Error); } + data.GetOrCreateMemberData(target.ID).BannedUntil = null; + var embed = new EmbedBuilder().WithSmallTitle( string.Format(Messages.UserUnbanned, target.GetTag()), target) .WithColour(ColorsList.Green).Build();