diff --git a/src/Models/Application/Application.cs b/src/Models/Application/Application.cs
new file mode 100644
index 000000000..4adddeedf
--- /dev/null
+++ b/src/Models/Application/Application.cs
@@ -0,0 +1,163 @@
+using System.Text.Json.Serialization;
+
+namespace Discord.Net.Models
+{
+ ///
+ /// Represents an application object.
+ ///
+ public record Application
+ {
+ ///
+ /// Creates a with the provided parameters.
+ ///
+ /// The id of the app.
+ /// The name of the app.
+ /// The icon hash of the app.
+ /// The description of the app.
+ /// An array of rpc origin urls, if rpc is enabled.
+ /// When false only app owner can join the app's bot to guilds.
+ /// When true the app's bot will only join upon completion of the full oauth2 code grant flow.
+ /// The url of the app's terms of service.
+ /// The url of the app's privacy policy.
+ /// Partial user object containing info on the owner of the application.
+ /// If this application is a game sold on Discord, this field will be the summary field for the store page of its primary sku.
+ /// The hex encoded key for verification in interactions and the GameSDK's GetTicket.
+ /// If the application belongs to a team, this will be a list of the members of that team.
+ /// If this application is a game sold on Discord, this field will be the guild to which it has been linked.
+ /// If this application is a game sold on Discord, this field will be the id of the "Game SKU" that is created, if exists.
+ /// If this application is a game sold on Discord, this field will be the URL slug that links to the store page.
+ /// The application's default rich presence invite cover image hash.
+ /// The application's public flags.
+ [JsonConstructor]
+ public Application(Snowflake id, string name, string? icon, string description, Optional rpcOrigins, bool botPublic, bool botRequireCodeGrant, Optional termsOfServiceUrl, Optional privacyPolicyUrl, User owner, string summary, string verifyKey, Team? team, Optional guildId, Optional primarySkuId, Optional slug, Optional coverImage, ApplicationFlags flags)
+ {
+ Id = id;
+ Name = name;
+ Icon = icon;
+ Description = description;
+ RpcOrigins = rpcOrigins;
+ BotPublic = botPublic;
+ BotRequireCodeGrant = botRequireCodeGrant;
+ TermsOfServiceUrl = termsOfServiceUrl;
+ PrivacyPolicyUrl = privacyPolicyUrl;
+ Owner = owner;
+ Summary = summary;
+ VerifyKey = verifyKey;
+ Team = team;
+ GuildId = guildId;
+ PrimarySkuId = primarySkuId;
+ Slug = slug;
+ CoverImage = coverImage;
+ Flags = flags;
+
+ }
+
+ ///
+ /// The id of the app.
+ ///
+ [JsonPropertyName("id")]
+ public Snowflake Id { get; }
+
+ ///
+ /// The name of the app.
+ ///
+ [JsonPropertyName("name")]
+ public string Name { get; }
+
+ ///
+ /// The icon hash of the app.
+ ///
+ [JsonPropertyName("icon")]
+ public string? Icon { get; }
+
+ ///
+ /// The description of the app.
+ ///
+ [JsonPropertyName("description")]
+ public string Description { get; }
+
+ ///
+ /// An array of rpc origin urls, if rpc is enabled.
+ ///
+ [JsonPropertyName("rpc_origins")]
+ public Optional RpcOrigins { get; }
+
+ ///
+ /// When false only app owner can join the app's bot to guilds.
+ ///
+ [JsonPropertyName("bot_public")]
+ public bool BotPublic { get; }
+
+ ///
+ /// When true the app's bot will only join upon completion of the full oauth2 code grant flow.
+ ///
+ [JsonPropertyName("bot_require_code_grant")]
+ public bool BotRequireCodeGrant { get; }
+
+ ///
+ /// The url of the app's terms of service.
+ ///
+ [JsonPropertyName("terms_of_service_url")]
+ public Optional TermsOfServiceUrl { get; }
+
+ ///
+ /// The url of the app's privacy policy.
+ ///
+ [JsonPropertyName("privacy_policy_url")]
+ public Optional PrivacyPolicyUrl { get; }
+
+ ///
+ /// Partial user object containing info on the owner of the application.
+ ///
+ [JsonPropertyName("owner")]
+ public User Owner { get; }
+
+ ///
+ /// If this application is a game sold on Discord, this field will be the summary field for the store page of its primary sku.
+ ///
+ [JsonPropertyName("summary")]
+ public string Summary { get; }
+
+ ///
+ /// The hex encoded key for verification in interactions and the GameSDK's GetTicket.
+ ///
+ [JsonPropertyName("verify_key")]
+ public string VerifyKey { get; }
+
+ ///
+ /// If the application belongs to a team, this will be a list of the members of that team.
+ ///
+ [JsonPropertyName("team")]
+ public Team? Team { get; }
+
+ ///
+ /// If this application is a game sold on Discord, this field will be the guild to which it has been linked.
+ ///
+ [JsonPropertyName("guild_id")]
+ public Optional GuildId { get; }
+
+ ///
+ /// If this application is a game sold on Discord, this field will be the id of the "Game SKU" that is created, if exists.
+ ///
+ [JsonPropertyName("primary_sku_id")]
+ public Optional PrimarySkuId { get; }
+
+ ///
+ /// If this application is a game sold on Discord, this field will be the URL slug that links to the store page.
+ ///
+ [JsonPropertyName("slug")]
+ public Optional Slug { get; }
+
+ ///
+ /// The application's default rich presence invite cover image hash.
+ ///
+ [JsonPropertyName("cover_image")]
+ public Optional CoverImage { get; }
+
+ ///
+ /// The application's public flags.
+ ///
+ [JsonPropertyName("flags")]
+ public ApplicationFlags Flags { get; }
+ }
+}
diff --git a/src/Models/Application/ApplicationFlags.cs b/src/Models/Application/ApplicationFlags.cs
new file mode 100644
index 000000000..7370e137b
--- /dev/null
+++ b/src/Models/Application/ApplicationFlags.cs
@@ -0,0 +1,41 @@
+using System;
+
+namespace Discord.Net.Models
+{
+ ///
+ /// Represents the application flags.
+ ///
+ [Flags]
+ public enum ApplicationFlags
+ {
+ ///
+ /// This application has the gateway presence privileged intent.
+ ///
+ GatewayPresence = 1 << 12,
+
+ ///
+ /// This application has the gateway presence limited.
+ ///
+ GatewayPresenceLimited = 1 << 13,
+
+ ///
+ /// This application has the gateway guild members privileged intent.
+ ///
+ GatewayGuildMembers = 1 << 14,
+
+ ///
+ /// This application has the gateway guid members limited.
+ ///
+ GatewayGuildMembersLimited = 1 << 15,
+
+ ///
+ /// This application has the verification for the increase of the guild limit pending.
+ ///
+ VerificationPendingGuildLimit = 1 << 16,
+
+ ///
+ /// This application is embedded.
+ ///
+ Embedded = 1 << 17,
+ }
+}
diff --git a/src/Models/AuditLog/AuditEntryInfo.cs b/src/Models/AuditLog/AuditEntryInfo.cs
index cea53bfeb..605383268 100644
--- a/src/Models/AuditLog/AuditEntryInfo.cs
+++ b/src/Models/AuditLog/AuditEntryInfo.cs
@@ -7,52 +7,76 @@ namespace Discord.Net.Models
///
public record AuditEntryInfo
{
+ ///
+ /// Creates a with the provided parameters.
+ ///
+ /// Number of days after which inactive members were kicked.
+ /// Number of members removed by the prune.
+ /// Channel in which the entities were targeted.
+ /// Id of the message that was targeted.
+ /// Number of entities that were targeted.
+ /// Id of the overwritten entity.
+ /// Type of overwritten entity - "0" for "role" or "1" for "member".
+ /// Name of the role if type is "0" (not present if type is "1").
+ [JsonConstructor]
+ public AuditEntryInfo(int deleteMemberDays, int membersRemoved, Snowflake channelId, Snowflake messageId, int count, Snowflake id, AuditEntryInfoType type, string roleName)
+ {
+ DeleteMemberDays = deleteMemberDays;
+ MembersRemoved = membersRemoved;
+ ChannelId = channelId;
+ MessageId = messageId;
+ Count = count;
+ Id = id;
+ Type = type;
+ RoleName = roleName;
+ }
+
///
/// Number of days after which inactive members were kicked.
///
[JsonPropertyName("delete_member_days")]
- public Optional DeleteMemberDays { get; init; } // actually sent as Optional
-
+ public int DeleteMemberDays { get; }
+
///
/// Number of members removed by the prune.
///
[JsonPropertyName("members_removed")]
- public Optional MembersRemoved { get; init; } // actually sent as Optional
+ public int MembersRemoved { get; }
///
/// Channel in which the entities were targeted.
///
[JsonPropertyName("channel_id")]
- public Optional ChannelId { get; init; }
+ public Snowflake ChannelId { get; }
///
/// Id of the message that was targeted.
///
[JsonPropertyName("message_id")]
- public Optional MessageId { get; init; }
+ public Snowflake MessageId { get; }
///
/// Number of entities that were targeted.
///
[JsonPropertyName("count")]
- public Optional Count { get; init; } // actually sent as Optional
+ public int Count { get; }
///
/// Id of the overwritten entity.
///
[JsonPropertyName("id")]
- public Optional Id { get; init; }
+ public Snowflake Id { get; }
///
- /// Type of overwritten entity - "0" for "role" or "1" for "member".
+ /// Type of overwritten entity.
///
[JsonPropertyName("type")]
- public Optional Type { get; init; } // actually sent as Optional
+ public AuditEntryInfoType Type { get; }
///
- /// Name of the role if type is "0" (not present if type is "1").
+ /// Name of the role if type is (not present if type is ).
///
[JsonPropertyName("role_name")]
- public Optional RoleName { get; init; }
+ public string RoleName { get; }
}
}
diff --git a/src/Models/AuditLog/AuditEntryInfoType.cs b/src/Models/AuditLog/AuditEntryInfoType.cs
index e92f94314..b487c2aa4 100644
--- a/src/Models/AuditLog/AuditEntryInfoType.cs
+++ b/src/Models/AuditLog/AuditEntryInfoType.cs
@@ -1,7 +1,7 @@
namespace Discord.Net.Models
{
///
- /// Represents type of the overwritten entity for an audit entry info.
+ /// Represents the type of the overwritten entity for an audit entry info.
///
public enum AuditEntryInfoType
{
diff --git a/src/Models/AuditLog/AuditLog.cs b/src/Models/AuditLog/AuditLog.cs
index 0eabc493b..960e2607a 100644
--- a/src/Models/AuditLog/AuditLog.cs
+++ b/src/Models/AuditLog/AuditLog.cs
@@ -3,35 +3,48 @@ using System.Text.Json.Serialization;
namespace Discord.Net.Models
{
///
- /// Represents a discord audit log object.
+ /// Represents an audit log object.
///
public record AuditLog
{
- /*
///
- /// Gets an array of s.
+ /// Creates a with the provided parameters.
+ ///
+ /// List of webhooks found in the audit log.
+ /// List of users found in the audit log.
+ /// List of audit log entries.
+ /// List of partial integration objects.
+ [JsonConstructor]
+ public AuditLog(Webhook[] webhooks, User[] users, AuditLogEntry[] auditLogEntries, Integration[] integrations)
+ {
+ Webhooks = webhooks;
+ Users = users;
+ AuditLogEntries = auditLogEntries;
+ Integrations = integrations;
+ }
+
+ ///
+ /// List of webhooks found in the audit log.
///
[JsonPropertyName("webhooks")]
- public Optional Webhooks { get; init; }*/ //TODO Add Webhook
+ public Webhook[] Webhooks { get; }
- /*
///
- /// Gets an array of s.
+ /// List of users found in the audit log.
///
[JsonPropertyName("users")]
- public Optional Users { get; init; }*/ //TODO Add User
+ public User[] Users { get; }
///
- /// Gets an array of s.
+ /// List of audit log entries.
///
[JsonPropertyName("audit_log_entries")]
- public Optional AuditLogEntries { get; init; }
+ public AuditLogEntry[] AuditLogEntries { get; }
- /*
///
- /// Gets an array of s.
+ /// List of partial integration objects.
///
[JsonPropertyName("integrations")]
- public Optional Integrations { get; init; }*/ //TODO Add Integration
+ public Integration[] Integrations { get; }
}
}
diff --git a/src/Models/AuditLog/AuditLogChange.cs b/src/Models/AuditLog/AuditLogChange.cs
index 32317aa1f..e5cdca8e4 100644
--- a/src/Models/AuditLog/AuditLogChange.cs
+++ b/src/Models/AuditLog/AuditLogChange.cs
@@ -7,22 +7,36 @@ namespace Discord.Net.Models
///
public record AuditLogChange
{
+ ///
+ /// Creates a with the provided parameters.
+ ///
+ /// New value of the key.
+ /// Old value of the key.
+ /// Name of audit log change key.
+ [JsonConstructor]
+ public AuditLogChange(Optional newValue, Optional oldValue, string key)
+ {
+ NewValue = newValue;
+ OldValue = oldValue;
+ Key = key;
+ }
+
///
/// New value of the key.
///
[JsonPropertyName("new_value")]
- public Optional NewValue { get; init; }
+ public Optional NewValue { get; }
///
/// Old value of the key.
///
[JsonPropertyName("old_value")]
- public Optional OldValue { get; init; }
+ public Optional OldValue { get; }
///
- /// Name of the audit log change key.
+ /// Name of audit log change key.
///
[JsonPropertyName("key")]
- public string? Key { get; init; }
+ public string Key { get; }
}
}
diff --git a/src/Models/AuditLog/AuditLogEntry.cs b/src/Models/AuditLog/AuditLogEntry.cs
index bc0a83923..499413166 100644
--- a/src/Models/AuditLog/AuditLogEntry.cs
+++ b/src/Models/AuditLog/AuditLogEntry.cs
@@ -7,46 +7,68 @@ namespace Discord.Net.Models
///
public record AuditLogEntry
{
+ ///
+ /// Creates a with the provided parameters.
+ ///
+ /// Id of the affected entity (webhook, user, role, etc.).
+ /// Changes made to the target_id.
+ /// The user who made the changes.
+ /// Id of the entry.
+ /// Type of action that occurred.
+ /// Additional info for certain action types.
+ /// The reason for the change (0-512 characters).
+ [JsonConstructor]
+ public AuditLogEntry(string? targetId, Optional changes, Snowflake? userId, Snowflake id, AuditLogEvent actionType, Optional options, Optional reason)
+ {
+ TargetId = targetId;
+ Changes = changes;
+ UserId = userId;
+ Id = id;
+ ActionType = actionType;
+ Options = options;
+ Reason = reason;
+ }
+
///
/// Id of the affected entity (webhook, user, role, etc.).
///
[JsonPropertyName("target_id")]
- public Snowflake? TargetId { get; init; }
+ public string? TargetId { get; }
///
- /// Changes made to the .
+ /// Changes made to the target_id.
///
[JsonPropertyName("changes")]
- public Optional Changes { get; init; }
+ public Optional Changes { get; }
///
/// The user who made the changes.
///
[JsonPropertyName("user_id")]
- public Snowflake? UserId { get; init; }
+ public Snowflake? UserId { get; }
///
/// Id of the entry.
///
[JsonPropertyName("id")]
- public Snowflake Id { get; init; }
+ public Snowflake Id { get; }
///
/// Type of action that occurred.
///
[JsonPropertyName("action_type")]
- public AuditLogEvent ActionType { get; init; }
+ public AuditLogEvent ActionType { get; }
///
/// Additional info for certain action types.
///
[JsonPropertyName("options")]
- public Optional Options { get; init; }
+ public Optional Options { get; }
///
/// The reason for the change (0-512 characters).
///
[JsonPropertyName("reason")]
- public Optional Reason { get; init; }
+ public Optional Reason { get; }
}
}
diff --git a/src/Models/Channel/Channel.cs b/src/Models/Channel/Channel.cs
new file mode 100644
index 000000000..2d8e3d370
--- /dev/null
+++ b/src/Models/Channel/Channel.cs
@@ -0,0 +1,211 @@
+using System;
+using System.Text.Json.Serialization;
+
+namespace Discord.Net.Models
+{
+ ///
+ /// Represents a channel object.
+ ///
+ public record Channel
+ {
+ ///
+ /// Creates a with the provided parameters.
+ ///
+ /// The id of this channel.
+ /// The type of channel.
+ /// The id of the guild (may be missing for some channel objects received over gateway guild dispatches).
+ /// Sorting position of the channel.
+ /// Explicit permission overwrites for members and roles.
+ /// The name of the channel (2-100 characters).
+ /// The channel topic (0-1024 characters).
+ /// Whether the channel is nsfw.
+ /// The id of the last message sent in this channel (may not point to an existing or valid message).
+ /// The bitrate (in bits) of the voice channel.
+ /// The user limit of the voice channel.
+ /// Amount of seconds a user has to wait before sending another message (0-21600); bots, as well as users with the permission manage_messages or manage_channel, are unaffected.
+ /// The recipients of the DM.
+ /// Icon hash.
+ /// Id of the creator of the group DM or thread.
+ /// Application id of the group DM creator if it is bot-created.
+ /// For guild channels: id of the parent category for a channel (each parent category can contain up to 50 channels), for threads: id of the text channel this thread was created.
+ /// When the last pinned message was pinned. This may be null in events such as GUILD_CREATE when a message is not pinned.
+ /// Voice region id for the voice channel, automatic when set to null.
+ /// The camera video quality mode of the voice channel, 1 when not present.
+ /// An approximate count of messages in a thread, stops counting at 50.
+ /// An approximate count of users in a thread, stops counting at 50.
+ /// Thread-specific fields not needed by other channels.
+ /// Thread member object for the current user, if they have joined the thread, only included on certain API endpoints.
+ [JsonConstructor]
+ public Channel(Snowflake id, ChannelType type, Optional guildId, Optional position, Optional permissionOverwrites, Optional name, Optional topic, Optional nsfw, Optional lastMessageId, Optional bitrate, Optional userLimit, Optional rateLimitPerUser, Optional recipients, Optional icon, Optional ownerId, Optional applicationId, Optional parentId, Optional lastPinTimestamp, Optional rtcRegion, Optional videoQualityMode, Optional messageCount, Optional memberCount, Optional threadMetadata, Optional member)
+ {
+ Id = id;
+ Type = type;
+ GuildId = guildId;
+ Position = position;
+ PermissionOverwrites = permissionOverwrites;
+ Name = name;
+ Topic = topic;
+ Nsfw = nsfw;
+ LastMessageId = lastMessageId;
+ Bitrate = bitrate;
+ UserLimit = userLimit;
+ RateLimitPerUser = rateLimitPerUser;
+ Recipients = recipients;
+ Icon = icon;
+ OwnerId = ownerId;
+ ApplicationId = applicationId;
+ ParentId = parentId;
+ LastPinTimestamp = lastPinTimestamp;
+ RtcRegion = rtcRegion;
+ VideoQualityMode = videoQualityMode;
+ MessageCount = messageCount;
+ MemberCount = memberCount;
+ ThreadMetadata = threadMetadata;
+ Member = member;
+ }
+
+ ///
+ /// The id of this channel.
+ ///
+ [JsonPropertyName("id")]
+ public Snowflake Id { get; }
+
+ ///
+ /// The type of channel.
+ ///
+ [JsonPropertyName("type")]
+ public ChannelType Type { get; }
+
+ ///
+ /// The id of the guild (may be missing for some channel objects received over gateway guild dispatches).
+ ///
+ [JsonPropertyName("guild_id")]
+ public Optional GuildId { get; }
+
+ ///
+ /// Sorting position of the channel.
+ ///
+ [JsonPropertyName("position")]
+ public Optional Position { get; }
+
+ ///
+ /// Explicit permission overwrites for members and roles.
+ ///
+ [JsonPropertyName("permission_overwrites")]
+ public Optional PermissionOverwrites { get; }
+
+ ///
+ /// The name of the channel (2-100 characters).
+ ///
+ [JsonPropertyName("name")]
+ public Optional Name { get; }
+
+ ///
+ /// The channel topic (0-1024 characters).
+ ///
+ [JsonPropertyName("topic")]
+ public Optional Topic { get; }
+
+ ///
+ /// Whether the channel is nsfw.
+ ///
+ [JsonPropertyName("nsfw")]
+ public Optional Nsfw { get; }
+
+ ///
+ /// The id of the last message sent in this channel (may not point to an existing or valid message).
+ ///
+ [JsonPropertyName("last_message_id")]
+ public Optional LastMessageId { get; }
+
+ ///
+ /// The bitrate (in bits) of the voice channel.
+ ///
+ [JsonPropertyName("bitrate")]
+ public Optional Bitrate { get; }
+
+ ///
+ /// The user limit of the voice channel.
+ ///
+ [JsonPropertyName("user_limit")]
+ public Optional UserLimit { get; }
+
+ ///
+ /// Amount of seconds a user has to wait before sending another message (0-21600); bots, as well as users with the permission manage_messages or manage_channel, are unaffected.
+ ///
+ [JsonPropertyName("rate_limit_per_user")]
+ public Optional RateLimitPerUser { get; }
+
+ ///
+ /// The recipients of the DM.
+ ///
+ [JsonPropertyName("recipients")]
+ public Optional Recipients { get; }
+
+ ///
+ /// Icon hash.
+ ///
+ [JsonPropertyName("icon")]
+ public Optional Icon { get; }
+
+ ///
+ /// Id of the creator of the group DM or thread.
+ ///
+ [JsonPropertyName("owner_id")]
+ public Optional OwnerId { get; }
+
+ ///
+ /// Application id of the group DM creator if it is bot-created.
+ ///
+ [JsonPropertyName("application_id")]
+ public Optional ApplicationId { get; }
+
+ ///
+ /// For guild channels: id of the parent category for a channel (each parent category can contain up to 50 channels), for threads: id of the text channel this thread was created.
+ ///
+ [JsonPropertyName("parent_id")]
+ public Optional ParentId { get; }
+
+ ///
+ /// When the last pinned message was pinned. This may be null in events such as GUILD_CREATE when a message is not pinned.
+ ///
+ [JsonPropertyName("last_pin_timestamp")]
+ public Optional LastPinTimestamp { get; }
+
+ ///
+ /// Voice region id for the voice channel, automatic when set to null.
+ ///
+ [JsonPropertyName("rtc_region")]
+ public Optional RtcRegion { get; }
+
+ ///
+ /// The camera video quality mode of the voice channel, 1 when not present.
+ ///
+ [JsonPropertyName("video_quality_mode")]
+ public Optional VideoQualityMode { get; }
+
+ ///
+ /// An approximate count of messages in a thread, stops counting at 50.
+ ///
+ [JsonPropertyName("message_count")]
+ public Optional MessageCount { get; }
+
+ ///
+ /// An approximate count of users in a thread, stops counting at 50.
+ ///
+ [JsonPropertyName("member_count")]
+ public Optional MemberCount { get; }
+
+ ///
+ /// Thread-specific fields not needed by other channels.
+ ///
+ [JsonPropertyName("thread_metadata")]
+ public Optional ThreadMetadata { get; }
+
+ ///
+ /// Thread member object for the current user, if they have joined the thread, only included on certain API endpoints.
+ ///
+ [JsonPropertyName("member")]
+ public Optional Member { get; }
+ }
+}
diff --git a/src/Models/Channel/ChannelType.cs b/src/Models/Channel/ChannelType.cs
new file mode 100644
index 000000000..e2d874171
--- /dev/null
+++ b/src/Models/Channel/ChannelType.cs
@@ -0,0 +1,66 @@
+using System;
+
+namespace Discord.Net.Models
+{
+ ///
+ /// Represents the channel type.
+ ///
+ [Flags]
+ public enum ChannelType
+ {
+ ///
+ /// A text channel within a server.
+ ///
+ GuildText = 0,
+
+ ///
+ /// A direct message between users.
+ ///
+ Dm = 1,
+
+ ///
+ /// A voice channel within a server.
+ ///
+ GuildVoice = 2,
+
+ ///
+ /// A direct message between multiple users.
+ ///
+ GroupDm = 3,
+
+ ///
+ /// An organizational category that contains up to 50 channels.
+ ///
+ GuildCategory = 4,
+
+ ///
+ /// A channel that users can follow and crosspost into their own server.
+ ///
+ GuildNews = 5,
+
+ ///
+ /// A channel in which game developers can sell their game on Discord.
+ ///
+ GuildStore = 6,
+
+ ///
+ /// A temporary sub-channel within a GUILD_NEWS channel.
+ ///
+ GuildNewsThread = 10,
+
+ ///
+ /// A temporary sub-channel within a GUILD_TEXT channel.
+ ///
+ GuildPublicThread = 11,
+
+ ///
+ /// A temporary sub-channel within a GUILD_TEXT channel that is only viewable by those invited and those with the MANAGE_THREADS permission.
+ ///
+ GuildPrivateThread = 12,
+
+ ///
+ /// A voice channel for hosting events with an audience.
+ ///
+ GuildStageVoice = 13,
+ }
+}
diff --git a/src/Models/Channel/FollowedChannel.cs b/src/Models/Channel/FollowedChannel.cs
new file mode 100644
index 000000000..f641f032f
--- /dev/null
+++ b/src/Models/Channel/FollowedChannel.cs
@@ -0,0 +1,34 @@
+using System.Text.Json.Serialization;
+
+namespace Discord.Net.Models
+{
+ ///
+ /// Represents a followed channel object.
+ ///
+ public record FollowedChannel
+ {
+ ///
+ /// Creates a with the provided parameters.
+ ///
+ /// Source channel id.
+ /// Created target webhook id.
+ [JsonConstructor]
+ public FollowedChannel(Snowflake channelId, Snowflake webhookId)
+ {
+ ChannelId = channelId;
+ WebhookId = webhookId;
+ }
+
+ ///
+ /// Source channel id.
+ ///
+ [JsonPropertyName("channel_id")]
+ public Snowflake ChannelId { get; }
+
+ ///
+ /// Created target webhook id.
+ ///
+ [JsonPropertyName("webhook_id")]
+ public Snowflake WebhookId { get; }
+ }
+}
diff --git a/src/Models/Channel/Message/AllowedMentions.cs b/src/Models/Channel/Message/AllowedMentions.cs
new file mode 100644
index 000000000..5bccca8cd
--- /dev/null
+++ b/src/Models/Channel/Message/AllowedMentions.cs
@@ -0,0 +1,50 @@
+using System.Text.Json.Serialization;
+
+namespace Discord.Net.Models
+{
+ ///
+ /// Represents an allowed mentions object.
+ ///
+ public record AllowedMentions
+ {
+ ///
+ /// Creates a with the provided parameters.
+ ///
+ /// An array of allowed mention types to parse from the content.
+ /// Array of role_ids to mention (Max size of 100).
+ /// Array of user_ids to mention (Max size of 100).
+ /// For replies, whether to mention the author of the message being replied to (default false).
+ [JsonConstructor]
+ public AllowedMentions(AllowedMentionType[] parse, ListOfSnowflakes roles, ListOfSnowflakes users, bool repliedUser)
+ {
+ Parse = parse;
+ Roles = roles;
+ Users = users;
+ RepliedUser = repliedUser;
+ }
+
+ ///
+ /// An array of allowed mention types to parse from the content.
+ ///
+ [JsonPropertyName("parse")]
+ public AllowedMentionType[] Parse { get; }
+
+ ///
+ /// Array of role_ids to mention (Max size of 100).
+ ///
+ [JsonPropertyName("roles")]
+ public ListOfSnowflakes Roles { get; }
+
+ ///
+ /// Array of user_ids to mention (Max size of 100).
+ ///
+ [JsonPropertyName("users")]
+ public ListOfSnowflakes Users { get; }
+
+ ///
+ /// For replies, whether to mention the author of the message being replied to (default false).
+ ///
+ [JsonPropertyName("replied_user")]
+ public bool RepliedUser { get; }
+ }
+}
diff --git a/src/Models/Channel/Message/Attachment.cs b/src/Models/Channel/Message/Attachment.cs
new file mode 100644
index 000000000..1b72bfd85
--- /dev/null
+++ b/src/Models/Channel/Message/Attachment.cs
@@ -0,0 +1,82 @@
+using System.Text.Json.Serialization;
+
+namespace Discord.Net.Models
+{
+ ///
+ /// Represents an attachment object.
+ ///
+ public record Attachment
+ {
+ ///
+ /// Creates a with the provided parameters.
+ ///
+ /// Attachment id.
+ /// Name of file attached.
+ /// The attachment's media type.
+ /// Size of file in bytes.
+ /// Source url of file.
+ /// A proxied url of file.
+ /// Height of file (if image).
+ /// Width of file (if image).
+ [JsonConstructor]
+ public Attachment(Snowflake id, string filename, Optional contentType, int size, string url, string proxyUrl, Optional height, Optional width)
+ {
+ Id = id;
+ Filename = filename;
+ ContentType = contentType;
+ Size = size;
+ Url = url;
+ ProxyUrl = proxyUrl;
+ Height = height;
+ Width = width;
+ }
+
+ ///
+ /// Attachment id.
+ ///
+ [JsonPropertyName("id")]
+ public Snowflake Id { get; }
+
+ ///
+ /// Name of file attached.
+ ///
+ [JsonPropertyName("filename")]
+ public string Filename { get; }
+
+ ///
+ /// The attachment's media type.
+ ///
+ [JsonPropertyName("content_type")]
+ public Optional ContentType { get; }
+
+ ///
+ /// Size of file in bytes.
+ ///
+ [JsonPropertyName("size")]
+ public int Size { get; }
+
+ ///
+ /// Source url of file.
+ ///
+ [JsonPropertyName("url")]
+ public string Url { get; }
+
+ ///
+ /// A proxied url of file.
+ ///
+ [JsonPropertyName("proxy_url")]
+ public string ProxyUrl { get; }
+
+ ///
+ /// Height of file (if image).
+ ///
+ [JsonPropertyName("height")]
+ public Optional Height { get; }
+
+ ///
+ /// Width of file (if image).
+ ///
+ [JsonPropertyName("width")]
+ public Optional Width { get; }
+ }
+}
diff --git a/src/Models/Channel/Message/ChannelMention.cs b/src/Models/Channel/Message/ChannelMention.cs
new file mode 100644
index 000000000..886683323
--- /dev/null
+++ b/src/Models/Channel/Message/ChannelMention.cs
@@ -0,0 +1,50 @@
+using System.Text.Json.Serialization;
+
+namespace Discord.Net.Models
+{
+ ///
+ /// Represents a channel mention object.
+ ///
+ public record ChannelMention
+ {
+ ///
+ /// Creates a with the provided parameters.
+ ///
+ /// Id of the channel.
+ /// Id of the guild containing the channel.
+ /// The type of channel.
+ /// The name of the channel.
+ [JsonConstructor]
+ public ChannelMention(Snowflake id, Snowflake guildId, ChannelType type, string name)
+ {
+ Id = id;
+ GuildId = guildId;
+ Type = type;
+ Name = name;
+ }
+
+ ///
+ /// Id of the channel.
+ ///
+ [JsonPropertyName("id")]
+ public Snowflake Id { get; }
+
+ ///
+ /// Id of the guild containing the channel.
+ ///
+ [JsonPropertyName("guild_id")]
+ public Snowflake GuildId { get; }
+
+ ///
+ /// The type of channel.
+ ///
+ [JsonPropertyName("type")]
+ public ChannelType Type { get; }
+
+ ///
+ /// The name of the channel.
+ ///
+ [JsonPropertyName("name")]
+ public string Name { get; }
+ }
+}
diff --git a/src/Models/Channel/Message/Embed/Embed.cs b/src/Models/Channel/Message/Embed/Embed.cs
new file mode 100644
index 000000000..9ee90565d
--- /dev/null
+++ b/src/Models/Channel/Message/Embed/Embed.cs
@@ -0,0 +1,123 @@
+using System;
+using System.Text.Json.Serialization;
+
+namespace Discord.Net.Models
+{
+ ///
+ /// Represents a embed object.
+ ///
+ public record Embed
+ {
+ ///
+ /// Creates a with the provided parameters.
+ ///
+ /// Title of embed.
+ /// Type of embed (always "rich" for webhook embeds).
+ /// Description of embed.
+ /// Url of embed.
+ /// Timestamp of embed content.
+ /// Color code of the embed.
+ /// Footer information.
+ /// Image information.
+ /// Thumbnail information.
+ /// Video information.
+ /// Provider information.
+ /// Author information.
+ /// Fields information.
+ [JsonConstructor]
+ public Embed(Optional title, Optional type, Optional description, Optional url, Optional timestamp, Optional color, Optional footer, Optional image, Optional thumbnail, Optional video, Optional provider, Optional author, Optional fields)
+ {
+ Title = title;
+ Type = type;
+ Description = description;
+ Url = url;
+ Timestamp = timestamp;
+ Color = color;
+ Footer = footer;
+ Image = image;
+ Thumbnail = thumbnail;
+ Video = video;
+ Provider = provider;
+ Author = author;
+ Fields = fields;
+ }
+
+ ///
+ /// Title of embed.
+ ///
+ [JsonPropertyName("title")]
+ public Optional Title { get; }
+
+ ///
+ /// Type of embed (always "rich" for webhook embeds).
+ ///
+ [JsonPropertyName("type")]
+ public Optional Type { get; }
+
+ ///
+ /// Description of embed.
+ ///
+ [JsonPropertyName("description")]
+ public Optional Description { get; }
+
+ ///
+ /// Url of embed.
+ ///
+ [JsonPropertyName("url")]
+ public Optional Url { get; }
+
+ ///
+ /// Timestamp of embed content.
+ ///
+ [JsonPropertyName("timestamp")]
+ public Optional Timestamp { get; }
+
+ ///
+ /// Color code of the embed.
+ ///
+ [JsonPropertyName("color")]
+ public Optional Color { get; }
+
+ ///
+ /// Footer information.
+ ///
+ [JsonPropertyName("footer")]
+ public Optional Footer { get; }
+
+ ///
+ /// Image information.
+ ///
+ [JsonPropertyName("image")]
+ public Optional Image { get; }
+
+ ///
+ /// Thumbnail information.
+ ///
+ [JsonPropertyName("thumbnail")]
+ public Optional Thumbnail { get; }
+
+ ///
+ /// Video information.
+ ///
+ [JsonPropertyName("video")]
+ public Optional Video { get; }
+
+ ///
+ /// Provider information.
+ ///
+ [JsonPropertyName("provider")]
+ public Optional Provider { get; }
+
+ ///
+ /// Author information.
+ ///
+ [JsonPropertyName("author")]
+ public Optional Author { get; }
+
+ ///
+ /// Fields information.
+ ///
+ [JsonPropertyName("fields")]
+ public Optional Fields { get; }
+ }
+}
diff --git a/src/Models/Channel/Message/Embed/EmbedAuthor.cs b/src/Models/Channel/Message/Embed/EmbedAuthor.cs
new file mode 100644
index 000000000..344c40414
--- /dev/null
+++ b/src/Models/Channel/Message/Embed/EmbedAuthor.cs
@@ -0,0 +1,50 @@
+using System.Text.Json.Serialization;
+
+namespace Discord.Net.Models
+{
+ ///
+ /// Represents a embed author object.
+ ///
+ public record EmbedAuthor
+ {
+ ///
+ /// Creates a with the provided parameters.
+ ///
+ /// Name of author.
+ /// Url of author.
+ /// Url of author icon (only supports http(s) and attachments).
+ /// A proxied url of author icon.
+ [JsonConstructor]
+ public EmbedAuthor(Optional name, Optional url, Optional iconUrl, Optional proxyIconUrl)
+ {
+ Name = name;
+ Url = url;
+ IconUrl = iconUrl;
+ ProxyIconUrl = proxyIconUrl;
+ }
+
+ ///
+ /// Name of author.
+ ///
+ [JsonPropertyName("name")]
+ public Optional Name { get; }
+
+ ///
+ /// Url of author.
+ ///
+ [JsonPropertyName("url")]
+ public Optional Url { get; }
+
+ ///
+ /// Url of author icon (only supports http(s) and attachments).
+ ///
+ [JsonPropertyName("icon_url")]
+ public Optional IconUrl { get; }
+
+ ///
+ /// A proxied url of author icon.
+ ///
+ [JsonPropertyName("proxy_icon_url")]
+ public Optional ProxyIconUrl { get; }
+ }
+}
diff --git a/src/Models/Channel/Message/Embed/EmbedField.cs b/src/Models/Channel/Message/Embed/EmbedField.cs
new file mode 100644
index 000000000..b4a39de5a
--- /dev/null
+++ b/src/Models/Channel/Message/Embed/EmbedField.cs
@@ -0,0 +1,42 @@
+using System.Text.Json.Serialization;
+
+namespace Discord.Net.Models
+{
+ ///
+ /// Represents a embed field object.
+ ///
+ public record EmbedField
+ {
+ ///
+ /// Creates a with the provided parameters.
+ ///
+ /// Name of the field.
+ /// Value of the field.
+ /// Whether or not this field should display inline.
+ [JsonConstructor]
+ public EmbedField(string name, string value, Optional inline)
+ {
+ Name = name;
+ Value = value;
+ Inline = inline;
+ }
+
+ ///
+ /// Name of the field.
+ ///
+ [JsonPropertyName("name")]
+ public string Name { get; }
+
+ ///
+ /// Value of the field.
+ ///
+ [JsonPropertyName("value")]
+ public string Value { get; }
+
+ ///
+ /// Whether or not this field should display inline.
+ ///
+ [JsonPropertyName("inline")]
+ public Optional Inline { get; }
+ }
+}
diff --git a/src/Models/Channel/Message/Embed/EmbedFooter.cs b/src/Models/Channel/Message/Embed/EmbedFooter.cs
new file mode 100644
index 000000000..ba172dd1b
--- /dev/null
+++ b/src/Models/Channel/Message/Embed/EmbedFooter.cs
@@ -0,0 +1,42 @@
+using System.Text.Json.Serialization;
+
+namespace Discord.Net.Models
+{
+ ///
+ /// Represents a embed footer object.
+ ///
+ public record EmbedFooter
+ {
+ ///
+ /// Creates a with the provided parameters.
+ ///
+ /// Footer text.
+ /// Url of footer icon (only supports http(s) and attachments).
+ /// A proxied url of footer icon.
+ [JsonConstructor]
+ public EmbedFooter(string text, Optional iconUrl, Optional proxyIconUrl)
+ {
+ Text = text;
+ IconUrl = iconUrl;
+ ProxyIconUrl = proxyIconUrl;
+ }
+
+ ///
+ /// Footer text.
+ ///
+ [JsonPropertyName("text")]
+ public string Text { get; }
+
+ ///
+ /// Url of footer icon (only supports http(s) and attachments).
+ ///
+ [JsonPropertyName("icon_url")]
+ public Optional IconUrl { get; }
+
+ ///
+ /// A proxied url of footer icon.
+ ///
+ [JsonPropertyName("proxy_icon_url")]
+ public Optional ProxyIconUrl { get; }
+ }
+}
diff --git a/src/Models/Channel/Message/Embed/EmbedImage.cs b/src/Models/Channel/Message/Embed/EmbedImage.cs
new file mode 100644
index 000000000..75984072a
--- /dev/null
+++ b/src/Models/Channel/Message/Embed/EmbedImage.cs
@@ -0,0 +1,50 @@
+using System.Text.Json.Serialization;
+
+namespace Discord.Net.Models
+{
+ ///
+ /// Represents a embed image object.
+ ///
+ public record EmbedImage
+ {
+ ///
+ /// Creates a with the provided parameters.
+ ///
+ /// Source url of image (only supports http(s) and attachments).
+ /// A proxied url of the image.
+ /// Height of image.
+ /// Width of image.
+ [JsonConstructor]
+ public EmbedImage(Optional url, Optional proxyUrl, Optional height, Optional width)
+ {
+ Url = url;
+ ProxyUrl = proxyUrl;
+ Height = height;
+ Width = width;
+ }
+
+ ///
+ /// Source url of image (only supports http(s) and attachments).
+ ///
+ [JsonPropertyName("url")]
+ public Optional Url { get; }
+
+ ///
+ /// A proxied url of the image.
+ ///
+ [JsonPropertyName("proxy_url")]
+ public Optional ProxyUrl { get; }
+
+ ///
+ /// Height of image.
+ ///
+ [JsonPropertyName("height")]
+ public Optional Height { get; }
+
+ ///
+ /// Width of image.
+ ///
+ [JsonPropertyName("width")]
+ public Optional Width { get; }
+ }
+}
diff --git a/src/Models/Channel/Message/Embed/EmbedProvider.cs b/src/Models/Channel/Message/Embed/EmbedProvider.cs
new file mode 100644
index 000000000..67349b0c7
--- /dev/null
+++ b/src/Models/Channel/Message/Embed/EmbedProvider.cs
@@ -0,0 +1,34 @@
+using System.Text.Json.Serialization;
+
+namespace Discord.Net.Models
+{
+ ///
+ /// Represents a embed provider object.
+ ///
+ public record EmbedProvider
+ {
+ ///
+ /// Creates a with the provided parameters.
+ ///
+ /// Name of provider.
+ /// Url of provider.
+ [JsonConstructor]
+ public EmbedProvider(Optional name, Optional url)
+ {
+ Name = name;
+ Url = url;
+ }
+
+ ///
+ /// Name of provider.
+ ///
+ [JsonPropertyName("name")]
+ public Optional Name { get; }
+
+ ///
+ /// Url of provider.
+ ///
+ [JsonPropertyName("url")]
+ public Optional Url { get; }
+ }
+}
diff --git a/src/Models/Channel/Message/Embed/EmbedThumbnail.cs b/src/Models/Channel/Message/Embed/EmbedThumbnail.cs
new file mode 100644
index 000000000..dd20c3911
--- /dev/null
+++ b/src/Models/Channel/Message/Embed/EmbedThumbnail.cs
@@ -0,0 +1,50 @@
+using System.Text.Json.Serialization;
+
+namespace Discord.Net.Models
+{
+ ///
+ /// Represents a embed thumbnail object.
+ ///
+ public record EmbedThumbnail
+ {
+ ///
+ /// Creates a with the provided parameters.
+ ///
+ /// Source url of thumbnail (only supports http(s) and attachments).
+ /// A proxied url of the thumbnail.
+ /// Height of thumbnail.
+ /// Width of thumbnail.
+ [JsonConstructor]
+ public EmbedThumbnail(Optional url, Optional proxyUrl, Optional height, Optional width)
+ {
+ Url = url;
+ ProxyUrl = proxyUrl;
+ Height = height;
+ Width = width;
+ }
+
+ ///
+ /// Source url of thumbnail (only supports http(s) and attachments).
+ ///
+ [JsonPropertyName("url")]
+ public Optional Url { get; }
+
+ ///
+ /// A proxied url of the thumbnail.
+ ///
+ [JsonPropertyName("proxy_url")]
+ public Optional ProxyUrl { get; }
+
+ ///
+ /// Height of thumbnail.
+ ///
+ [JsonPropertyName("height")]
+ public Optional Height { get; }
+
+ ///
+ /// Width of thumbnail.
+ ///
+ [JsonPropertyName("width")]
+ public Optional Width { get; }
+ }
+}
diff --git a/src/Models/Channel/Message/Embed/EmbedType.cs b/src/Models/Channel/Message/Embed/EmbedType.cs
new file mode 100644
index 000000000..5955608df
--- /dev/null
+++ b/src/Models/Channel/Message/Embed/EmbedType.cs
@@ -0,0 +1,38 @@
+namespace Discord.Net.Models
+{
+ ///
+ /// Represents the type of embed.
+ ///
+ public enum EmbedType
+ {
+ ///
+ /// Generic embed rendered from embed attributes.
+ ///
+ Rich,
+
+ ///
+ /// Image embed.
+ ///
+ Image,
+
+ ///
+ /// Video embed.
+ ///
+ Video,
+
+ ///
+ /// Animated gif image embed rendered as a video embed.
+ ///
+ Gifv,
+
+ ///
+ /// Article embed.
+ ///
+ Article,
+
+ ///
+ /// Link embed.
+ ///
+ Link,
+ }
+}
diff --git a/src/Models/Channel/Message/Embed/EmbedVideo.cs b/src/Models/Channel/Message/Embed/EmbedVideo.cs
new file mode 100644
index 000000000..f0e2cdf1c
--- /dev/null
+++ b/src/Models/Channel/Message/Embed/EmbedVideo.cs
@@ -0,0 +1,50 @@
+using System.Text.Json.Serialization;
+
+namespace Discord.Net.Models
+{
+ ///
+ /// Represents a embed video object.
+ ///
+ public record EmbedVideo
+ {
+ ///
+ /// Creates a with the provided parameters.
+ ///
+ /// Source url of video.
+ /// A proxied url of the video.
+ /// Height of video.
+ /// Width of video.
+ [JsonConstructor]
+ public EmbedVideo(Optional url, Optional proxyUrl, Optional height, Optional width)
+ {
+ Url = url;
+ ProxyUrl = proxyUrl;
+ Height = height;
+ Width = width;
+ }
+
+ ///
+ /// Source url of video.
+ ///
+ [JsonPropertyName("url")]
+ public Optional Url { get; }
+
+ ///
+ /// A proxied url of the video.
+ ///
+ [JsonPropertyName("proxy_url")]
+ public Optional ProxyUrl { get; }
+
+ ///
+ /// Height of video.
+ ///
+ [JsonPropertyName("height")]
+ public Optional Height { get; }
+
+ ///
+ /// Width of video.
+ ///
+ [JsonPropertyName("width")]
+ public Optional Width { get; }
+ }
+}
diff --git a/src/Models/Channel/Message/Message.cs b/src/Models/Channel/Message/Message.cs
new file mode 100644
index 000000000..886f06545
--- /dev/null
+++ b/src/Models/Channel/Message/Message.cs
@@ -0,0 +1,259 @@
+using System;
+using System.Text.Json.Serialization;
+
+namespace Discord.Net.Models
+{
+ ///
+ /// Represents a message object.
+ ///
+ public record Message
+ {
+ ///
+ /// Creates a with the provided parameters.
+ ///
+ /// Id of the message.
+ /// Id of the channel the message was sent in.
+ /// Id of the guild the message was sent in.
+ /// The author of this message (not guaranteed to be a valid user, see below).
+ /// Member properties for this message's author.
+ /// Contents of the message.
+ /// When this message was sent.
+ /// When this message was edited (or null if never).
+ /// Whether this was a TTS message.
+ /// Whether this message mentions everyone.
+ /// Users specifically mentioned in the message.
+ /// Roles specifically mentioned in this message.
+ /// Channels specifically mentioned in this message.
+ /// Any attached files.
+ /// Any embedded content.
+ /// Reactions to the message.
+ /// Used for validating a message was sent.
+ /// Whether this message is pinned.
+ /// If the message is generated by a webhook, this is the webhook's id.
+ /// Type of message.
+ /// Sent with Rich Presence-related chat embeds.
+ /// Sent with Rich Presence-related chat embeds.
+ /// If the message is a response to an Interaction, this is the id of the interaction's application.
+ /// Data showing the source of a crosspost, channel follow add, pin, or reply message.
+ /// Message flags combined as a bitfield.
+ /// The stickers sent with the message (bots currently can only receive messages with stickers, not send).
+ /// The message associated with the message_reference.
+ /// Sent if the message is a response to an Interaction.
+ /// The thread that was started from this message, includes thread member object.
+ /// Sent if the message contains components like buttons, action rows, or other interactive components.
+ [JsonConstructor]
+ public Message(Snowflake id, Snowflake channelId, Optional guildId, User author, Optional member, string content, DateTimeOffset timestamp, DateTimeOffset? editedTimestamp, bool tts, bool mentionEveryone, UserWithMember[] mentions, Snowflake[] mentionRoles, Optional mentionChannels, Attachment[] attachments, Embed[] embeds, Optional reactions, Optional nonce, bool pinned, Optional webhookId, int type, Optional activity, Optional application, Optional applicationId, Optional messageReference, Optional flags, Optional stickers, Optional referencedMessage, Optional interaction, Optional thread, Optional components)
+ {
+ Id = id;
+ ChannelId = channelId;
+ GuildId = guildId;
+ Author = author;
+ Member = member;
+ Content = content;
+ Timestamp = timestamp;
+ EditedTimestamp = editedTimestamp;
+ Tts = tts;
+ MentionEveryone = mentionEveryone;
+ Mentions = mentions;
+ MentionRoles = mentionRoles;
+ MentionChannels = mentionChannels;
+ Attachments = attachments;
+ Embeds = embeds;
+ Reactions = reactions;
+ Nonce = nonce;
+ Pinned = pinned;
+ WebhookId = webhookId;
+ Type = type;
+ Activity = activity;
+ Application = application;
+ ApplicationId = applicationId;
+ MessageReference = messageReference;
+ Flags = flags;
+ Stickers = stickers;
+ ReferencedMessage = referencedMessage;
+ Interaction = interaction;
+ Thread = thread;
+ Components = components;
+ }
+
+ ///
+ /// Id of the message.
+ ///
+ [JsonPropertyName("id")]
+ public Snowflake Id { get; }
+
+ ///
+ /// Id of the channel the message was sent in.
+ ///
+ [JsonPropertyName("channel_id")]
+ public Snowflake ChannelId { get; }
+
+ ///
+ /// Id of the guild the message was sent in.
+ ///
+ [JsonPropertyName("guild_id")]
+ public Optional GuildId { get; }
+
+ ///
+ /// The author of this message (not guaranteed to be a valid user, see below).
+ ///
+ [JsonPropertyName("author")]
+ public User Author { get; }
+
+ ///
+ /// Member properties for this message's author.
+ ///
+ [JsonPropertyName("member")]
+ public Optional Member { get; }
+
+ ///
+ /// Contents of the message.
+ ///
+ [JsonPropertyName("content")]
+ public string Content { get; }
+
+ ///
+ /// When this message was sent.
+ ///
+ [JsonPropertyName("timestamp")]
+ public DateTimeOffset Timestamp { get; }
+
+ ///
+ /// When this message was edited (or null if never).
+ ///
+ [JsonPropertyName("edited_timestamp")]
+ public DateTimeOffset? EditedTimestamp { get; }
+
+ ///
+ /// Whether this was a TTS message.
+ ///
+ [JsonPropertyName("tts")]
+ public bool Tts { get; }
+
+ ///
+ /// Whether this message mentions everyone.
+ ///
+ [JsonPropertyName("mention_everyone")]
+ public bool MentionEveryone { get; }
+
+ ///
+ /// Users specifically mentioned in the message.
+ ///
+ [JsonPropertyName("mentions")]
+ public UserMention[] Mentions { get; }
+
+ ///
+ /// Roles specifically mentioned in this message.
+ ///
+ [JsonPropertyName("mention_roles")]
+ public Snowflake[] MentionRoles { get; }
+
+ ///
+ /// Channels specifically mentioned in this message.
+ ///
+ [JsonPropertyName("mention_channels")]
+ public Optional MentionChannels { get; }
+
+ ///
+ /// Any attached files.
+ ///
+ [JsonPropertyName("attachments")]
+ public Attachment[] Attachments { get; }
+
+ ///
+ /// Any embedded content.
+ ///
+ [JsonPropertyName("embeds")]
+ public Embed[] Embeds { get; }
+
+ ///
+ /// Reactions to the message.
+ ///
+ [JsonPropertyName("reactions")]
+ public Optional Reactions { get; }
+
+ ///
+ /// Used for validating a message was sent.
+ ///
+ [JsonPropertyName("nonce")]
+ public Optional Nonce { get; }
+
+ ///
+ /// Whether this message is pinned.
+ ///
+ [JsonPropertyName("pinned")]
+ public bool Pinned { get; }
+
+ ///
+ /// If the message is generated by a webhook, this is the webhook's id.
+ ///
+ [JsonPropertyName("webhook_id")]
+ public Optional WebhookId { get; }
+
+ ///
+ /// Type of message.
+ ///
+ [JsonPropertyName("type")]
+ public int Type { get; }
+
+ ///
+ /// Sent with Rich Presence-related chat embeds.
+ ///
+ [JsonPropertyName("activity")]
+ public Optional Activity { get; }
+
+ ///
+ /// Sent with Rich Presence-related chat embeds.
+ ///
+ [JsonPropertyName("application")]
+ public Optional Application { get; }
+
+ ///
+ /// If the message is a response to an Interaction, this is the id of the interaction's application.
+ ///
+ [JsonPropertyName("application_id")]
+ public Optional ApplicationId { get; }
+
+ ///
+ /// Data showing the source of a crosspost, channel follow add, pin, or reply message.
+ ///
+ [JsonPropertyName("message_reference")]
+ public Optional MessageReference { get; }
+
+ ///
+ /// Message flags combined as a bitfield.
+ ///
+ [JsonPropertyName("flags")]
+ public Optional Flags { get; }
+
+ ///
+ /// The stickers sent with the message (bots currently can only receive messages with stickers, not send).
+ ///
+ [JsonPropertyName("stickers")]
+ public Optional Stickers { get; }
+
+ ///
+ /// The message associated with the message_reference.
+ ///
+ [JsonPropertyName("referenced_message")]
+ public Optional ReferencedMessage { get; }
+
+ ///
+ /// Sent if the message is a response to an Interaction.
+ ///
+ [JsonPropertyName("interaction")]
+ public Optional Interaction { get; }
+
+ ///
+ /// The thread that was started from this message, includes thread member object.
+ ///
+ [JsonPropertyName("thread")]
+ public Optional Thread { get; }
+
+ ///
+ /// Sent if the message contains components like buttons, action rows, or other interactive components.
+ ///
+ [JsonPropertyName("components")]
+ public Optional Components { get; }
+ }
+}
diff --git a/src/Models/Channel/Message/MessageActivity.cs b/src/Models/Channel/Message/MessageActivity.cs
new file mode 100644
index 000000000..657b8b9cf
--- /dev/null
+++ b/src/Models/Channel/Message/MessageActivity.cs
@@ -0,0 +1,34 @@
+using System.Text.Json.Serialization;
+
+namespace Discord.Net.Models
+{
+ ///
+ /// Represents a message activity object.
+ ///
+ public record MessageActivity
+ {
+ ///
+ /// Creates a with the provided parameters.
+ ///
+ /// Type of message activity.
+ /// Party_id from a Rich Presence event.
+ [JsonConstructor]
+ public MessageActivity(int type, Optional partyId)
+ {
+ Type = type;
+ PartyId = partyId;
+ }
+
+ ///
+ /// Type of message activity.
+ ///
+ [JsonPropertyName("type")]
+ public int Type { get; }
+
+ ///
+ /// Party_id from a Rich Presence event.
+ ///
+ [JsonPropertyName("party_id")]
+ public Optional PartyId { get; }
+ }
+}
diff --git a/src/Models/Channel/Message/MessageActivityType.cs b/src/Models/Channel/Message/MessageActivityType.cs
new file mode 100644
index 000000000..04de9bd33
--- /dev/null
+++ b/src/Models/Channel/Message/MessageActivityType.cs
@@ -0,0 +1,31 @@
+using System;
+
+namespace Discord.Net.Models
+{
+ ///
+ /// Represents the message activity type.
+ ///
+ [Flags]
+ public enum MessageActivityType
+ {
+ ///
+ /// The message activity is to join.
+ ///
+ Join = 1,
+
+ ///
+ /// The message activity is to spectate a stream.
+ ///
+ Spectate = 2,
+
+ ///
+ /// The message activity is to listen to music.
+ ///
+ Listen = 3,
+
+ ///
+ /// The message activity is to request to join.
+ ///
+ JoinRequest = 5,
+ }
+}
diff --git a/src/Models/Channel/Message/MessageFlags.cs b/src/Models/Channel/Message/MessageFlags.cs
new file mode 100644
index 000000000..4e16ed323
--- /dev/null
+++ b/src/Models/Channel/Message/MessageFlags.cs
@@ -0,0 +1,51 @@
+using System;
+
+namespace Discord.Net.Models
+{
+ ///
+ /// Represents the message flags.
+ ///
+ [Flags]
+ public enum MessageFlags
+ {
+ ///
+ /// This message has been published to subscribed channels (via Channel Following).
+ ///
+ Crossposted = 1 << 0,
+
+ ///
+ /// This message originated from a message in another channel (via Channel Following).
+ ///
+ IsCrosspost = 1 << 1,
+
+ ///
+ /// Do not include any embeds when serializing this message.
+ ///
+ SuppressEmbeds = 1 << 2,
+
+ ///
+ /// The source message for this crosspost has been deleted (via Channel Following).
+ ///
+ SourceMessageDeleted = 1 << 3,
+
+ ///
+ /// This message came from the urgent message system.
+ ///
+ Urgent = 1 << 4,
+
+ ///
+ /// This message has an associated thread, with the same id as the message.
+ ///
+ HasThread = 1 << 5,
+
+ ///
+ /// This message is only visible to the user who invoked the Interaction.
+ ///
+ Ephemeral = 1 << 6,
+
+ ///
+ /// This message is an Interaction Response and the bot is "thinking".
+ ///
+ Loading = 1 << 7,
+ }
+}
diff --git a/src/Models/Channel/Message/MessageReference.cs b/src/Models/Channel/Message/MessageReference.cs
new file mode 100644
index 000000000..d7e0e60cf
--- /dev/null
+++ b/src/Models/Channel/Message/MessageReference.cs
@@ -0,0 +1,50 @@
+using System.Text.Json.Serialization;
+
+namespace Discord.Net.Models
+{
+ ///
+ /// Represents a message reference object.
+ ///
+ public record MessageReference
+ {
+ ///
+ /// Creates a with the provided parameters.
+ ///
+ /// Id of the originating message.
+ /// Id of the originating message's channel.
+ /// Id of the originating message's guild.
+ /// When sending, whether to error if the referenced message doesn't exist instead of sending as a normal (non-reply) message, default true.
+ [JsonConstructor]
+ public MessageReference(Optional messageId, Optional channelId, Optional guildId, Optional failIfNotExists)
+ {
+ MessageId = messageId;
+ ChannelId = channelId;
+ GuildId = guildId;
+ FailIfNotExists = failIfNotExists;
+ }
+
+ ///
+ /// Id of the originating message.
+ ///
+ [JsonPropertyName("message_id")]
+ public Optional MessageId { get; }
+
+ ///
+ /// Id of the originating message's channel.
+ ///
+ [JsonPropertyName("channel_id")]
+ public Optional ChannelId { get; }
+
+ ///
+ /// Id of the originating message's guild.
+ ///
+ [JsonPropertyName("guild_id")]
+ public Optional GuildId { get; }
+
+ ///
+ /// When sending, whether to error if the referenced message doesn't exist instead of sending as a normal (non-reply) message, default true.
+ ///
+ [JsonPropertyName("fail_if_not_exists")]
+ public Optional FailIfNotExists { get; }
+ }
+}
diff --git a/src/Models/Channel/Message/MessageType.cs b/src/Models/Channel/Message/MessageType.cs
new file mode 100644
index 000000000..042433d36
--- /dev/null
+++ b/src/Models/Channel/Message/MessageType.cs
@@ -0,0 +1,121 @@
+using System;
+
+namespace Discord.Net.Models
+{
+ ///
+ /// Represents the message type.
+ ///
+ [Flags]
+ public enum MessageType
+ {
+ ///
+ /// Default message type.
+ ///
+ Default = 0,
+
+ ///
+ /// Recipient was added.
+ ///
+ RecipientAdd = 1,
+
+ ///
+ /// Recipient was removed.
+ ///
+ RecipientRemove = 2,
+
+ ///
+ /// Request to join a call.
+ ///
+ Call = 3,
+
+ ///
+ /// Channel name was changed.
+ ///
+ ChannelNameChange = 4,
+
+ ///
+ /// Channel icon was changed.
+ ///
+ ChannelIconChange = 5,
+
+ ///
+ /// Message was pinned in this channel.
+ ///
+ ChannelPinnedMessage = 6,
+
+ ///
+ /// User joined the guild.
+ ///
+ GuildMemberJoin = 7,
+
+ ///
+ ///
+ ///
+ UserPremiumGuildSubscription = 8,
+
+ ///
+ ///
+ ///
+ UserPremiumGuildSubscriptionTier1 = 9,
+
+ ///
+ ///
+ ///
+ UserPremiumGuildSubscriptionTier2 = 10,
+
+ ///
+ ///
+ ///
+ UserPremiumGuildSubscriptionTier3 = 11,
+
+ ///
+ ///
+ ///
+ ChannelFollowAdd = 12,
+
+ ///
+ ///
+ ///
+ GuildDiscoveryDisqualified = 14,
+
+ ///
+ ///
+ ///
+ GuildDiscoveryRequalified = 15,
+
+ ///
+ ///
+ ///
+ GuildDiscoveryGracePeriodInitialWarning = 16,
+
+ ///
+ ///
+ ///
+ GuildDiscoveryGracePeriodFinalWarning = 17,
+
+ ///
+ ///
+ ///
+ ThreadCreated = 18,
+
+ ///
+ ///
+ ///
+ Reply = 19,
+
+ ///
+ ///
+ ///
+ ApplicationCommand = 20,
+
+ ///
+ ///
+ ///
+ ThreadStarterMessage = 21,
+
+ ///
+ ///
+ ///
+ GuildInviteReminder = 22,
+ }
+}
diff --git a/src/Models/Channel/Message/Reaction.cs b/src/Models/Channel/Message/Reaction.cs
new file mode 100644
index 000000000..ec3201514
--- /dev/null
+++ b/src/Models/Channel/Message/Reaction.cs
@@ -0,0 +1,42 @@
+using System.Text.Json.Serialization;
+
+namespace Discord.Net.Models
+{
+ ///
+ /// Represents a reaction object.
+ ///
+ public record Reaction
+ {
+ ///
+ /// Creates a with the provided parameters.
+ ///
+ /// Times this emoji has been used to react.
+ /// Whether the current user reacted using this emoji.
+ /// Emoji information.
+ [JsonConstructor]
+ public Reaction(int count, bool me, Emoji emoji)
+ {
+ Count = count;
+ Me = me;
+ Emoji = emoji;
+ }
+
+ ///
+ /// Times this emoji has been used to react.
+ ///
+ [JsonPropertyName("count")]
+ public int Count { get; }
+
+ ///
+ /// Whether the current user reacted using this emoji.
+ ///
+ [JsonPropertyName("me")]
+ public bool Me { get; }
+
+ ///
+ /// Emoji information.
+ ///
+ [JsonPropertyName("emoji")]
+ public Emoji Emoji { get; }
+ }
+}
diff --git a/src/Models/Channel/Message/Sticker.cs b/src/Models/Channel/Message/Sticker.cs
new file mode 100644
index 000000000..c4eefb8de
--- /dev/null
+++ b/src/Models/Channel/Message/Sticker.cs
@@ -0,0 +1,74 @@
+using System.Text.Json.Serialization;
+
+namespace Discord.Net.Models
+{
+ ///
+ /// Represents a sticker object.
+ ///
+ public record Sticker
+ {
+ ///
+ /// Creates a with the provided parameters.
+ ///
+ /// Id of the sticker.
+ /// Id of the pack the sticker is from.
+ /// Name of the sticker.
+ /// Description of the sticker.
+ /// A comma-separated list of tags for the sticker.
+ /// Sticker asset hash.
+ /// Type of sticker format.
+ [JsonConstructor]
+ public Sticker(Snowflake id, Snowflake packId, string name, string description, Optional tags, string asset, StickerFormatType formatType)
+ {
+ Id = id;
+ PackId = packId;
+ Name = name;
+ Description = description;
+ Tags = tags;
+ Asset = asset;
+ FormatType = formatType;
+ }
+
+ ///
+ /// Id of the sticker.
+ ///
+ [JsonPropertyName("id")]
+ public Snowflake Id { get; }
+
+ ///
+ /// Id of the pack the sticker is from.
+ ///
+ [JsonPropertyName("pack_id")]
+ public Snowflake PackId { get; }
+
+ ///
+ /// Name of the sticker.
+ ///
+ [JsonPropertyName("name")]
+ public string Name { get; }
+
+ ///
+ /// Description of the sticker.
+ ///
+ [JsonPropertyName("description")]
+ public string Description { get; }
+
+ ///
+ /// A comma-separated list of tags for the sticker.
+ ///
+ [JsonPropertyName("tags")]
+ public Optional Tags { get; }
+
+ ///
+ /// Sticker asset hash.
+ ///
+ [JsonPropertyName("asset")]
+ public string Asset { get; }
+
+ ///
+ /// Type of sticker format.
+ ///
+ [JsonPropertyName("format_type")]
+ public StickerFormatType FormatType { get; }
+ }
+}
diff --git a/src/Models/Channel/Message/StickerFormatType.cs b/src/Models/Channel/Message/StickerFormatType.cs
new file mode 100644
index 000000000..c735057a6
--- /dev/null
+++ b/src/Models/Channel/Message/StickerFormatType.cs
@@ -0,0 +1,26 @@
+using System;
+
+namespace Discord.Net.Models
+{
+ ///
+ /// Represents the sticker format type.
+ ///
+ [Flags]
+ public enum StickerFormatType
+ {
+ ///
+ /// The sticker format is a png.
+ ///
+ Png = 1,
+
+ ///
+ /// The sticker format is a apng.
+ ///
+ Apng = 2,
+
+ ///
+ /// The sticker format is a lottie.
+ ///
+ Lottie = 3,
+ }
+}
diff --git a/src/Models/Channel/Message/UserMention.cs b/src/Models/Channel/Message/UserMention.cs
new file mode 100644
index 000000000..59908b586
--- /dev/null
+++ b/src/Models/Channel/Message/UserMention.cs
@@ -0,0 +1,40 @@
+using System.Text.Json.Serialization;
+
+namespace Discord.Net.Models
+{
+ ///
+ /// Represents a user mention object.
+ ///
+ public record UserMention : User
+ {
+ ///
+ /// Creates a with the provided parameters.
+ ///
+ /// The user's id.
+ /// The user's username, not unique across the platform.
+ /// The user's 4-digit discord-tag.
+ /// The user's avatar hash.
+ /// Whether the user belongs to an OAuth2 application.
+ /// Whether the user is an Official Discord System user (part of the urgent message system).
+ /// Whether the user has two factor enabled on their account.
+ /// The user's chosen language option.
+ /// Whether the email on this account has been verified.
+ /// The user's email.
+ /// The flags on a user's account.
+ /// The type of Nitro subscription on a user's account.
+ /// The public flags on a user's account.
+ /// Additional partial member field.
+ [JsonConstructor]
+ public UserMention(Snowflake id, string username, string discriminator, string? avatar, Optional bot, Optional system, Optional mfaEnabled, Optional locale, Optional verified, Optional email, Optional flags, Optional premiumType, Optional publicFlags, Optional member)
+ : base(id, username, discriminator, avatar, bot, system, mfaEnabled, locale, verified, email, flags, premiumType, publicFlags)
+ {
+ Member = member;
+ }
+
+ ///
+ /// Additional partial member field.
+ ///
+ [JsonPropertyName("member")]
+ public Optional Member { get; }
+ }
+}
diff --git a/src/Models/Channel/Overwrite.cs b/src/Models/Channel/Overwrite.cs
new file mode 100644
index 000000000..692c9c38e
--- /dev/null
+++ b/src/Models/Channel/Overwrite.cs
@@ -0,0 +1,50 @@
+using System.Text.Json.Serialization;
+
+namespace Discord.Net.Models
+{
+ ///
+ /// Represents a overwrite object.
+ ///
+ public record Overwrite
+ {
+ ///
+ /// Creates a with the provided parameters.
+ ///
+ /// Role or user id.
+ /// Type of entity this overwrite belongs to.
+ /// Permission bit set.
+ /// Permission bit set.
+ [JsonConstructor]
+ public Overwrite(Snowflake id, OverwriteType type, string allow, string deny)
+ {
+ Id = id;
+ Type = type;
+ Allow = allow;
+ Deny = deny;
+ }
+
+ ///
+ /// Role or user id.
+ ///
+ [JsonPropertyName("id")]
+ public Snowflake Id { get; }
+
+ ///
+ /// Type of entity this overwrite belongs to.
+ ///
+ [JsonPropertyName("type")]
+ public OverwriteType Type { get; }
+
+ ///
+ /// Permission bit set.
+ ///
+ [JsonPropertyName("allow")]
+ public string Allow { get; }
+
+ ///
+ /// Permission bit set.
+ ///
+ [JsonPropertyName("deny")]
+ public string Deny { get; }
+ }
+}
diff --git a/src/Models/Channel/OverwriteType.cs b/src/Models/Channel/OverwriteType.cs
new file mode 100644
index 000000000..405697f23
--- /dev/null
+++ b/src/Models/Channel/OverwriteType.cs
@@ -0,0 +1,17 @@
+namespace Discord.Net.Models
+{
+ ///
+ /// Represents the type of the overwrite.
+ ///
+ public enum OverwriteType
+ {
+ ///
+ /// The type of the overwrite is a role.
+ ///
+ Role = 0,
+ ///
+ /// The type of the overwrite is a member.
+ ///
+ Member = 1,
+ }
+}
diff --git a/src/Models/Channel/Thread/ThreadMember.cs b/src/Models/Channel/Thread/ThreadMember.cs
new file mode 100644
index 000000000..e28fe1c34
--- /dev/null
+++ b/src/Models/Channel/Thread/ThreadMember.cs
@@ -0,0 +1,51 @@
+using System;
+using System.Text.Json.Serialization;
+
+namespace Discord.Net.Models
+{
+ ///
+ /// Represents a thread member object.
+ ///
+ public record ThreadMember
+ {
+ ///
+ /// Creates a with the provided parameters.
+ ///
+ /// The id of the thread.
+ /// The id of the user.
+ /// The time the current user last joined the thread.
+ /// Any user-thread settings, currently only used for notifications.
+ [JsonConstructor]
+ public ThreadMember(Snowflake id, Snowflake userId, DateTimeOffset joinTimestamp, int flags)
+ {
+ Id = id;
+ UserId = userId;
+ JoinTimestamp = joinTimestamp;
+ Flags = flags;
+ }
+
+ ///
+ /// The id of the thread.
+ ///
+ [JsonPropertyName("id")]
+ public Snowflake Id { get; }
+
+ ///
+ /// The id of the user.
+ ///
+ [JsonPropertyName("user_id")]
+ public Snowflake UserId { get; }
+
+ ///
+ /// The time the current user last joined the thread.
+ ///
+ [JsonPropertyName("join_timestamp")]
+ public DateTimeOffset JoinTimestamp { get; }
+
+ ///
+ /// Any user-thread settings, currently only used for notifications.
+ ///
+ [JsonPropertyName("flags")]
+ public int Flags { get; }
+ }
+}
diff --git a/src/Models/Channel/Thread/ThreadMetadata.cs b/src/Models/Channel/Thread/ThreadMetadata.cs
new file mode 100644
index 000000000..dd653de38
--- /dev/null
+++ b/src/Models/Channel/Thread/ThreadMetadata.cs
@@ -0,0 +1,59 @@
+using System;
+using System.Text.Json.Serialization;
+
+namespace Discord.Net.Models
+{
+ ///
+ /// Represents a thread metadata object.
+ ///
+ public record ThreadMetadata
+ {
+ ///
+ /// Creates a with the provided parameters.
+ ///
+ /// Whether the thread is archived.
+ /// Id of the user that last archived or unarchived the thread.
+ /// Duration in minutes to automatically archive the thread after recent activity, can be set to: 60, 1440, 4320, 10080.
+ /// Timestamp when the thread's archive status was last changed, used for calculating recent activity.
+ /// When a thread is locked, only users with MANAGE_THREADS can unarchive it.
+ [JsonConstructor]
+ public ThreadMetadata(bool archived, Optional archiverId, int autoArchiveDuration, DateTimeOffset archiveTimestamp, Optional locked)
+ {
+ Archived = archived;
+ ArchiverId = archiverId;
+ AutoArchiveDuration = autoArchiveDuration;
+ ArchiveTimestamp = archiveTimestamp;
+ Locked = locked;
+ }
+
+ ///
+ /// Whether the thread is archived.
+ ///
+ [JsonPropertyName("archived")]
+ public bool Archived { get; }
+
+ ///
+ /// Id of the user that last archived or unarchived the thread.
+ ///
+ [JsonPropertyName("archiver_id")]
+ public Optional ArchiverId { get; }
+
+ ///
+ /// Duration in minutes to automatically archive the thread after recent activity, can be set to: 60, 1440, 4320, 10080.
+ ///
+ [JsonPropertyName("auto_archive_duration")]
+ public int AutoArchiveDuration { get; }
+
+ ///
+ /// Timestamp when the thread's archive status was last changed, used for calculating recent activity.
+ ///
+ [JsonPropertyName("archive_timestamp")]
+ public DateTimeOffset ArchiveTimestamp { get; }
+
+ ///
+ /// When a thread is locked, only users with MANAGE_THREADS can unarchive it.
+ ///
+ [JsonPropertyName("locked")]
+ public Optional Locked { get; }
+ }
+}
diff --git a/src/Models/Channel/VideoQualityMode.cs b/src/Models/Channel/VideoQualityMode.cs
new file mode 100644
index 000000000..eecee2002
--- /dev/null
+++ b/src/Models/Channel/VideoQualityMode.cs
@@ -0,0 +1,21 @@
+using System;
+
+namespace Discord.Net.Models
+{
+ ///
+ /// Represents the video quality mode type.
+ ///
+ [Flags]
+ public enum VideoQualityMode
+ {
+ ///
+ /// Discord chooses the quality for optimal performance.
+ ///
+ Auto = 1,
+
+ ///
+ /// 720p.
+ ///
+ Full = 2,
+ }
+}
diff --git a/src/Models/Discord.Net.Models.csproj b/src/Models/Discord.Net.Models.csproj
index b01c93952..4b0e96a5a 100644
--- a/src/Models/Discord.Net.Models.csproj
+++ b/src/Models/Discord.Net.Models.csproj
@@ -12,5 +12,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Models/Emoji/Emoji.cs b/src/Models/Emoji/Emoji.cs
new file mode 100644
index 000000000..b66d7da40
--- /dev/null
+++ b/src/Models/Emoji/Emoji.cs
@@ -0,0 +1,85 @@
+using System.Text.Json.Serialization;
+
+namespace Discord.Net.Models
+{
+ ///
+ /// Represents a emoji object.
+ ///
+ public record Emoji
+ {
+ ///
+ /// Creates a with the provided parameters.
+ ///
+ /// Emoji id.
+ /// Emoji name.
+ /// Roles allowed to use this emoji.
+ /// User that created this emoji.
+ /// Whether this emoji must be wrapped in colons.
+ /// Whether this emoji is managed.
+ /// Whether this emoji is animated.
+ /// Whether this emoji can be used, may be false due to loss of Server Boosts.
+ [JsonConstructor]
+ public Emoji(Snowflake? id, string? name, Optional roles, Optional user, Optional requireColons, Optional managed, Optional animated, Optional available)
+ {
+ Id = id;
+ Name = name;
+ Roles = roles;
+ User = user;
+ RequireColons = requireColons;
+ Managed = managed;
+ Animated = animated;
+ Available = available;
+ }
+
+ ///
+ /// Emoji id.
+ ///
+ [JsonPropertyName("id")]
+ public Snowflake? Id { get; }
+
+ ///
+ /// Emoji name.
+ ///
+ ///
+ /// Can be null only in reaction emoji objects.
+ ///
+ [JsonPropertyName("name")]
+ public string? Name { get; }
+
+ ///
+ /// Roles allowed to use this emoji.
+ ///
+ [JsonPropertyName("roles")]
+ public Optional Roles { get; }
+
+ ///
+ /// User that created this emoji.
+ ///
+ [JsonPropertyName("user")]
+ public Optional User { get; }
+
+ ///
+ /// Whether this emoji must be wrapped in colons.
+ ///
+ [JsonPropertyName("require_colons")]
+ public Optional RequireColons { get; }
+
+ ///
+ /// Whether this emoji is managed.
+ ///
+ [JsonPropertyName("managed")]
+ public Optional Managed { get; }
+
+ ///
+ /// Whether this emoji is animated.
+ ///
+ [JsonPropertyName("animated")]
+ public Optional Animated { get; }
+
+ ///
+ /// Whether this emoji can be used, may be false due to loss of Server Boosts.
+ ///
+ [JsonPropertyName("available")]
+ public Optional Available { get; }
+ }
+}
diff --git a/src/Models/Guild/Ban.cs b/src/Models/Guild/Ban.cs
new file mode 100644
index 000000000..6fac4bb22
--- /dev/null
+++ b/src/Models/Guild/Ban.cs
@@ -0,0 +1,34 @@
+using System.Text.Json.Serialization;
+
+namespace Discord.Net.Models
+{
+ ///
+ /// Represents a ban object.
+ ///
+ public record Ban
+ {
+ ///
+ /// Creates a with the provided parameters.
+ ///
+ /// The reason for the ban.
+ /// The banned user.
+ [JsonConstructor]
+ public Ban(string? reason, User user)
+ {
+ Reason = reason;
+ User = user;
+ }
+
+ ///
+ /// The reason for the ban.
+ ///
+ [JsonPropertyName("reason")]
+ public string? Reason { get; }
+
+ ///
+ /// The banned user.
+ ///
+ [JsonPropertyName("user")]
+ public User User { get; }
+ }
+}
diff --git a/src/Models/Guild/DefaultMessageNotificationLevel.cs b/src/Models/Guild/DefaultMessageNotificationLevel.cs
new file mode 100644
index 000000000..9181de598
--- /dev/null
+++ b/src/Models/Guild/DefaultMessageNotificationLevel.cs
@@ -0,0 +1,20 @@
+using System;
+
+namespace Discord.Net.Models
+{
+ ///
+ /// Represents the default message notification level.
+ ///
+ public enum DefaultMessageNotificationLevel
+ {
+ ///
+ /// Members will receive notifications for all messages by default.
+ ///
+ AllMessages = 0,
+
+ ///
+ /// Members will receive notifications only for messages that @mention them by default.
+ ///
+ OnlyMentions = 1,
+ }
+}
diff --git a/src/Models/Guild/ExplicitContentFilterLevel.cs b/src/Models/Guild/ExplicitContentFilterLevel.cs
new file mode 100644
index 000000000..6bed9d43e
--- /dev/null
+++ b/src/Models/Guild/ExplicitContentFilterLevel.cs
@@ -0,0 +1,25 @@
+using System;
+
+namespace Discord.Net.Models
+{
+ ///
+ /// Represents the explicit content filter level.
+ ///
+ public enum ExplicitContentFilterLevel
+ {
+ ///
+ /// Media content will not be scanned.
+ ///
+ Disabled = 0,
+
+ ///
+ /// Media content sent by members without roles will be scanned.
+ ///
+ MembersWithoutRoles = 1,
+
+ ///
+ /// Media content sent by all members will be scanned.
+ ///
+ AllMembers = 2,
+ }
+}
diff --git a/src/Models/Guild/Guild.cs b/src/Models/Guild/Guild.cs
new file mode 100644
index 000000000..7de22b4ee
--- /dev/null
+++ b/src/Models/Guild/Guild.cs
@@ -0,0 +1,411 @@
+using System;
+using System.Text.Json.Serialization;
+
+namespace Discord.Net.Models
+{
+ ///
+ /// Represents a guild object.
+ ///
+ public record Guild
+ {
+ ///
+ /// Creates a with the provided parameters.
+ ///
+ /// Guild id.
+ /// Guild name (2-100 characters, excluding trailing and leading whitespace).
+ /// Icon hash.
+ /// Icon hash, returned when in the template object.
+ /// Splash hash.
+ /// Discovery splash hash; only present for guilds with the "DISCOVERABLE" feature.
+ /// True if the user is the owner of the guild.
+ /// Id of owner.
+ /// Total permissions for the user in the guild (excludes overwrites).
+ /// Voice region id for the guild.
+ /// Id of afk channel.
+ /// Afk timeout in seconds.
+ /// True if the server widget is enabled.
+ /// The channel id that the widget will generate an invite to, or null if set to no invite.
+ /// Verification level required for the guild.
+ /// Default message notifications level.
+ /// Explicit content filter level.
+ /// Roles in the guild.
+ /// Custom guild emojis.
+ /// Enabled guild features.
+ /// Required MFA level for the guild.
+ /// Application id of the guild creator if it is bot-created.
+ /// The id of the channel where guild notices such as welcome messages and boost events are posted.
+ /// System channel flags.
+ /// The id of the channel where Community guilds can display rules and/or guidelines.
+ /// When this guild was joined at.
+ /// True if this is considered a large guild.
+ /// True if this guild is unavailable due to an outage.
+ /// Total number of members in this guild.
+ /// States of members currently in voice channels; lacks the guild_id key.
+ /// Users in the guild.
+ /// Channels in the guild.
+ /// All active threads in the guild that current user has permission to view.
+ /// Presences of the members in the guild, will only include non-offline members if the size is greater than large threshold.
+ /// The maximum number of presences for the guild (the default value, currently 25000, is in effect when null is returned).
+ /// The maximum number of members for the guild.
+ /// The vanity url code for the guild.
+ /// The description of a Community guild.
+ /// Banner hash.
+ /// Premium tier (Server Boost level).
+ /// The number of boosts this guild currently has.
+ /// The preferred locale of a Community guild; used in server discovery and notices from Discord; defaults to "en-US".
+ /// The id of the channel where admins and moderators of Community guilds receive notices from Discord.
+ /// The maximum amount of users in a video channel.
+ /// Approximate number of members in this guild.
+ /// Approximate number of non-offline members in this guild.
+ /// The welcome screen of a Community guild, shown to new members, returned in an Invite's guild object.
+ /// Guild NSFW level.
+ /// Stage instances in the guild.
+ [JsonConstructor]
+ public Guild(Snowflake id, string name, string? icon, Optional iconHash, string? splash, string? discoverySplash, Optional owner, Snowflake ownerId, Optional permissions, string region, Snowflake? afkChannelId, int afkTimeout, Optional widgetEnabled, Optional widgetChannelId, int verificationLevel, int defaultMessageNotifications, int explicitContentFilter, Role[] roles, Emoji[] emojis, string[] features, int mfaLevel, Snowflake? applicationId, Snowflake? systemChannelId, int systemChannelFlags, Snowflake? rulesChannelId, Optional joinedAt, Optional large, Optional unavailable, Optional memberCount, Optional voiceStates, Optional members, Optional channels, Optional threads, Optional presences, Optional maxPresences, Optional maxMembers, string? vanityUrlCode, string? description, string? banner, int premiumTier, Optional premiumSubscriptionCount, string preferredLocale, Snowflake? publicUpdatesChannelId, Optional maxVideoChannelUsers, Optional approximateMemberCount, Optional approximatePresenceCount, Optional