mirror of
https://github.com/Bubuni-Team/telegram-bot.git
synced 2026-07-31 00:29:24 +03:00
Update to Telegram Bot Framework 2.0
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user