Update to Telegram Bot Framework 2.0

This commit is contained in:
Andriy
2023-07-29 01:50:28 +03:00
parent 5d06529c92
commit 0677060429
24 changed files with 86 additions and 47 deletions
+1 -1
View File
@@ -8,7 +8,7 @@
<PropertyGroup Condition=" '$(RunConfiguration)' == 'Core' " />
<ItemGroup>
<PackageReference Include="AleXr64.BotFramework" Version="0.7.4-g573fdc8e7e" />
<PackageReference Include="AleXr64.BotFramework" Version="2.0.4-g9e14fb7bfc" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
+5 -3
View File
@@ -23,7 +23,8 @@ public class SettingsHandler : CommonHandler
_options = serviceProvider.GetServices<IOption>();
}
[Command(InChat.Public, "settings", CommandParseMode.WithUsername)]
[InChat(InChat.Public)]
[Command("settings", CommandParseMode.WithUsername)]
public async Task HandleSettings()
{
if (!await Bot.IsUserAdminAsync(Chat, From))
@@ -37,8 +38,9 @@ public class SettingsHandler : CommonHandler
replyMarkup: GetSettingsMarkup()
);
}
[Update(InChat.Public, UpdateFlag.CallbackQuery)]
[InChat(InChat.Public)]
[Update(UpdateFlag.CallbackQuery)]
public async Task HandleCallback()
{
var query = CallbackQuery;