Skip to content
pubscout

teledart

0.6.1, released 3 years ago by d1n0.xyz

A Dart library interfacing with the latest Telegram Bot API.

Copyleft license
$ flutter pub add teledart
Source repository

What it does

TeleDart is a client library for creating Telegram bots using the Telegram Bot API. It allows developers to handle messages, commands, inline queries, and manage bot events via Dart streams.

AI-written summary of version 0.6.1, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You want to build a Telegram bot in Dart
  • You prefer stream-based handling of Telegram messages and bot commands

Skip it when

  • You are building apps for platforms other than Telegram
  • You need a backend client for services other than Telegram

Strengths

  • Clean and easy implementation of the Telegram Bot API
  • Stream-based message and command handling
  • Supports latest Telegram Bot API versions

Weaknesses

  • Limited to Telegram bots only
  • GPL-3.0 license may not suit all projects

Setup

Kind
Pure Dart
Effort
Low
Code generation
Yes (build_runner)
Direct dependencies
2

Requires a bot token from @BotFather on Telegram.

import 'package:teledart/teledart.dart';
import 'package:teledart/telegram.dart';

void main() async {
  var BOT_TOKEN = 'YOUR_BOT_TOKEN_FROM_BOT_FATHER';
  final username = (await Telegram(BOT_TOKEN).getMe()).username;
  var teledart = TeleDart(BOT_TOKEN, Event(username!));

  teledart.start();
  
  teledart.onCommand('glory')
      .listen((message) => message.reply('to Ukraine!'));
}

Alternatives

Packages that do the same job and could replace teledart.

  • televerse

    Telegram bot framework for Dart with strong typing and filter systems

  • spotify

    A Dart library for interfacing with the Spotify Web API.

  • telegram

    A Telegram utility for Flutter supporting URL schemes and Bot API integration.

  • dart_telegram_bot

    A Dart wrapper for the Telegram Bot API to send and receive messages.

Works with

Packages commonly used together with teledart: ones it builds on, ones built on it, and its own family.