diff --git a/src/Models/Moderation.cs b/src/Models/Moderation.cs index 89738d5..586e773 100644 --- a/src/Models/Moderation.cs +++ b/src/Models/Moderation.cs @@ -35,6 +35,9 @@ public class BanRequest /// When true, the user will be automatically banned from all future channels created by the user who issued the ban public bool? BanFromFutureChannels { get; set; } + + /// When true, all reactions by the banned user on other users' messages will be deleted + public bool? DeleteReactions { get; set; } } public class ShadowBanRequest : BanRequest diff --git a/tests/UserClientTests.cs b/tests/UserClientTests.cs index 4f23f70..fd8f45d 100644 --- a/tests/UserClientTests.cs +++ b/tests/UserClientTests.cs @@ -280,6 +280,22 @@ await _userClient.BanAsync(new BanRequest await sendMessageCall.Should().ThrowAsync(); } + [Test] + public async Task TestBanUserWithDeleteReactionsAsync() + { + // Reaction deletion happens asynchronously, so we only verify the API accepts the parameter + Func banCall = () => _userClient.BanAsync(new BanRequest + { + Type = _channel.Type, + Id = _channel.Id, + Reason = "reason", + TargetUserId = _user2.Id, + UserId = _user1.Id, + DeleteReactions = true, + }); + await banCall.Should().NotThrowAsync(); + } + [Test] public async Task TestUnbanUserAsync() {