diff --git a/DisCatSharp/Entities/Guild/DiscordRoleTags.cs b/DisCatSharp/Entities/Guild/DiscordRoleTags.cs
index 6d3c30c29..abeb84899 100644
--- a/DisCatSharp/Entities/Guild/DiscordRoleTags.cs
+++ b/DisCatSharp/Entities/Guild/DiscordRoleTags.cs
@@ -1,53 +1,63 @@
// This file is part of the DisCatSharp project, based off DSharpPlus.
//
// Copyright (c) 2021-2022 AITSYS
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
using Newtonsoft.Json;
namespace DisCatSharp.Entities;
///
/// Represents a discord role tags.
///
public class DiscordRoleTags
{
///
/// Gets the id of the bot this role belongs to.
///
[JsonProperty("bot_id", NullValueHandling = NullValueHandling.Ignore)]
public ulong? BotId { get; internal set; }
///
/// Gets the id of the integration this role belongs to.
///
[JsonProperty("integration_id", NullValueHandling = NullValueHandling.Ignore)]
public ulong? IntegrationId { get; internal set; }
///
/// Gets whether this is the guild's premium subscriber role.
///
[JsonIgnore]
public bool IsPremiumSubscriber
- => this.PremiumSubscriber.HasValue && this.PremiumSubscriber.Value is null;
+ => this.PremiumSubscriber.HasValue && this.PremiumSubscriber.Value;
[JsonProperty("premium_subscriber", NullValueHandling = NullValueHandling.Include)]
- internal Optional PremiumSubscriber = false;
+ internal bool? PremiumSubscriber = false;
+
+ ///
+ /// Gets whether this is the guild's premium subscriber role.
+ ///
+ [JsonIgnore]
+ public bool IsLinkedRole
+ => this.GuildConnection.HasValue && this.GuildConnection.Value;
+
+ [JsonProperty("guild_connections", NullValueHandling = NullValueHandling.Include)]
+ internal bool? GuildConnection = false;
}
diff --git a/DisCatSharp/Enums/Invite/TargetType.cs b/DisCatSharp/Enums/Invite/TargetType.cs
index 6c9793f97..d45292880 100644
--- a/DisCatSharp/Enums/Invite/TargetType.cs
+++ b/DisCatSharp/Enums/Invite/TargetType.cs
@@ -1,39 +1,45 @@
// This file is part of the DisCatSharp project, based off DSharpPlus.
//
// Copyright (c) 2021-2022 AITSYS
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
namespace DisCatSharp.Enums;
///
/// Represents the invite type .
///
public enum TargetType
{
///
/// Represents a streaming invite.
///
Streaming = 1,
///
/// Represents a activity invite.
///
- EmbeddedApplication = 2
+ EmbeddedApplication = 2,
+
+ ///
+ /// Represents a role subscription invite.
+ /// Not creatable by bots.
+ ///
+ RoleSubscriptionsPurchase = 3
}