2023-01-23 13:12:38 +02:00
|
|
|
using Kruzya.TelegramBot.Core;
|
2023-07-28 16:53:01 +03:00
|
|
|
using Kruzya.TelegramBot.Core.Extensions;
|
|
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
|
using West.TelegramBot.CodeWatcher.Options;
|
|
|
|
|
using West.TelegramBot.CodeWatcher.Service;
|
2022-04-20 00:38:47 +03:00
|
|
|
|
|
|
|
|
namespace West.TelegramBot.CodeWatcher
|
|
|
|
|
{
|
|
|
|
|
public class CodeWatcher : Module
|
|
|
|
|
{
|
|
|
|
|
public CodeWatcher(Core core) : base(core) {}
|
2023-07-28 16:53:01 +03:00
|
|
|
|
|
|
|
|
public override void ConfigureServices(IServiceCollection services)
|
|
|
|
|
{
|
|
|
|
|
services.AddOption<CodeWatcherMode>();
|
|
|
|
|
|
|
|
|
|
services.AddHttpClient<IHasteService, HasteService>(c =>
|
|
|
|
|
{
|
|
|
|
|
c.BaseAddress = new Uri(Core.Configuration["HastebinUrl"]!);
|
|
|
|
|
});
|
|
|
|
|
}
|
2022-04-20 00:38:47 +03:00
|
|
|
}
|
|
|
|
|
}
|