diff --git a/src/Discord.Net.Rest/Entities/Channels/ChannelHelper.cs b/src/Discord.Net.Rest/Entities/Channels/ChannelHelper.cs index 85b521697..4917f75f9 100644 --- a/src/Discord.Net.Rest/Entities/Channels/ChannelHelper.cs +++ b/src/Discord.Net.Rest/Entities/Channels/ChannelHelper.cs @@ -77,7 +77,8 @@ namespace Discord.Rest int? maxAge, int? maxUses, bool isTemporary, bool isUnique, RequestOptions options) { if (maxAge.HasValue && maxAge > 86400) - throw new InvalidOperationException("The maximum age of an invite must be less than or equal to a day (86400)."); + throw new ArgumentOutOfRangeException(nameof(maxAge), maxAge, + "The maximum age of an invite must be less than or equal to a day (86400)."); var args = new API.Rest.CreateChannelInviteParams { IsTemporary = isTemporary,