mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-13 10:48:26 -04:00
Fixed some crashes in response strings source generator, reorganized more submodules into their folders
This commit is contained in:
21
src/NadekoBot/Modules/Nsfw/_Common/DapiImageObject.cs
Normal file
21
src/NadekoBot/Modules/Nsfw/_Common/DapiImageObject.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
#nullable disable
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace NadekoBot.Modules.Nsfw.Common;
|
||||
|
||||
public class DapiImageObject : IImageData
|
||||
{
|
||||
[JsonPropertyName("File_Url")]
|
||||
public string FileUrl { get; set; }
|
||||
|
||||
public string Tags { get; set; }
|
||||
|
||||
[JsonPropertyName("Tag_String")]
|
||||
public string TagString { get; set; }
|
||||
|
||||
public int Score { get; set; }
|
||||
public string Rating { get; set; }
|
||||
|
||||
public ImageData ToCachedImageData(Booru type)
|
||||
=> new(FileUrl, type, Tags?.Split(' ') ?? TagString?.Split(' '), Score.ToString() ?? Rating);
|
||||
}
|
Reference in New Issue
Block a user