Extension for VkNet to quickly create bots.
Package Manager
PM> Install-Package VkNet.FluentCommands.UserBot
.NET CLI
> dotnet add package VkNet.FluentCommands.UserBot
using VkNet.FluentCommands.UserBot;
//...
FluentUserBotCommands commands = new FluentUserBotCommands();
await commands.InitBotAsync("login", "very hard password");
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.