Skip to content

VaryaGet/teleroute

Repository files navigation

EO principles respected here

codecov Codacy Badge

Description

This is C# port of Java teleroute library

IRoute and ICmd interfaces return IEnumerable, that contains one element or nothing. This is done to avoid null checks in the code.

// find suitable command for update in route tree
IEnumerable<YourCommand> command = route.Route(update);

if(!command.Any())
{
  // not found processing or just ignore
}

IEnumerable<YourSend> send = command.Single().Execute(update);

// send your message to Telegram
send.Single().Send(yourTgClient);

About

Flexible telegram bot update routing library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages