Need help with TeleDart?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

DinoLeung
137 Stars 36 Forks GNU General Public License v3.0 411 Commits 10 Opened issues

Description

A Dart library interfacing with the latest Telegram Bot API.

Services available

!
?

Need anything else?

Contributors list

# 220,560
TypeScr...
Telegra...
bot-fra...
Dart
261 commits
# 428,623
Dart
Shell
telegra...
Telegra...
5 commits
# 52,004
Dart
Flutter
SQLite
persist...
3 commits
# 381,088
Python
tdlib
Telegra...
mtproto
3 commits
# 284
Dart
Objecti...
test-fr...
Angular
1 commit
# 346,970
React
Shell
reasonm...
OCaml
1 commit
# 167,023
psr
php7
jsonapi
Dart
1 commit

TeleDart

Telegram is a popular secured instant messenger. They have an open bot platform, this package is a Dart implementation of their bot API allowing you to create your own bot easily.

TeleDart

Bot API Version Dart Version License: GPL v3

Usage

A simple usage example:

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

void main() { var teledart = TeleDart(Telegram('YOUR_BOT_TOKEN'), Event());

teledart.start().then((me) => print('${me.username} is initialised'));

teledart .onMessage(keyword: 'Fight for freedom') .listen((message) => message.reply('Stand with Hong Kong'));

}

Modifying Stream:

teledart
      .onMessage(keyword: 'dart')
      .where((message) => message.text.contains('telegram'))
      .listen((message) => message.replyPhoto(
          //  io.File('example/dash_paper_plane.png'),
          'https://raw.githubusercontent.com/DinoLeung/TeleDart/master/example/dash_paper_plane.png',
          caption: 'This is how the Dart Bird and Telegram are met'));

Inline mode example:

teledart.onInlineQuery().listen((inlineQuery) => inlineQuery.answer([
        InlineQueryResultArticle()
          ..id = 'ping'
          ..title = 'ping'
          ..input_message_content = (InputTextMessageContent()
            ..message_text = '*pong*'
            ..parse_mode = 'MarkdownV2'),
        InlineQueryResultArticle()
          ..id = 'ding'
          ..title = 'ding'
          ..input_message_content = (InputTextMessageContent()
            ..message_text = '_dong_'
            ..parse_mode = 'MarkdownV2')
      ]));

Bugs and feature requests

Please file feature requests and bugs at the issue tracker.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.