this object is fucked but at least its not missing props now (#2956)
This commit is contained in:
@@ -1,14 +1,24 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Discord.API
|
||||
namespace Discord.API;
|
||||
|
||||
internal class RoleTags
|
||||
{
|
||||
internal class RoleTags
|
||||
{
|
||||
[JsonProperty("bot_id")]
|
||||
public Optional<ulong> BotId { get; set; }
|
||||
[JsonProperty("integration_id")]
|
||||
public Optional<ulong> IntegrationId { get; set; }
|
||||
[JsonProperty("premium_subscriber")]
|
||||
public Optional<bool?> IsPremiumSubscriber { get; set; }
|
||||
}
|
||||
[JsonProperty("bot_id")]
|
||||
public Optional<ulong> BotId { get; set; }
|
||||
|
||||
[JsonProperty("integration_id")]
|
||||
public Optional<ulong> IntegrationId { get; set; }
|
||||
|
||||
[JsonProperty("premium_subscriber")]
|
||||
public Optional<bool?> IsPremiumSubscriber { get; set; }
|
||||
|
||||
[JsonProperty("subscription_listing_id")]
|
||||
public Optional<ulong> SubscriptionListingId { get; set; }
|
||||
|
||||
[JsonProperty("available_for_purchase")]
|
||||
public Optional<bool?> IsAvailableForPurchase { get; set; }
|
||||
|
||||
[JsonProperty("guild_connections")]
|
||||
public Optional<bool?> GuildConnections { get; set; }
|
||||
}
|
||||
|
||||
@@ -38,9 +38,12 @@ namespace Discord.Rest
|
||||
public static RoleTags ToEntity(this API.RoleTags model)
|
||||
{
|
||||
return new RoleTags(
|
||||
model.BotId.IsSpecified ? model.BotId.Value : null,
|
||||
model.IntegrationId.IsSpecified ? model.IntegrationId.Value : null,
|
||||
model.IsPremiumSubscriber.IsSpecified);
|
||||
model.BotId.ToNullable(),
|
||||
model.IntegrationId.ToNullable(),
|
||||
model.IsPremiumSubscriber.IsSpecified,
|
||||
model.SubscriptionListingId.ToNullable(),
|
||||
model.IsAvailableForPurchase.IsSpecified,
|
||||
model.GuildConnections.IsSpecified);
|
||||
}
|
||||
public static API.Embed ToModel(this Embed entity)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user