diff --git a/src/Discord.Net.Core/Entities/Invites/IInviteMetadata.cs b/src/Discord.Net.Core/Entities/Invites/IInviteMetadata.cs
index fa327b8e2..bfa958f43 100644
--- a/src/Discord.Net.Core/Entities/Invites/IInviteMetadata.cs
+++ b/src/Discord.Net.Core/Entities/Invites/IInviteMetadata.cs
@@ -15,6 +15,10 @@ namespace Discord
/// false.
///
bool IsTemporary { get; }
+
+ [Obsolete("This will always return false. If an invite is revoked, it will not be found and the invite will be null.")]
+ bool IsRevoked { get; }
+
///
/// Gets the time (in seconds) until the invite expires.
///
@@ -22,7 +26,7 @@ namespace Discord
/// An representing the time in seconds until this invite expires; null if this
/// invite never expires.
///
- int MaxAge { get; }
+ int? MaxAge { get; }
///
/// Gets the max number of uses this invite may have.
///
@@ -30,20 +34,20 @@ namespace Discord
/// An representing the number of uses this invite may be accepted until it is removed
/// from the guild; null if none is set.
///
- int MaxUses { get; }
+ int? MaxUses { get; }
///
/// Gets the number of times this invite has been used.
///
///
/// An representing the number of times this invite has been used.
///
- int Uses { get; }
+ int? Uses { get; }
///
/// Gets when this invite was created.
///
///
/// A representing the time of which the invite was first created.
///
- DateTimeOffset CreatedAt { get; }
+ DateTimeOffset? CreatedAt { get; }
}
}
diff --git a/src/Discord.Net.Rest/API/Common/InviteMetadata.cs b/src/Discord.Net.Rest/API/Common/InviteMetadata.cs
index f818de699..6c05bff5d 100644
--- a/src/Discord.Net.Rest/API/Common/InviteMetadata.cs
+++ b/src/Discord.Net.Rest/API/Common/InviteMetadata.cs
@@ -16,5 +16,7 @@ namespace Discord.API
public bool Temporary { get; set; }
[JsonProperty("created_at")]
public DateTimeOffset CreatedAt { get; set; }
+ [Obsolete("This will always return false. If an invite is revoked, it will not be found and the invite will be null.")]
+ public bool Revoked { get; set; }
}
}
diff --git a/src/Discord.Net.Rest/Entities/Invites/RestInviteMetadata.cs b/src/Discord.Net.Rest/Entities/Invites/RestInviteMetadata.cs
index 9fabaef6b..915210db6 100644
--- a/src/Discord.Net.Rest/Entities/Invites/RestInviteMetadata.cs
+++ b/src/Discord.Net.Rest/Entities/Invites/RestInviteMetadata.cs
@@ -8,17 +8,19 @@ namespace Discord.Rest
{
private long _createdAtTicks;
+ [Obsolete("This will always return false. If an invite is revoked, it will not be found and the invite will be null.")]
+ public bool IsRevoked { get; private set; }
///
public bool IsTemporary { get; private set; }
///
- public int MaxAge { get; private set; }
+ public int? MaxAge { get; private set; }
///
- public int MaxUses { get; private set; }
+ public int? MaxUses { get; private set; }
///
- public int Uses { get; private set; }
+ public int? Uses { get; private set; }
///
- public DateTimeOffset CreatedAt => DateTimeUtils.FromTicks(_createdAtTicks);
+ public DateTimeOffset? CreatedAt => DateTimeUtils.FromTicks(_createdAtTicks);
internal RestInviteMetadata(BaseDiscordClient discord, IGuild guild, IChannel channel, string id)
: base(discord, guild, channel, id)