diff --git a/src/Telegrator.Hosting.Web/Hosting.Web/TelegramBotWebHostBuilder.cs b/src/Telegrator.Hosting.Web/Hosting.Web/TelegramBotWebHostBuilder.cs
index 752cfd7..97f5b9b 100644
--- a/src/Telegrator.Hosting.Web/Hosting.Web/TelegramBotWebHostBuilder.cs
+++ b/src/Telegrator.Hosting.Web/Hosting.Web/TelegramBotWebHostBuilder.cs
@@ -94,7 +94,7 @@ public class TelegramBotWebHostBuilder : ITelegramBotHostBuilder
public TelegramBotWebHost Build()
{
TelegramBotWebHost host = new TelegramBotWebHost(_innerBuilder);
- host.UseTelegrator();
+ host.UseTelegratorWeb();
return host;
}
diff --git a/src/Telegrator.Hosting.Web/Telegrator.Hosting.Web.csproj b/src/Telegrator.Hosting.Web/Telegrator.Hosting.Web.csproj
index dd09b44..e7f1904 100644
--- a/src/Telegrator.Hosting.Web/Telegrator.Hosting.Web.csproj
+++ b/src/Telegrator.Hosting.Web/Telegrator.Hosting.Web.csproj
@@ -15,7 +15,7 @@
True
Telegrator.Hosting.Web
- 1.16.6
+ 1.16.7
Rikitav Tim4ik
Rikitav Tim4ik
https://github.com/Rikitav/Telegrator
diff --git a/src/Telegrator.Hosting.Web/TypesExtensions.cs b/src/Telegrator.Hosting.Web/TypesExtensions.cs
index 8317189..710af70 100644
--- a/src/Telegrator.Hosting.Web/TypesExtensions.cs
+++ b/src/Telegrator.Hosting.Web/TypesExtensions.cs
@@ -126,7 +126,9 @@ namespace Telegrator
///
public static T UseTelegratorWeb(this T app) where T : IEndpointRouteBuilder, IHost
{
- HostedUpdateWebhooker webhooker = app.ServiceProvider.GetRequiredService();
+ if (app.ServiceProvider.GetServices().FirstOrDefault(s => s is HostedUpdateWebhooker) is not HostedUpdateWebhooker webhooker)
+ throw new InvalidOperationException("No service for type 'Telegrator.Mediation.HostedUpdateWebhooker' has been registered.");
+
ITelegramBotInfo info = app.ServiceProvider.GetRequiredService();
IHandlersCollection handlers = app.ServiceProvider.GetRequiredService();
ILoggerFactory loggerFactory = app.ServiceProvider.GetRequiredService();
diff --git a/src/Telegrator.Hosting/Telegrator.Hosting.csproj b/src/Telegrator.Hosting/Telegrator.Hosting.csproj
index 8f6f61e..e28ce2c 100644
--- a/src/Telegrator.Hosting/Telegrator.Hosting.csproj
+++ b/src/Telegrator.Hosting/Telegrator.Hosting.csproj
@@ -15,7 +15,7 @@
True
Telegrator.Hosting
- 1.16.6
+ 1.16.7
Rikitav Tim4ik
Rikitav Tim4ik
https://github.com/Rikitav/Telegrator
diff --git a/src/Telegrator/Telegrator.csproj b/src/Telegrator/Telegrator.csproj
index ec54821..d2cc076 100644
--- a/src/Telegrator/Telegrator.csproj
+++ b/src/Telegrator/Telegrator.csproj
@@ -14,7 +14,7 @@
True
Telegrator : Telegram.Bot mediator framework
- 1.16.6
+ 1.16.7
Rikitav Tim4ik
Rikitav Tim4ik
https://github.com/Rikitav/Telegrator