Skip to content

m1roff/simple-telegram-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Simple Telegram BOT API

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require mirkhamidov/simple-bot-telegram "*"

or add

"mirkhamidov/simple-bot-telegram": "*"

to the require section of your composer.json file.

Usage

Once the extension is installed, simply use it in your code by :

<?php
$tg = new TelegramBot($tokenForBot);
$tg->sendMessage('Message with inline keyboard', $chatId, [
 'reply_markup' => json_encode([
     'inline_keyboard'=>[
         [
             ['text'=>"refresh",'callback_data'=> time()]
         ]
     ]
 ]);
?>

PS: Inspired by aki/yii2-bot-telegram

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages