GitHub - ariusbronte/VkNet.FluentCommands.UserBot: Extension for VkNet to quickly create bots. (original) (raw)
Extension for VkNet to quickly create bots.
How to use?
Add the package to the project
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.