mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 17:58:26 -04:00
backport of public nsfw module
This commit is contained in:
19
src/NadekoBot/Modules/Nsfw/Common/Rule34Object.cs
Normal file
19
src/NadekoBot/Modules/Nsfw/Common/Rule34Object.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
namespace NadekoBot.Modules.Nsfw.Common
|
||||
{
|
||||
public class Rule34Object : IImageData
|
||||
{
|
||||
public string Image { get; init; }
|
||||
public string Directory { get; init; }
|
||||
public string Tags { get; init; }
|
||||
public int Score { get; init; }
|
||||
|
||||
public ImageData ToCachedImageData(Booru type)
|
||||
{
|
||||
return new ImageData(
|
||||
$"https://img.rule34.xxx//images/{Directory}/{Image}",
|
||||
Booru.Rule34,
|
||||
Tags.Split(' '),
|
||||
Score.ToString());
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user