mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2025-05-23 03:06:53 -04:00
parent
69fe8af87a
commit
2dd0742c1c
1 changed files with 8 additions and 3 deletions
|
@ -1,4 +1,5 @@
|
||||||
using ByteSizeLib;
|
using System;
|
||||||
|
using ByteSizeLib;
|
||||||
|
|
||||||
namespace DiscordChatExporter.Core.Models
|
namespace DiscordChatExporter.Core.Models
|
||||||
{
|
{
|
||||||
|
@ -14,10 +15,14 @@ namespace DiscordChatExporter.Core.Models
|
||||||
|
|
||||||
public int? Height { get; }
|
public int? Height { get; }
|
||||||
|
|
||||||
public bool IsImage => Width != null;
|
|
||||||
|
|
||||||
public string FileName { get; }
|
public string FileName { get; }
|
||||||
|
|
||||||
|
public bool IsImage => FileName.EndsWith(".jpg", StringComparison.OrdinalIgnoreCase) ||
|
||||||
|
FileName.EndsWith(".jpeg", StringComparison.OrdinalIgnoreCase) ||
|
||||||
|
FileName.EndsWith(".png", StringComparison.OrdinalIgnoreCase) ||
|
||||||
|
FileName.EndsWith(".gif", StringComparison.OrdinalIgnoreCase) ||
|
||||||
|
FileName.EndsWith(".bmp", StringComparison.OrdinalIgnoreCase);
|
||||||
|
|
||||||
public ByteSize FileSize { get; }
|
public ByteSize FileSize { get; }
|
||||||
|
|
||||||
public Attachment(string id, int? width, int? height, string url, string fileName, ByteSize fileSize)
|
public Attachment(string id, int? width, int? height, string url, string fileName, ByteSize fileSize)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue