Skip to content

Telefrag.Bots

Nill edited this page Sep 10, 2021 · 1 revision

The Telefrag.Bots package provides the base for all Telegram Bot API integration.

The abstraction is exactly what you expect; you instantiate a Bot, give it some basic settings (such as your API key), and you can call methods and hook up events to interface with Telegram via your bot.

What Telefrag.Bots does

  • Handles outbound transport to Telegram using the REST Bot API
  • Provides standad C# methods for all available Bot API functions
  • Provides strongly-typed events for all top-level update types
  • Provides C# record types for all API messages and structures
  • Handles all serialization and deserialization
  • Handles polling that is somewhat resilient to transient network failures
  • Capable of setting up and ingesting (but not hosting) updates via webhook

What Telefrag.Bots doesn't do

  • The Bots module is not a web server; if you want to use webhooks you'll need ASP.NET or something else that can send Telefrag.Bots the incoming POST requests.
  • The Bots module does not contain any fully functional bots with existing logic
  • The Bots module does not contain any high level abstractions like menu builders, command or callback tables, heuristics, user state management, etc.
  • The Bots module provides no user interface

Clone this wiki locally