* Renamed "LeveledDebug" to "Alligator", cuz its funny name
* Changed debug writing to trace writing inside "Alligator" * Added "HostedTelegramBotInfo" representing hosted version of ITelegramBotInfo. Provides access to services and configuration * Filters now can acces services and configuration using new "HostedTelegramBotInfo" through context.BotInfo property
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Telegram.Bot;
|
||||
using Telegram.Bot.Types;
|
||||
using Telegrator.Configuration;
|
||||
|
||||
namespace Telegrator.Hosting
|
||||
{
|
||||
public class HostedTelegramBotInfo(ITelegramBotClient client, IServiceProvider services, IConfigurationManager configuration) : ITelegramBotInfo
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
public User User { get; } = client.GetMe().Result;
|
||||
|
||||
public IServiceProvider Services { get; } = services;
|
||||
|
||||
public IConfigurationManager Configuration { get; } = configuration;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user