Update target framework to .NET 5 & telegram-bot-framework. Update bot codebase to use the new framework API.

This commit is contained in:
West14
2021-12-25 15:17:13 +02:00
parent 73ed1d88a9
commit de08c74a5d
9 changed files with 15 additions and 10 deletions
+2 -1
View File
@@ -3,6 +3,7 @@ using System.Linq;
using System.Threading.Tasks;
using BotFramework;
using BotFramework.Attributes;
using BotFramework.Enums;
using BotFramework.Setup;
using Kruzya.TelegramBot.Core.Cache;
using Kruzya.TelegramBot.Core.Data;
@@ -24,7 +25,7 @@ namespace Kruzya.TelegramBot.UrlLimitations
dbCtx = coreContext;
}
[TextMessage(InChat.Public)]
[Message(InChat.Public, MessageFlag.HasText)]
public async Task OnMessageReceived()
{
var option = await dbCtx.UserValues.FindOption(Chat.Id, From.Id, "urlLimitations.messagesAfterJoin");