mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-13 02:38:27 -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/DerpiContainer.cs
Normal file
21
src/NadekoBot/Modules/Nsfw/_Common/DerpiContainer.cs
Normal file
@@ -0,0 +1,21 @@
|
||||
#nullable disable
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace NadekoBot.Modules.Nsfw.Common;
|
||||
|
||||
public class DerpiContainer
|
||||
{
|
||||
public DerpiImageObject[] Images { get; set; }
|
||||
}
|
||||
|
||||
public class DerpiImageObject : IImageData
|
||||
{
|
||||
[JsonPropertyName("view_url")]
|
||||
public string ViewUrl { get; set; }
|
||||
|
||||
public string[] Tags { get; set; }
|
||||
public int Score { get; set; }
|
||||
|
||||
public ImageData ToCachedImageData(Booru type)
|
||||
=> new(ViewUrl, type, Tags, Score.ToString("F1"));
|
||||
}
|
Reference in New Issue
Block a user