Skip to content
Reactive telegram bot library for Raku/Perl6
Other
  1. Other 100.0%
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples
lib
.gitignore Remove .precomp in all dirs Jul 28, 2018
LICENSE license+meta fix Jul 25, 2018
META6.json
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.