|
|
@@ -21,8 +21,10 @@ namespace Discord |
|
|
|
public int? Height { get; } |
|
|
|
/// <inheritdoc /> |
|
|
|
public int? Width { get; } |
|
|
|
/// <inheritdoc /> |
|
|
|
public bool Ephemeral { get; } |
|
|
|
|
|
|
|
internal Attachment(ulong id, string filename, string url, string proxyUrl, int size, int? height, int? width) |
|
|
|
internal Attachment(ulong id, string filename, string url, string proxyUrl, int size, int? height, int? width, bool? ephemeral) |
|
|
|
{ |
|
|
|
Id = id; |
|
|
|
Filename = filename; |
|
|
@@ -31,12 +33,14 @@ namespace Discord |
|
|
|
Size = size; |
|
|
|
Height = height; |
|
|
|
Width = width; |
|
|
|
Ephemeral = ephemeral.GetValueOrDefault(false); |
|
|
|
} |
|
|
|
internal static Attachment Create(Model model) |
|
|
|
{ |
|
|
|
return new Attachment(model.Id, model.Filename, model.Url, model.ProxyUrl, model.Size, |
|
|
|
model.Height.IsSpecified ? model.Height.Value : (int?)null, |
|
|
|
model.Width.IsSpecified ? model.Width.Value : (int?)null); |
|
|
|
model.Width.IsSpecified ? model.Width.Value : (int?)null, |
|
|
|
model.Ephemeral.ToNullable()); |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary> |
|
|
|