Use ByteSize for file size in attachments

This commit is contained in:
Alexey Golub
2019-03-03 16:38:41 +02:00
parent 019278f6d4
commit a564906719
6 changed files with 12 additions and 21 deletions

View File

@@ -1,4 +1,6 @@
namespace DiscordChatExporter.Core.Models
using ByteSizeLib;
namespace DiscordChatExporter.Core.Models
{
// https://discordapp.com/developers/docs/resources/channel#attachment-object
@@ -16,9 +18,9 @@
public string FileName { get; }
public long FileSize { get; }
public ByteSize FileSize { get; }
public Attachment(string id, int? width, int? height, string url, string fileName, long fileSize)
public Attachment(string id, int? width, int? height, string url, string fileName, ByteSize fileSize)
{
Id = id;
Url = url;