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:
@@ -14,7 +14,8 @@ class Rules : CommonHandler
|
||||
{
|
||||
private readonly RulesService _rulesService;
|
||||
|
||||
[Command(InChat.Public, "setrules", CommandParseMode.Both)]
|
||||
[InChat(InChat.Public)]
|
||||
[Command("setrules", CommandParseMode.Both)]
|
||||
public async Task HandleSetRules()
|
||||
{
|
||||
var replyToMessage = Message?.ReplyToMessage;
|
||||
@@ -27,7 +28,8 @@ class Rules : CommonHandler
|
||||
await _rulesService.SetRulesAsync(Chat, replyToMessage.MessageId);
|
||||
}
|
||||
|
||||
[Command(InChat.Public, "rules", CommandParseMode.Both)]
|
||||
[InChat(InChat.Public)]
|
||||
[Command("rules", CommandParseMode.Both)]
|
||||
public async Task HandleRules()
|
||||
{
|
||||
if (!await _rulesService.HasRulesAsync(Chat))
|
||||
|
||||
Reference in New Issue
Block a user