Extension for VkNet to quickly create bots.
Package Manager
PM> Install-Package VkNet.FluentCommands.GroupBot
.NET CLI
> dotnet add package VkNet.FluentCommands.GroupBot
using VkNet.FluentCommands.GroupBot;
//...
FluentGroupBotCommands commands = new FluentGroupBotCommands();
commands.ConfigureGroupLongPoll(000000U);
await commands.InitBotAsync("very big group token");
commands.OnText("^ping$", "pong");
commands.OnText("^hello$", new[] {"hi!", "hey!", "good day!"});
commands.OnText("command not found");
commands.OnException((e, token) =>
{
Console.WriteLine("Wake up, everything is broken");
Console.WriteLine($"[{DateTime.UtcNow}] {e.Message} {Environment.NewLine} {e.StackTrace}");
return Task.CompletedTask;
});
await commands.ReceiveMessageAsync();
See the wiki for all features.