From e121a6dd5da9fe6cb8651a81ed7cf3525f6b8185 Mon Sep 17 00:00:00 2001 From: Still Hsu <341464@gmail.com> Date: Sat, 1 Sep 2018 03:44:14 +0800 Subject: [PATCH] Remove HasValue check ...since it does it implicitly already. --- src/Discord.Net.Rest/Entities/Channels/ChannelHelper.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Discord.Net.Rest/Entities/Channels/ChannelHelper.cs b/src/Discord.Net.Rest/Entities/Channels/ChannelHelper.cs index 4917f75f9..3063ac17e 100644 --- a/src/Discord.Net.Rest/Entities/Channels/ChannelHelper.cs +++ b/src/Discord.Net.Rest/Entities/Channels/ChannelHelper.cs @@ -76,7 +76,7 @@ namespace Discord.Rest public static async Task CreateInviteAsync(IGuildChannel channel, BaseDiscordClient client, int? maxAge, int? maxUses, bool isTemporary, bool isUnique, RequestOptions options) { - if (maxAge.HasValue && maxAge > 86400) + if (maxAge > 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