mirror of
https://github.com/Bubuni-Team/telegram-bot.git
synced 2026-07-31 00:29:24 +03:00
[store] Basic content store implementation.
- Bump Telegram Bot Framework to 0.6.9-gf1e77653ff
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
using Telegram.Bot.Types;
|
||||
using Telegram.Bot.Types.Enums;
|
||||
using West.TelegramBot.ContentStore.Model;
|
||||
|
||||
namespace West.TelegramBot.ContentStore.Service;
|
||||
|
||||
public class AnimBoobsService : IRandomMediaService
|
||||
{
|
||||
private readonly HttpClient _httpClient;
|
||||
|
||||
public AnimBoobsService()
|
||||
{
|
||||
_httpClient = new HttpClient()
|
||||
{
|
||||
BaseAddress = new Uri("https://westdev.me/_boobs/")
|
||||
};
|
||||
}
|
||||
|
||||
public async Task<RandomMedia> GetRandomMediaAsync()
|
||||
{
|
||||
var fileName = await _httpClient.GetStringAsync("index.php");
|
||||
return new RandomMedia($"https://westdev.me/_boobs/media/{fileName}")
|
||||
{
|
||||
Type = InputMediaType.Video
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user