1
0
Fork 1
mirror of https://github.com/TeamOctolings/Octobot.git synced 2025-01-31 09:09:00 +03:00

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>
This commit is contained in:
Macintxsh 2023-09-27 12:47:43 +03:00 committed by GitHub
parent 3a3865ba3d
commit 1ab5a640a9
Signed by: GitHub
GPG key ID: 4AEE18F83AFDEB23

View file

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