* Changed public API overview generator behaviour, now working only in DEBUG builds
* Fixed wrong LeveldDebug method calls after moving logic from providers to router * Added independent "IndentFlags" property to inner debugger class * Fixed debug logging in few places * Removed "ICollectingOptions" and merged it with new options abstract "ITelegratorOptions" * Added WebHook version of hosting class
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
using Telegrator.Hosting;
|
||||
using Telegrator.Hosting.Web;
|
||||
|
||||
namespace Telegrator.ConsoleHost.Web
|
||||
{
|
||||
public class Program
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
TelegramBotWebHostBuilder builder = TelegramBotWebHost.CreateBuilder(new TelegramBotWebOptions()
|
||||
{
|
||||
Args = args,
|
||||
WebhookUri = "https://telegrator-hooker.cloudpub.ru/bot",
|
||||
DescendDescriptorIndex = false,
|
||||
ExceptIntersectingCommandAliases = true,
|
||||
});
|
||||
|
||||
builder.Handlers.CollectHandlersAssemblyWide();
|
||||
|
||||
TelegramBotWebHost telegramBot = builder.Build();
|
||||
telegramBot.SetBotCommands();
|
||||
telegramBot.Run();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"profiles": {
|
||||
"http": {
|
||||
"commandName": "Project",
|
||||
"launchBrowser": true,
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
},
|
||||
"dotnetRunMessages": true,
|
||||
"applicationUrl": "http://localhost:5284"
|
||||
},
|
||||
"https": {
|
||||
"commandName": "Project",
|
||||
"launchBrowser": true,
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
},
|
||||
"dotnetRunMessages": true,
|
||||
"applicationUrl": "https://localhost:8080"
|
||||
},
|
||||
"IIS Express": {
|
||||
"commandName": "IISExpress",
|
||||
"launchBrowser": true,
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
}
|
||||
},
|
||||
"$schema": "http://json.schemastore.org/launchsettings.json",
|
||||
"iisSettings": {
|
||||
"windowsAuthentication": false,
|
||||
"anonymousAuthentication": true,
|
||||
"iisExpress": {
|
||||
"applicationUrl": "http://localhost:12266",
|
||||
"sslPort": 44308
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Telegrator.Hosting.Web\Telegrator.Hosting.Web.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
},
|
||||
|
||||
"TelegramBotClientOptions": {
|
||||
"Token": "7625502724:AAE5QPuX5P_lk2HwV4kdE6guoM6nsFQbe-c"
|
||||
},
|
||||
|
||||
"TelegramBotOptions": {
|
||||
"ExecuteOnlyFirstFoundHanlder": true,
|
||||
"MaximumParallelWorkingHandlers": null
|
||||
},
|
||||
|
||||
"HostOptions": {
|
||||
"ShutdownTimeout": 10,
|
||||
"BackgroundServiceExceptionBehavior": "StopHost"
|
||||
},
|
||||
|
||||
"Shapes": {
|
||||
"Token": "AX5IHZHSZMGQVEC6TILCOFLALPQRDDUWEBT8UYPH0OW"
|
||||
},
|
||||
|
||||
"AllowedHosts": "*"
|
||||
}
|
||||
Reference in New Issue
Block a user