dev: Added argumentoutofrange static methods, no functional change

This commit is contained in:
Kwoth
2024-05-13 14:50:55 +00:00
parent 7b2ce072ee
commit 52438f45e1
24 changed files with 69 additions and 116 deletions

View File

@@ -22,8 +22,7 @@ public class PruneService : INService
ArgumentNullException.ThrowIfNull(channel, nameof(channel));
var originalAmount = amount;
if (amount <= 0)
throw new ArgumentOutOfRangeException(nameof(amount));
ArgumentOutOfRangeException.ThrowIfNegativeOrZero(amount);
using var cancelSource = new CancellationTokenSource();
if (!_pruningGuilds.TryAdd(channel.GuildId, cancelSource))