diff --git a/src/Discord.Net/Rest/Models/Guild/Guild.cs b/src/Discord.Net/Rest/Models/Guild/Guild.cs new file mode 100644 index 000000000..94dce06bb --- /dev/null +++ b/src/Discord.Net/Rest/Models/Guild/Guild.cs @@ -0,0 +1,75 @@ +#pragma warning disable CS8618 // Uninitialized NRT expected in models +using System.Text.Json.Serialization; + +namespace Discord.Models +{ + public class Guild + { + public const int MinGuildNameLength = 2; + public const int MaxGuildNameLength = 100; + + public const int DefaultMaxPresences = 5000; + public const string DefaultLocale = "en-US"; + + [JsonPropertyName("id")] + public Snowflake Id { get; set; } + [JsonPropertyName("name")] + public string Name { get; set; } + [JsonPropertyName("icon")] + public string? IconId { get; set; } + [JsonPropertyName("splash")] + public string? SplashId { get; set; } + [JsonPropertyName("owner")] + public Optional IsOwner { get; set; } + [JsonPropertyName("owner_id")] + public Snowflake OwnerId { get; set; } + [JsonPropertyName("permissions")] + public Optional UserPermissions { get; set; } + [JsonPropertyName("region")] + public string VoiceRegionId { get; set; } + [JsonPropertyName("afk_channel_id")] + public Snowflake? AfkChannelId { get; set; } + [JsonPropertyName("afk_timeout")] + public int AfkTimeout { get; set; } + [JsonPropertyName("embed_enabled")] + public Optional IsEmbeddable { get; set; } + [JsonPropertyName("embed_channel_id")] + public Optional EmbeddedChannelId { get; set; } + [JsonPropertyName("verification_level")] + public VerificationLevel VerificationLevel { get; set; } + [JsonPropertyName("default_message_notifications")] + public MessageNotificationLevel DefaultMessageNotificationLevel { get; set; } + [JsonPropertyName("explicit_content_filter")] + public ExplicitContentFilterLevel ExplicitContentFilterLevel { get; set; } + // todo: roles + // todo: emoji + [JsonPropertyName("features")] + public string[] Features { get; set; } + [JsonPropertyName("mfa_level")] + public MFALevel MFALevel { get; set; } + [JsonPropertyName("application_id")] + public Snowflake? OwnerApplicationId { get; set; } + [JsonPropertyName("widget_enabled")] + public Optional IsWidgetEnabled { get; set; } + [JsonPropertyName("widget_channel_id")] + public Optional WidgetChannelId { get; set; } + [JsonPropertyName("system_channel_id")] + public Snowflake? SystemChannelId { get; set; } + [JsonPropertyName("max_presences")] + public Optional MaxPresences { get; set; } + [JsonPropertyName("max_members")] + public Optional MaxMembers { get; set; } + [JsonPropertyName("vanity_url_code")] + public string? VanityUrlCode { get; set; } + [JsonPropertyName("description")] + public string? Description { get; set; } + [JsonPropertyName("banner")] + public string? BannerId { get; set; } + [JsonPropertyName("premium_tier")] + public PremiumTier PremiumTier { get; set; } + [JsonPropertyName("premium_subscription_count")] + public Optional PremiumSubscriptionCount { get; set; } + [JsonPropertyName("preferred_locale")] + public string PreferredLocale { get; set; } + } +} diff --git a/src/Discord.Net/Rest/Models/Guild/GuildFeatures.cs b/src/Discord.Net/Rest/Models/Guild/GuildFeatures.cs index 0113f4fd6..e8c6605bc 100644 --- a/src/Discord.Net/Rest/Models/Guild/GuildFeatures.cs +++ b/src/Discord.Net/Rest/Models/Guild/GuildFeatures.cs @@ -1,6 +1,6 @@ namespace Discord.Models { - public static class GuildFeatures + public class GuildFeatures { public const string InviteSplash = "INVITE_SPLASH"; public const string VIPRegions = "VIP_REGIONS";