Started converting websocket and rpc classes
This commit is contained in:
@@ -14,7 +14,7 @@ namespace Discord
|
||||
public bool RequireColons { get; }
|
||||
public IReadOnlyList<ulong> RoleIds { get; }
|
||||
|
||||
public Emoji(ulong id, string name, bool isManaged, bool requireColons, IReadOnlyList<ulong> roleIds)
|
||||
private Emoji(ulong id, string name, bool isManaged, bool requireColons, IReadOnlyList<ulong> roleIds)
|
||||
{
|
||||
Id = id;
|
||||
Name = name;
|
||||
@@ -22,7 +22,7 @@ namespace Discord
|
||||
RequireColons = requireColons;
|
||||
RoleIds = roleIds;
|
||||
}
|
||||
public static Emoji Create(Model model)
|
||||
internal static Emoji Create(Model model)
|
||||
{
|
||||
return new Emoji(model.Id, model.Name, model.Managed, model.RequireColons, ImmutableArray.Create(model.Roles));
|
||||
}
|
||||
|
||||
@@ -7,12 +7,12 @@ namespace Discord
|
||||
public string Name { get; }
|
||||
public string Url { get; }
|
||||
|
||||
public EmbedProvider(string name, string url)
|
||||
private EmbedProvider(string name, string url)
|
||||
{
|
||||
Name = name;
|
||||
Url = url;
|
||||
}
|
||||
public static EmbedProvider Create(Model model)
|
||||
internal static EmbedProvider Create(Model model)
|
||||
{
|
||||
return new EmbedProvider(model.Name, model.Url);
|
||||
}
|
||||
|
||||
@@ -9,14 +9,14 @@ namespace Discord
|
||||
public int? Height { get; }
|
||||
public int? Width { get; }
|
||||
|
||||
public EmbedThumbnail(string url, string proxyUrl, int? height, int? width)
|
||||
private EmbedThumbnail(string url, string proxyUrl, int? height, int? width)
|
||||
{
|
||||
Url = url;
|
||||
ProxyUrl = proxyUrl;
|
||||
Height = height;
|
||||
Width = width;
|
||||
}
|
||||
public static EmbedThumbnail Create(Model model)
|
||||
internal static EmbedThumbnail Create(Model model)
|
||||
{
|
||||
return new EmbedThumbnail(model.Url, model.ProxyUrl,
|
||||
model.Height.IsSpecified ? model.Height.Value : (int?)null,
|
||||
|
||||
@@ -16,9 +16,9 @@ namespace Discord
|
||||
StreamUrl = streamUrl;
|
||||
StreamType = type;
|
||||
}
|
||||
public Game(string name)
|
||||
private Game(string name)
|
||||
: this(name, null, StreamType.NotStreaming) { }
|
||||
public static Game Create(Model model)
|
||||
internal static Game Create(Model model)
|
||||
{
|
||||
return new Game(model.Name,
|
||||
model.StreamUrl.GetValueOrDefault(null),
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
Unknown,
|
||||
Online,
|
||||
Idle,
|
||||
DoNotDisturb,
|
||||
Invisible,
|
||||
Offline
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user