Browse Source

Remove HasValue check

...since it does it implicitly already.
pull/1140/head
Still Hsu 7 years ago
parent
commit
e121a6dd5d
No known key found for this signature in database GPG Key ID: 8601A145FDA95209
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/Discord.Net.Rest/Entities/Channels/ChannelHelper.cs

+ 1
- 1
src/Discord.Net.Rest/Entities/Channels/ChannelHelper.cs View File

@@ -76,7 +76,7 @@ namespace Discord.Rest
public static async Task<RestInviteMetadata> 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


Loading…
Cancel
Save