Made API models internal. Removed Discord.Net.API.
This commit is contained in:
24
src/Discord.Net.Rest/API/Common/Application.cs
Normal file
24
src/Discord.Net.Rest/API/Common/Application.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
#pragma warning disable CS1591
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Discord.API
|
||||
{
|
||||
internal class Application
|
||||
{
|
||||
[JsonProperty("description")]
|
||||
public string Description { get; set; }
|
||||
[JsonProperty("rpc_origins")]
|
||||
public string[] RPCOrigins { get; set; }
|
||||
[JsonProperty("name")]
|
||||
public string Name { get; set; }
|
||||
[JsonProperty("id")]
|
||||
public ulong Id { get; set; }
|
||||
[JsonProperty("icon")]
|
||||
public string Icon { get; set; }
|
||||
|
||||
[JsonProperty("flags"), Int53]
|
||||
public Optional<ulong> Flags { get; set; }
|
||||
[JsonProperty("owner")]
|
||||
public Optional<User> Owner { get; set; }
|
||||
}
|
||||
}
|
||||
23
src/Discord.Net.Rest/API/Common/Attachment.cs
Normal file
23
src/Discord.Net.Rest/API/Common/Attachment.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
#pragma warning disable CS1591
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Discord.API
|
||||
{
|
||||
internal class Attachment
|
||||
{
|
||||
[JsonProperty("id")]
|
||||
public ulong Id { get; set; }
|
||||
[JsonProperty("filename")]
|
||||
public string Filename { get; set; }
|
||||
[JsonProperty("size")]
|
||||
public int Size { get; set; }
|
||||
[JsonProperty("url")]
|
||||
public string Url { get; set; }
|
||||
[JsonProperty("proxy_url")]
|
||||
public string ProxyUrl { get; set; }
|
||||
[JsonProperty("height")]
|
||||
public Optional<int> Height { get; set; }
|
||||
[JsonProperty("width")]
|
||||
public Optional<int> Width { get; set; }
|
||||
}
|
||||
}
|
||||
13
src/Discord.Net.Rest/API/Common/Ban.cs
Normal file
13
src/Discord.Net.Rest/API/Common/Ban.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
#pragma warning disable CS1591
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Discord.API
|
||||
{
|
||||
internal class Ban
|
||||
{
|
||||
[JsonProperty("user")]
|
||||
public User User { get; set; }
|
||||
[JsonProperty("reason")]
|
||||
public string Reason { get; set; }
|
||||
}
|
||||
}
|
||||
47
src/Discord.Net.Rest/API/Common/Channel.cs
Normal file
47
src/Discord.Net.Rest/API/Common/Channel.cs
Normal file
@@ -0,0 +1,47 @@
|
||||
#pragma warning disable CS1591
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
|
||||
namespace Discord.API
|
||||
{
|
||||
internal class Channel
|
||||
{
|
||||
//Shared
|
||||
[JsonProperty("id")]
|
||||
public ulong Id { get; set; }
|
||||
[JsonProperty("type")]
|
||||
public ChannelType Type { get; set; }
|
||||
[JsonProperty("last_message_id")]
|
||||
public ulong? LastMessageId { get; set; }
|
||||
|
||||
//GuildChannel
|
||||
[JsonProperty("guild_id")]
|
||||
public Optional<ulong> GuildId { get; set; }
|
||||
[JsonProperty("name")]
|
||||
public Optional<string> Name { get; set; }
|
||||
[JsonProperty("position")]
|
||||
public Optional<int> Position { get; set; }
|
||||
[JsonProperty("permission_overwrites")]
|
||||
public Optional<Overwrite[]> PermissionOverwrites { get; set; }
|
||||
|
||||
//TextChannel
|
||||
[JsonProperty("topic")]
|
||||
public Optional<string> Topic { get; set; }
|
||||
[JsonProperty("last_pin_timestamp")]
|
||||
public Optional<DateTimeOffset?> LastPinTimestamp { get; set; }
|
||||
|
||||
//VoiceChannel
|
||||
[JsonProperty("bitrate")]
|
||||
public Optional<int> Bitrate { get; set; }
|
||||
[JsonProperty("user_limit")]
|
||||
public Optional<int> UserLimit { get; set; }
|
||||
|
||||
//PrivateChannel
|
||||
[JsonProperty("recipients")]
|
||||
public Optional<User[]> Recipients { get; set; }
|
||||
|
||||
//GroupChannel
|
||||
[JsonProperty("icon")]
|
||||
public Optional<string> Icon { get; set; }
|
||||
}
|
||||
}
|
||||
21
src/Discord.Net.Rest/API/Common/Connection.cs
Normal file
21
src/Discord.Net.Rest/API/Common/Connection.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
#pragma warning disable CS1591
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Discord.API
|
||||
{
|
||||
internal class Connection
|
||||
{
|
||||
[JsonProperty("id")]
|
||||
public string Id { get; set; }
|
||||
[JsonProperty("type")]
|
||||
public string Type { get; set; }
|
||||
[JsonProperty("name")]
|
||||
public string Name { get; set; }
|
||||
[JsonProperty("revoked")]
|
||||
public bool Revoked { get; set; }
|
||||
|
||||
[JsonProperty("integrations")]
|
||||
public IReadOnlyCollection<ulong> Integrations { get; set; }
|
||||
}
|
||||
}
|
||||
36
src/Discord.Net.Rest/API/Common/Embed.cs
Normal file
36
src/Discord.Net.Rest/API/Common/Embed.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
#pragma warning disable CS1591
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Discord.API
|
||||
{
|
||||
internal class Embed
|
||||
{
|
||||
[JsonProperty("title")]
|
||||
public string Title { get; set; }
|
||||
[JsonProperty("type")]
|
||||
public string Type { get; set; }
|
||||
[JsonProperty("description")]
|
||||
public string Description { get; set; }
|
||||
[JsonProperty("url")]
|
||||
public string Url { get; set; }
|
||||
[JsonProperty("color")]
|
||||
public uint? Color { get; set; }
|
||||
[JsonProperty("timestamp")]
|
||||
public DateTimeOffset? Timestamp { get; set; }
|
||||
[JsonProperty("author")]
|
||||
public Optional<EmbedAuthor> Author { get; set; }
|
||||
[JsonProperty("footer")]
|
||||
public Optional<EmbedFooter> Footer { get; set; }
|
||||
[JsonProperty("video")]
|
||||
public Optional<EmbedVideo> Video { get; set; }
|
||||
[JsonProperty("thumbnail")]
|
||||
public Optional<EmbedThumbnail> Thumbnail { get; set; }
|
||||
[JsonProperty("image")]
|
||||
public Optional<EmbedImage> Image { get; set; }
|
||||
[JsonProperty("provider")]
|
||||
public Optional<EmbedProvider> Provider { get; set; }
|
||||
[JsonProperty("fields")]
|
||||
public Optional<EmbedField[]> Fields { get; set; }
|
||||
}
|
||||
}
|
||||
16
src/Discord.Net.Rest/API/Common/EmbedAuthor.cs
Normal file
16
src/Discord.Net.Rest/API/Common/EmbedAuthor.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Discord.API
|
||||
{
|
||||
internal class EmbedAuthor
|
||||
{
|
||||
[JsonProperty("name")]
|
||||
public string Name { get; set; }
|
||||
[JsonProperty("url")]
|
||||
public string Url { get; set; }
|
||||
[JsonProperty("icon_url")]
|
||||
public string IconUrl { get; set; }
|
||||
[JsonProperty("proxy_icon_url")]
|
||||
public string ProxyIconUrl { get; set; }
|
||||
}
|
||||
}
|
||||
14
src/Discord.Net.Rest/API/Common/EmbedField.cs
Normal file
14
src/Discord.Net.Rest/API/Common/EmbedField.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Discord.API
|
||||
{
|
||||
internal class EmbedField
|
||||
{
|
||||
[JsonProperty("name")]
|
||||
public string Name { get; set; }
|
||||
[JsonProperty("value")]
|
||||
public string Value { get; set; }
|
||||
[JsonProperty("inline")]
|
||||
public bool Inline { get; set; }
|
||||
}
|
||||
}
|
||||
14
src/Discord.Net.Rest/API/Common/EmbedFooter.cs
Normal file
14
src/Discord.Net.Rest/API/Common/EmbedFooter.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Discord.API
|
||||
{
|
||||
internal class EmbedFooter
|
||||
{
|
||||
[JsonProperty("text")]
|
||||
public string Text { get; set; }
|
||||
[JsonProperty("icon_url")]
|
||||
public string IconUrl { get; set; }
|
||||
[JsonProperty("proxy_icon_url")]
|
||||
public string ProxyIconUrl { get; set; }
|
||||
}
|
||||
}
|
||||
17
src/Discord.Net.Rest/API/Common/EmbedImage.cs
Normal file
17
src/Discord.Net.Rest/API/Common/EmbedImage.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
#pragma warning disable CS1591
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Discord.API
|
||||
{
|
||||
internal class EmbedImage
|
||||
{
|
||||
[JsonProperty("url")]
|
||||
public string Url { get; set; }
|
||||
[JsonProperty("proxy_url")]
|
||||
public string ProxyUrl { get; set; }
|
||||
[JsonProperty("height")]
|
||||
public Optional<int> Height { get; set; }
|
||||
[JsonProperty("width")]
|
||||
public Optional<int> Width { get; set; }
|
||||
}
|
||||
}
|
||||
13
src/Discord.Net.Rest/API/Common/EmbedProvider.cs
Normal file
13
src/Discord.Net.Rest/API/Common/EmbedProvider.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
#pragma warning disable CS1591
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Discord.API
|
||||
{
|
||||
internal class EmbedProvider
|
||||
{
|
||||
[JsonProperty("name")]
|
||||
public string Name { get; set; }
|
||||
[JsonProperty("url")]
|
||||
public string Url { get; set; }
|
||||
}
|
||||
}
|
||||
17
src/Discord.Net.Rest/API/Common/EmbedThumbnail.cs
Normal file
17
src/Discord.Net.Rest/API/Common/EmbedThumbnail.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
#pragma warning disable CS1591
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Discord.API
|
||||
{
|
||||
internal class EmbedThumbnail
|
||||
{
|
||||
[JsonProperty("url")]
|
||||
public string Url { get; set; }
|
||||
[JsonProperty("proxy_url")]
|
||||
public string ProxyUrl { get; set; }
|
||||
[JsonProperty("height")]
|
||||
public Optional<int> Height { get; set; }
|
||||
[JsonProperty("width")]
|
||||
public Optional<int> Width { get; set; }
|
||||
}
|
||||
}
|
||||
15
src/Discord.Net.Rest/API/Common/EmbedVideo.cs
Normal file
15
src/Discord.Net.Rest/API/Common/EmbedVideo.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
#pragma warning disable CS1591
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Discord.API
|
||||
{
|
||||
internal class EmbedVideo
|
||||
{
|
||||
[JsonProperty("url")]
|
||||
public string Url { get; set; }
|
||||
[JsonProperty("height")]
|
||||
public Optional<int> Height { get; set; }
|
||||
[JsonProperty("width")]
|
||||
public Optional<int> Width { get; set; }
|
||||
}
|
||||
}
|
||||
19
src/Discord.Net.Rest/API/Common/Emoji.cs
Normal file
19
src/Discord.Net.Rest/API/Common/Emoji.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
#pragma warning disable CS1591
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Discord.API
|
||||
{
|
||||
internal class Emoji
|
||||
{
|
||||
[JsonProperty("id")]
|
||||
public ulong? Id { get; set; }
|
||||
[JsonProperty("name")]
|
||||
public string Name { get; set; }
|
||||
[JsonProperty("roles")]
|
||||
public ulong[] Roles { get; set; }
|
||||
[JsonProperty("require_colons")]
|
||||
public bool RequireColons { get; set; }
|
||||
[JsonProperty("managed")]
|
||||
public bool Managed { get; set; }
|
||||
}
|
||||
}
|
||||
23
src/Discord.Net.Rest/API/Common/Game.cs
Normal file
23
src/Discord.Net.Rest/API/Common/Game.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
#pragma warning disable CS1591
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Serialization;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace Discord.API
|
||||
{
|
||||
internal class Game
|
||||
{
|
||||
[JsonProperty("name")]
|
||||
public string Name { get; set; }
|
||||
[JsonProperty("url")]
|
||||
public Optional<string> StreamUrl { get; set; }
|
||||
[JsonProperty("type")]
|
||||
public Optional<StreamType?> StreamType { get; set; }
|
||||
|
||||
[OnError]
|
||||
internal void OnError(StreamingContext context, ErrorContext errorContext)
|
||||
{
|
||||
errorContext.Handled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
43
src/Discord.Net.Rest/API/Common/Guild.cs
Normal file
43
src/Discord.Net.Rest/API/Common/Guild.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
#pragma warning disable CS1591
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Discord.API
|
||||
{
|
||||
internal class Guild
|
||||
{
|
||||
[JsonProperty("id")]
|
||||
public ulong Id { get; set; }
|
||||
[JsonProperty("name")]
|
||||
public string Name { get; set; }
|
||||
[JsonProperty("icon")]
|
||||
public string Icon { get; set; }
|
||||
[JsonProperty("splash")]
|
||||
public string Splash { get; set; }
|
||||
[JsonProperty("owner_id")]
|
||||
public ulong OwnerId { get; set; }
|
||||
[JsonProperty("region")]
|
||||
public string Region { get; set; }
|
||||
[JsonProperty("afk_channel_id")]
|
||||
public ulong? AFKChannelId { get; set; }
|
||||
[JsonProperty("afk_timeout")]
|
||||
public int AFKTimeout { get; set; }
|
||||
[JsonProperty("embed_enabled")]
|
||||
public bool EmbedEnabled { get; set; }
|
||||
[JsonProperty("embed_channel_id")]
|
||||
public ulong? EmbedChannelId { get; set; }
|
||||
[JsonProperty("verification_level")]
|
||||
public VerificationLevel VerificationLevel { get; set; }
|
||||
[JsonProperty("voice_states")]
|
||||
public VoiceState[] VoiceStates { get; set; }
|
||||
[JsonProperty("roles")]
|
||||
public Role[] Roles { get; set; }
|
||||
[JsonProperty("emojis")]
|
||||
public Emoji[] Emojis { get; set; }
|
||||
[JsonProperty("features")]
|
||||
public string[] Features { get; set; }
|
||||
[JsonProperty("mfa_level")]
|
||||
public MfaLevel MfaLevel { get; set; }
|
||||
[JsonProperty("default_message_notifications")]
|
||||
public DefaultMessageNotifications DefaultMessageNotifications { get; set; }
|
||||
}
|
||||
}
|
||||
13
src/Discord.Net.Rest/API/Common/GuildEmbed.cs
Normal file
13
src/Discord.Net.Rest/API/Common/GuildEmbed.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
#pragma warning disable CS1591
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Discord.API
|
||||
{
|
||||
internal class GuildEmbed
|
||||
{
|
||||
[JsonProperty("enabled")]
|
||||
public bool Enabled { get; set; }
|
||||
[JsonProperty("channel_id")]
|
||||
public ulong ChannelId { get; set; }
|
||||
}
|
||||
}
|
||||
22
src/Discord.Net.Rest/API/Common/GuildMember.cs
Normal file
22
src/Discord.Net.Rest/API/Common/GuildMember.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
#pragma warning disable CS1591
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
|
||||
namespace Discord.API
|
||||
{
|
||||
internal class GuildMember
|
||||
{
|
||||
[JsonProperty("user")]
|
||||
public User User { get; set; }
|
||||
[JsonProperty("nick")]
|
||||
public Optional<string> Nick { get; set; }
|
||||
[JsonProperty("roles")]
|
||||
public ulong[] Roles { get; set; }
|
||||
[JsonProperty("joined_at")]
|
||||
public DateTimeOffset JoinedAt { get; set; }
|
||||
[JsonProperty("deaf")]
|
||||
public bool Deaf { get; set; }
|
||||
[JsonProperty("mute")]
|
||||
public bool Mute { get; set; }
|
||||
}
|
||||
}
|
||||
32
src/Discord.Net.Rest/API/Common/Integration.cs
Normal file
32
src/Discord.Net.Rest/API/Common/Integration.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
#pragma warning disable CS1591
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
|
||||
namespace Discord.API
|
||||
{
|
||||
internal class Integration
|
||||
{
|
||||
[JsonProperty("id")]
|
||||
public ulong Id { get; set; }
|
||||
[JsonProperty("name")]
|
||||
public string Name { get; set; }
|
||||
[JsonProperty("type")]
|
||||
public string Type { get; set; }
|
||||
[JsonProperty("enabled")]
|
||||
public bool Enabled { get; set; }
|
||||
[JsonProperty("syncing")]
|
||||
public bool Syncing { get; set; }
|
||||
[JsonProperty("role_id")]
|
||||
public ulong RoleId { get; set; }
|
||||
[JsonProperty("expire_behavior")]
|
||||
public ulong ExpireBehavior { get; set; }
|
||||
[JsonProperty("expire_grace_period")]
|
||||
public ulong ExpireGracePeriod { get; set; }
|
||||
[JsonProperty("user")]
|
||||
public User User { get; set; }
|
||||
[JsonProperty("account")]
|
||||
public IntegrationAccount Account { get; set; }
|
||||
[JsonProperty("synced_at")]
|
||||
public DateTimeOffset SyncedAt { get; set; }
|
||||
}
|
||||
}
|
||||
13
src/Discord.Net.Rest/API/Common/IntegrationAccount.cs
Normal file
13
src/Discord.Net.Rest/API/Common/IntegrationAccount.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
#pragma warning disable CS1591
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Discord.API
|
||||
{
|
||||
internal class IntegrationAccount
|
||||
{
|
||||
[JsonProperty("id")]
|
||||
public ulong Id { get; set; }
|
||||
[JsonProperty("name")]
|
||||
public string Name { get; set; }
|
||||
}
|
||||
}
|
||||
15
src/Discord.Net.Rest/API/Common/Invite.cs
Normal file
15
src/Discord.Net.Rest/API/Common/Invite.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
#pragma warning disable CS1591
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Discord.API
|
||||
{
|
||||
internal class Invite
|
||||
{
|
||||
[JsonProperty("code")]
|
||||
public string Code { get; set; }
|
||||
[JsonProperty("guild")]
|
||||
public InviteGuild Guild { get; set; }
|
||||
[JsonProperty("channel")]
|
||||
public InviteChannel Channel { get; set; }
|
||||
}
|
||||
}
|
||||
15
src/Discord.Net.Rest/API/Common/InviteChannel.cs
Normal file
15
src/Discord.Net.Rest/API/Common/InviteChannel.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
#pragma warning disable CS1591
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Discord.API
|
||||
{
|
||||
internal class InviteChannel
|
||||
{
|
||||
[JsonProperty("id")]
|
||||
public ulong Id { get; set; }
|
||||
[JsonProperty("name")]
|
||||
public string Name { get; set; }
|
||||
[JsonProperty("type")]
|
||||
public string Type { get; set; }
|
||||
}
|
||||
}
|
||||
15
src/Discord.Net.Rest/API/Common/InviteGuild.cs
Normal file
15
src/Discord.Net.Rest/API/Common/InviteGuild.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
#pragma warning disable CS1591
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Discord.API
|
||||
{
|
||||
internal class InviteGuild
|
||||
{
|
||||
[JsonProperty("id")]
|
||||
public ulong Id { get; set; }
|
||||
[JsonProperty("name")]
|
||||
public string Name { get; set; }
|
||||
[JsonProperty("splash_hash")]
|
||||
public string SplashHash { get; set; }
|
||||
}
|
||||
}
|
||||
24
src/Discord.Net.Rest/API/Common/InviteMetadata.cs
Normal file
24
src/Discord.Net.Rest/API/Common/InviteMetadata.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
#pragma warning disable CS1591
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
|
||||
namespace Discord.API
|
||||
{
|
||||
internal class InviteMetadata : Invite
|
||||
{
|
||||
[JsonProperty("inviter")]
|
||||
public User Inviter { get; set; }
|
||||
[JsonProperty("uses")]
|
||||
public int Uses { get; set; }
|
||||
[JsonProperty("max_uses")]
|
||||
public int MaxUses { get; set; }
|
||||
[JsonProperty("max_age")]
|
||||
public int MaxAge { get; set; }
|
||||
[JsonProperty("temporary")]
|
||||
public bool Temporary { get; set; }
|
||||
[JsonProperty("created_at")]
|
||||
public DateTimeOffset CreatedAt { get; set; }
|
||||
[JsonProperty("revoked")]
|
||||
public bool Revoked { get; set; }
|
||||
}
|
||||
}
|
||||
42
src/Discord.Net.Rest/API/Common/Message.cs
Normal file
42
src/Discord.Net.Rest/API/Common/Message.cs
Normal file
@@ -0,0 +1,42 @@
|
||||
#pragma warning disable CS1591
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
|
||||
namespace Discord.API
|
||||
{
|
||||
internal class Message
|
||||
{
|
||||
[JsonProperty("id")]
|
||||
public ulong Id { get; set; }
|
||||
[JsonProperty("type")]
|
||||
public MessageType Type { get; set; }
|
||||
[JsonProperty("channel_id")]
|
||||
public ulong ChannelId { get; set; }
|
||||
[JsonProperty("webhook_id")]
|
||||
public Optional<ulong> WebhookId { get; set; }
|
||||
[JsonProperty("author")]
|
||||
public Optional<User> Author { get; set; }
|
||||
[JsonProperty("content")]
|
||||
public Optional<string> Content { get; set; }
|
||||
[JsonProperty("timestamp")]
|
||||
public Optional<DateTimeOffset> Timestamp { get; set; }
|
||||
[JsonProperty("edited_timestamp")]
|
||||
public Optional<DateTimeOffset?> EditedTimestamp { get; set; }
|
||||
[JsonProperty("tts")]
|
||||
public Optional<bool> IsTextToSpeech { get; set; }
|
||||
[JsonProperty("mention_everyone")]
|
||||
public Optional<bool> MentionEveryone { get; set; }
|
||||
[JsonProperty("mentions")]
|
||||
public Optional<EntityOrId<User>[]> UserMentions { get; set; }
|
||||
[JsonProperty("mention_roles")]
|
||||
public Optional<ulong[]> RoleMentions { get; set; }
|
||||
[JsonProperty("attachments")]
|
||||
public Optional<Attachment[]> Attachments { get; set; }
|
||||
[JsonProperty("embeds")]
|
||||
public Optional<Embed[]> Embeds { get; set; }
|
||||
[JsonProperty("pinned")]
|
||||
public Optional<bool> Pinned { get; set; }
|
||||
[JsonProperty("reactions")]
|
||||
public Optional<Reaction[]> Reactions { get; set; }
|
||||
}
|
||||
}
|
||||
17
src/Discord.Net.Rest/API/Common/Overwrite.cs
Normal file
17
src/Discord.Net.Rest/API/Common/Overwrite.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
#pragma warning disable CS1591
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Discord.API
|
||||
{
|
||||
internal class Overwrite
|
||||
{
|
||||
[JsonProperty("id")]
|
||||
public ulong TargetId { get; set; }
|
||||
[JsonProperty("type")]
|
||||
public PermissionTarget TargetType { get; set; }
|
||||
[JsonProperty("deny"), Int53]
|
||||
public ulong Deny { get; set; }
|
||||
[JsonProperty("allow"), Int53]
|
||||
public ulong Allow { get; set; }
|
||||
}
|
||||
}
|
||||
22
src/Discord.Net.Rest/API/Common/Presence.cs
Normal file
22
src/Discord.Net.Rest/API/Common/Presence.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
#pragma warning disable CS1591
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Discord.API
|
||||
{
|
||||
internal class Presence
|
||||
{
|
||||
[JsonProperty("user")]
|
||||
public User User { get; set; }
|
||||
[JsonProperty("guild_id")]
|
||||
public Optional<ulong> GuildId { get; set; }
|
||||
[JsonProperty("status")]
|
||||
public UserStatus Status { get; set; }
|
||||
[JsonProperty("game")]
|
||||
public Game Game { get; set; }
|
||||
|
||||
[JsonProperty("roles")]
|
||||
public Optional<ulong[]> Roles { get; set; }
|
||||
[JsonProperty("nick")]
|
||||
public Optional<string> Nick { get; set; }
|
||||
}
|
||||
}
|
||||
14
src/Discord.Net.Rest/API/Common/Reaction.cs
Normal file
14
src/Discord.Net.Rest/API/Common/Reaction.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Discord.API
|
||||
{
|
||||
internal class Reaction
|
||||
{
|
||||
[JsonProperty("count")]
|
||||
public int Count { get; set; }
|
||||
[JsonProperty("me")]
|
||||
public bool Me { get; set; }
|
||||
[JsonProperty("emoji")]
|
||||
public Emoji Emoji { get; set; }
|
||||
}
|
||||
}
|
||||
15
src/Discord.Net.Rest/API/Common/ReadState.cs
Normal file
15
src/Discord.Net.Rest/API/Common/ReadState.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
#pragma warning disable CS1591
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Discord.API
|
||||
{
|
||||
internal class ReadState
|
||||
{
|
||||
[JsonProperty("id")]
|
||||
public ulong Id { get; set; }
|
||||
[JsonProperty("mention_count")]
|
||||
public int MentionCount { get; set; }
|
||||
[JsonProperty("last_message_id")]
|
||||
public Optional<ulong> LastMessageId { get; set; }
|
||||
}
|
||||
}
|
||||
15
src/Discord.Net.Rest/API/Common/Relationship.cs
Normal file
15
src/Discord.Net.Rest/API/Common/Relationship.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
#pragma warning disable CS1591
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Discord.API
|
||||
{
|
||||
internal class Relationship
|
||||
{
|
||||
[JsonProperty("id")]
|
||||
public ulong Id { get; set; }
|
||||
[JsonProperty("user")]
|
||||
public User User { get; set; }
|
||||
[JsonProperty("type")]
|
||||
public RelationshipType Type { get; set; }
|
||||
}
|
||||
}
|
||||
11
src/Discord.Net.Rest/API/Common/RelationshipType.cs
Normal file
11
src/Discord.Net.Rest/API/Common/RelationshipType.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
#pragma warning disable CS1591
|
||||
namespace Discord.API
|
||||
{
|
||||
internal enum RelationshipType
|
||||
{
|
||||
Friend = 1,
|
||||
Blocked = 2,
|
||||
IncomingPending = 3,
|
||||
OutgoingPending = 4
|
||||
}
|
||||
}
|
||||
25
src/Discord.Net.Rest/API/Common/Role.cs
Normal file
25
src/Discord.Net.Rest/API/Common/Role.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
#pragma warning disable CS1591
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Discord.API
|
||||
{
|
||||
internal class Role
|
||||
{
|
||||
[JsonProperty("id")]
|
||||
public ulong Id { get; set; }
|
||||
[JsonProperty("name")]
|
||||
public string Name { get; set; }
|
||||
[JsonProperty("color")]
|
||||
public uint Color { get; set; }
|
||||
[JsonProperty("hoist")]
|
||||
public bool Hoist { get; set; }
|
||||
[JsonProperty("mentionable")]
|
||||
public bool Mentionable { get; set; }
|
||||
[JsonProperty("position")]
|
||||
public int Position { get; set; }
|
||||
[JsonProperty("permissions"), Int53]
|
||||
public ulong Permissions { get; set; }
|
||||
[JsonProperty("managed")]
|
||||
public bool Managed { get; set; }
|
||||
}
|
||||
}
|
||||
27
src/Discord.Net.Rest/API/Common/User.cs
Normal file
27
src/Discord.Net.Rest/API/Common/User.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
#pragma warning disable CS1591
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Discord.API
|
||||
{
|
||||
internal class User
|
||||
{
|
||||
[JsonProperty("id")]
|
||||
public ulong Id { get; set; }
|
||||
[JsonProperty("username")]
|
||||
public Optional<string> Username { get; set; }
|
||||
[JsonProperty("discriminator")]
|
||||
public Optional<string> Discriminator { get; set; }
|
||||
[JsonProperty("bot")]
|
||||
public Optional<bool> Bot { get; set; }
|
||||
[JsonProperty("avatar")]
|
||||
public Optional<string> Avatar { get; set; }
|
||||
|
||||
//CurrentUser
|
||||
[JsonProperty("verified")]
|
||||
public Optional<bool> Verified { get; set; }
|
||||
[JsonProperty("email")]
|
||||
public Optional<string> Email { get; set; }
|
||||
[JsonProperty("mfa_enabled")]
|
||||
public Optional<bool> MfaEnabled { get; set; }
|
||||
}
|
||||
}
|
||||
19
src/Discord.Net.Rest/API/Common/UserGuild.cs
Normal file
19
src/Discord.Net.Rest/API/Common/UserGuild.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
#pragma warning disable CS1591
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Discord.API
|
||||
{
|
||||
internal class UserGuild
|
||||
{
|
||||
[JsonProperty("id")]
|
||||
public ulong Id { get; set; }
|
||||
[JsonProperty("name")]
|
||||
public string Name { get; set; }
|
||||
[JsonProperty("icon")]
|
||||
public string Icon { get; set; }
|
||||
[JsonProperty("owner")]
|
||||
public bool Owner { get; set; }
|
||||
[JsonProperty("permissions"), Int53]
|
||||
public ulong Permissions { get; set; }
|
||||
}
|
||||
}
|
||||
21
src/Discord.Net.Rest/API/Common/VoiceRegion.cs
Normal file
21
src/Discord.Net.Rest/API/Common/VoiceRegion.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
#pragma warning disable CS1591
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Discord.API
|
||||
{
|
||||
internal class VoiceRegion
|
||||
{
|
||||
[JsonProperty("id")]
|
||||
public string Id { get; set; }
|
||||
[JsonProperty("name")]
|
||||
public string Name { get; set; }
|
||||
[JsonProperty("vip")]
|
||||
public bool IsVip { get; set; }
|
||||
[JsonProperty("optimal")]
|
||||
public bool IsOptimal { get; set; }
|
||||
[JsonProperty("sample_hostname")]
|
||||
public string SampleHostname { get; set; }
|
||||
[JsonProperty("sample_port")]
|
||||
public int SamplePort { get; set; }
|
||||
}
|
||||
}
|
||||
27
src/Discord.Net.Rest/API/Common/VoiceState.cs
Normal file
27
src/Discord.Net.Rest/API/Common/VoiceState.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
#pragma warning disable CS1591
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Discord.API
|
||||
{
|
||||
internal class VoiceState
|
||||
{
|
||||
[JsonProperty("guild_id")]
|
||||
public ulong? GuildId { get; set; }
|
||||
[JsonProperty("channel_id")]
|
||||
public ulong? ChannelId { get; set; }
|
||||
[JsonProperty("user_id")]
|
||||
public ulong UserId { get; set; }
|
||||
[JsonProperty("session_id")]
|
||||
public string SessionId { get; set; }
|
||||
[JsonProperty("deaf")]
|
||||
public bool Deaf { get; set; }
|
||||
[JsonProperty("mute")]
|
||||
public bool Mute { get; set; }
|
||||
[JsonProperty("self_deaf")]
|
||||
public bool SelfDeaf { get; set; }
|
||||
[JsonProperty("self_mute")]
|
||||
public bool SelfMute { get; set; }
|
||||
[JsonProperty("suppress")]
|
||||
public bool Suppress { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user