Deployf.Botf 0.17.3

dotnet add package Deployf.Botf --version 0.17.3
NuGet\Install-Package Deployf.Botf -Version 0.17.3
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Deployf.Botf" Version="0.17.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Deployf.Botf --version 0.17.3
#r "nuget: Deployf.Botf, 0.17.3"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Deployf.Botf as a Cake Addin
#addin nuget:?package=Deployf.Botf&version=0.17.3

// Install Deployf.Botf as a Cake Tool
#tool nuget:?package=Deployf.Botf&version=0.17.3

BotF

Nuget GitHub CI Telegram Group

Make beautiful and clear telegram bots with the asp.net-like architecture!

BotF has next features:

🀘 long pooling and webhook mode without any changes in the code
😎 very convinient way to work with commands and reply buttons
πŸ‘† integrated pagination with buttons
πŸ†” authentication and role-based authorization
πŸ”₯ statemachine for complicated dialogs with users
πŸ•ΈοΈ asp.net-like approach to develop bots
βš’οΈ automatic creating of command menu
πŸ—“οΈ integrated DateTime picker
πŸ“€ auto sending
πŸ“² webapp native support
🚀 good performance

Documentaion

πŸ”œ Documentation is under developement. We will push it here in the readme file soon. Feel free to ask us your questions in community chat in telegram Telegram Group

▢️ There is a good video on youtube https://www.youtube.com/watch?v=hieLnm9wO6s

Install

dotnet add package Deployf.Botf

Example

Put next code into Program.cs file

using Deployf.Botf;

class Program : BotfProgram
{
    // It's boilerplate program entrypoint.
    // We just simplified all usual code into static method StartBot.
    // But in this case of starting of the bot, you should add a config section under "bot" key to appsettings.json
    public static void Main(string[] args) => StartBot(args);

    // Action attribute mean that you mark async method `Start`
    // as handler for user's text in message which equal to '/start' string.
    // You can name method as you want
    // And also, second argument of Action's attribute is a description for telegram's menu for this action
    [Action("/start", "start the bot")]
    public void Start()
    {
        // Just sending a reply message to user. Very simple, isn't?
        Push($"Send `{nameof(Hello)}` to me, please!");
    }

    [Action(nameof(Hello))]
    public void Hello()
    {
        Push("Hey! Thank you! That's it.");
    }

    // Here we handle all unknown command or just text sent from user
    [On(Handle.Unknown)]
    public async Task Unknown()
    {
        // Here, we use the so-called "buffering of sending message"
        // It means you dont need to construct all message in the string and send it once
        // You can use Push to just add the text to result message, or PushL - the same but with new line after the string.
        PushL("You know.. it's very hard to recognize your command!");
        PushL("Please, write a correct text. Or use /start command");

        // And finally send buffered message
        await Send();
    }
}

And replace content of appsettings.json with your bot username and token:

{
  "botf": "123456778990:YourToken"
}

And that's it! Veeery easy, isn't?
Just run the program πŸ˜ƒ

Other examples you can find in /Examples folder.

Hosting

After you develop your bot, you can deploy it to our hosting: deploy-f.com

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.17.3 366 9/23/2023
0.17.2 106 9/23/2023
0.17.1 5,258 5/9/2023
0.17.0 136 5/8/2023
0.16.0 539 11/26/2022
0.15.2 10,427 11/24/2022
0.15.1 348 11/14/2022
0.15.0 343 11/10/2022
0.14.3 336 11/9/2022
0.14.2 422 10/14/2022
0.14.1 389 10/14/2022
0.14.0 554 8/6/2022
0.13.1 413 7/28/2022
0.13.0 428 7/27/2022
0.12.0 646 4/9/2022
0.11.0 443 4/4/2022
0.10.0 464 3/29/2022
0.9.0 434 3/26/2022
0.8.2 497 2/6/2022
0.8.1 482 1/30/2022
0.8.0 471 1/26/2022
0.7.2 463 1/22/2022
0.7.1 457 1/15/2022
0.7.0 302 1/3/2022
0.6.0 318 12/22/2021
0.5.1 342 12/13/2021
0.5.0 328 12/12/2021
0.4.0 301 12/2/2021
0.3.0 342 11/8/2021
0.1.1 349 11/2/2021
0.1.0.1 377 11/2/2021