mirror of
https://github.com/Bubuni-Team/telegram-bot.git
synced 2026-07-31 00:29:24 +03:00
33 lines
1.0 KiB
C#
33 lines
1.0 KiB
C#
using Telegram.Bot.Types;
|
|
using Telegram.Bot.Types.Enums;
|
|
using West.TelegramBot.ContentStore.Model;
|
|
using West.TelegramBot.ContentStore.Option;
|
|
|
|
namespace West.TelegramBot.ContentStore.Service;
|
|
|
|
public class AnimBoobsService : AbstractNsfwService
|
|
{
|
|
private readonly HttpClient _httpClient;
|
|
public override StoreItem StoreItem { get; } = new("anim_boobs", "Сиськи движущиеся", 120, 40);
|
|
|
|
public AnimBoobsService(AllowNsfw allowNsfw) : base(allowNsfw)
|
|
{
|
|
_httpClient = new HttpClient
|
|
{
|
|
BaseAddress = new Uri("https://westdev.me/_boobs/")
|
|
};
|
|
}
|
|
|
|
public override async Task<RandomMedia> GetRandomMediaAsync()
|
|
{
|
|
var fileName = await _httpClient.GetStringAsync("index.php");
|
|
// https://bugs.telegram.org/c/23674 workaround
|
|
var video = await _httpClient.GetStreamAsync($"https://westdev.me/_boobs/media/{fileName}");
|
|
|
|
return new RandomMedia(new InputFile(video, fileName))
|
|
{
|
|
Type = InputMediaType.Video,
|
|
Nsfw = true
|
|
};
|
|
}
|
|
} |