|
|
@@ -23,8 +23,13 @@ namespace Discord |
|
|
|
public int? Width { get; } |
|
|
|
/// <inheritdoc /> |
|
|
|
public bool Ephemeral { get; } |
|
|
|
/// <inheritdoc /> |
|
|
|
public string Description { get; } |
|
|
|
/// <inheritdoc /> |
|
|
|
public string ContentType { get; } |
|
|
|
|
|
|
|
internal Attachment(ulong id, string filename, string url, string proxyUrl, int size, int? height, int? width, bool? ephemeral) |
|
|
|
internal Attachment(ulong id, string filename, string url, string proxyUrl, int size, int? height, int? width, |
|
|
|
bool? ephemeral, string description, string contentType) |
|
|
|
{ |
|
|
|
Id = id; |
|
|
|
Filename = filename; |
|
|
@@ -34,13 +39,16 @@ namespace Discord |
|
|
|
Height = height; |
|
|
|
Width = width; |
|
|
|
Ephemeral = ephemeral.GetValueOrDefault(false); |
|
|
|
Description = description; |
|
|
|
ContentType = contentType; |
|
|
|
} |
|
|
|
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.Ephemeral.ToNullable()); |
|
|
|
model.Ephemeral.ToNullable(), model.Description.GetValueOrDefault(), |
|
|
|
model.ContentType.GetValueOrDefault()); |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary> |
|
|
|