Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ba772f3f7c | |||
| ee78703cd1 |
@@ -8,6 +8,10 @@ Telegrator is a modern C# framework for building Telegram bots, inspired by AOP
|
||||
|
||||
---
|
||||
|
||||
The documentation may not be completely transparent, informative or even actual to latest version, so if you have any questions or problems, please write them in the [Telegram.Bot](https://t.me/joinchat/B35YY0QbLfd034CFnvCtCA) group. I am a member of this group and will notice you! If you have any suggestions or want to participate in building documentation, make push requests and open issues on this repository!
|
||||
|
||||
---
|
||||
|
||||
## ✨ Key Features
|
||||
|
||||
- **Aspect-oriented approach**: Handlers and filters are "aspects" of the bot, easily composable and extendable.
|
||||
|
||||
@@ -94,7 +94,7 @@ public class TelegramBotWebHostBuilder : ITelegramBotHostBuilder
|
||||
public TelegramBotWebHost Build()
|
||||
{
|
||||
TelegramBotWebHost host = new TelegramBotWebHost(_innerBuilder);
|
||||
host.UseTelegrator();
|
||||
host.UseTelegratorWeb();
|
||||
return host;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<EnforceCodeStyleInBuild>True</EnforceCodeStyleInBuild>
|
||||
|
||||
<Title>Telegrator.Hosting.Web</Title>
|
||||
<Version>1.16.6</Version>
|
||||
<Version>1.16.7</Version>
|
||||
<Authors>Rikitav Tim4ik</Authors>
|
||||
<Company>Rikitav Tim4ik</Company>
|
||||
<RepositoryUrl>https://github.com/Rikitav/Telegrator</RepositoryUrl>
|
||||
|
||||
@@ -126,7 +126,9 @@ namespace Telegrator
|
||||
/// </summary>
|
||||
public static T UseTelegratorWeb<T>(this T app) where T : IEndpointRouteBuilder, IHost
|
||||
{
|
||||
HostedUpdateWebhooker webhooker = app.ServiceProvider.GetRequiredService<HostedUpdateWebhooker>();
|
||||
if (app.ServiceProvider.GetServices<IHostedService>().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<ITelegramBotInfo>();
|
||||
IHandlersCollection handlers = app.ServiceProvider.GetRequiredService<IHandlersCollection>();
|
||||
ILoggerFactory loggerFactory = app.ServiceProvider.GetRequiredService<ILoggerFactory>();
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<EnforceCodeStyleInBuild>True</EnforceCodeStyleInBuild>
|
||||
|
||||
<Title>Telegrator.Hosting</Title>
|
||||
<Version>1.16.6</Version>
|
||||
<Version>1.16.7</Version>
|
||||
<Authors>Rikitav Tim4ik</Authors>
|
||||
<Company>Rikitav Tim4ik</Company>
|
||||
<RepositoryUrl>https://github.com/Rikitav/Telegrator</RepositoryUrl>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<EnforceCodeStyleInBuild>True</EnforceCodeStyleInBuild>
|
||||
|
||||
<Title>Telegrator : Telegram.Bot mediator framework</Title>
|
||||
<Version>1.16.6</Version>
|
||||
<Version>1.16.7</Version>
|
||||
<Authors>Rikitav Tim4ik</Authors>
|
||||
<Company>Rikitav Tim4ik</Company>
|
||||
<RepositoryUrl>https://github.com/Rikitav/Telegrator</RepositoryUrl>
|
||||
|
||||
Reference in New Issue
Block a user