|
@@ -76,7 +76,7 @@ namespace Discord.Rest |
|
|
public static async Task<RestInviteMetadata> CreateInviteAsync(IGuildChannel channel, BaseDiscordClient client, |
|
|
public static async Task<RestInviteMetadata> CreateInviteAsync(IGuildChannel channel, BaseDiscordClient client, |
|
|
int? maxAge, int? maxUses, bool isTemporary, bool isUnique, RequestOptions options) |
|
|
int? maxAge, int? maxUses, bool isTemporary, bool isUnique, RequestOptions options) |
|
|
{ |
|
|
{ |
|
|
if (maxAge.HasValue && maxAge > 86400) |
|
|
|
|
|
|
|
|
if (maxAge > 86400) |
|
|
throw new ArgumentOutOfRangeException(nameof(maxAge), maxAge, |
|
|
throw new ArgumentOutOfRangeException(nameof(maxAge), maxAge, |
|
|
"The maximum age of an invite must be less than or equal to a day (86400)."); |
|
|
"The maximum age of an invite must be less than or equal to a day (86400)."); |
|
|
var args = new API.Rest.CreateChannelInviteParams |
|
|
var args = new API.Rest.CreateChannelInviteParams |
|
|