reloadlife/php-telegram-bot

PHP Telegram Bot.


Keywords
php, api, client, sdk, bot, telegram, telegram-bot, tg-bot
License
AGPL-3.0-only

Documentation

telegram-bot-php

  • just require everyfile in it (require all files in '/src' also '/src/types')

use

composer require reloadlife/php-telegram-bot

or in composer.json just:

{
	"require"    : {
		"reloadlife/php-telegram-bot": "dev-master"
	}
}

then

composer install

and then use

require 'vendor/autoload.php'

some examples

<?php

namespace TEST;

require 'vendor/autoload.php';

use TelegramBotPHP\getUpdate;
use TelegramBotPHP\methods;

$telegram = new methods ( 'TOKEN' );
	$updates  = new getUpdate ();
	
	if ( $updates -> text )
		{
			$telegram -> sendMessages (
				[
					'chat_id' => $updates -> from -> id,
					'text' => $updates -> text,
				]
			);
		}
// will returns what ever it receives as text message .
// :)

?