* Mark guild as optional for invite * Mark partial InviteMetadata members as Optional<T> * Some of them aren't sent when requesting through the general GET invite endpoint * Remove GetInviteParams * It was kinda stupid in the first place, might as well always get the count instead of having to ask the user whether they want the two fields filled or not. * Add ChannelType property * Add vanity invite support
25 lines
732 B
C#
25 lines
732 B
C#
#pragma warning disable CS1591
|
|
using Newtonsoft.Json;
|
|
using System;
|
|
|
|
namespace Discord.API
|
|
{
|
|
internal class InviteMetadata : Invite
|
|
{
|
|
[JsonProperty("inviter")]
|
|
public User Inviter { get; set; }
|
|
[JsonProperty("uses")]
|
|
public Optional<int> Uses { get; set; }
|
|
[JsonProperty("max_uses")]
|
|
public Optional<int> MaxUses { get; set; }
|
|
[JsonProperty("max_age")]
|
|
public Optional<int> MaxAge { get; set; }
|
|
[JsonProperty("temporary")]
|
|
public bool Temporary { get; set; }
|
|
[JsonProperty("created_at")]
|
|
public Optional<DateTimeOffset> CreatedAt { get; set; }
|
|
[JsonProperty("revoked")]
|
|
public bool Revoked { get; set; }
|
|
}
|
|
}
|