Skip to content

benjif/telegram-bot

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
lib
 
 
 
 
 
 
 
 
 
 

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