Skip to content
Reactive telegram bot library for Perl6
Perl 6
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples Updated examples. Sep 27, 2019
lib Fixed with URL encoding. Removed awkward forced named parameters. Sep 27, 2019
.gitignore Remove .precomp in all dirs Jul 28, 2018
LICENSE license+meta fix Jul 25, 2018
META6.json Change p6 version to 6.d. Bump version number to 0.0.2. Sep 27, 2019
README.md Replace Perl6 with Raku Oct 17, 2019

README.md

Raku Telegram Bot Library

This library offers Raku objects and routines that correspond to (some of) Telegram's bot API in a reactive form.

use Telegram;

my $bot = Telegram::Bot.new('<Your bot token>');
$bot.start(1); # Starts scanning for updates every second; defaults to every 2 seconds

my $msgTap = $bot.messagesTap; # A tap for updates

react {
  whenever $msgTap -> $msg {
    say "{$msg.sender.username}: {$msg.text} in {$msg.chat.id}";
  }
  whenever signal(SIGINT) {
    $bot.stop;
    exit;
  }
}

Installation

zef install telegram

You can’t perform that action at this time.