Skip to content

ariusbronte/VkNet.FluentCommands.UserBot

Repository files navigation

VkNet.FluentCommands.UserBot

Extension for VkNet to quickly create bots.

NuGet NuGet

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.

About

Extension for VkNet to quickly create bots.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages