Skip to content

benjif/telegram-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages