Download the PHP package php-brasil/telegram without Composer

On this page you can find all versions of the php package php-brasil/telegram. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package telegram

Telegram Bot API

Este projeto visa criar uma estrutura de recursos para utilizar a API de bots do Telegram.

Como usar

Para entregar uma API simplificada o SDK possui uma classe que agrega as features para o bot.

Com estas instruções acima temos uma instância do Bot disponível para adicionar os comandos.

Gerar Log

O trecho abaixo mostra um exemplo de como gerar um log de uma requisição no webhook. O bot suporta todos os níveis de logs propostos pelas PSR-3.

Adcionar Regras Regex nas Mensagens

O exemplo abaixo mostra como podemos adicionar um comando para o Bot para ao receber uma mensagem que comece com Hello ou Hi ele responda Nice to meet you.

O bot conta com métodos para lidar com os tipos de mensagem de forma separada.

Lidando com mensages tipo text

O método add suporta qualquer callable (php.net/callable) facilitando a criação dos comandos e permitindo uma organização das instruções.

Class & __invoke

A instrução abaixo adiciona o listener ao comando /start

Relacionando-o à classe Start

Actions File

Também é possível adicionar um arquivo que contenha uma função para adicionar as ações

Onde o arquivo actions/text.php é algo como

Anonymous Functions

A classe Bot possui alguns métodos simplificadas como o reply ou replyTo.

Interagindo com a mensagem

Criando grupos de expressão regular é possível interagir com a mensagem de forma simples e rápida


All versions of telegram with dependencies

PHP Build Version
Package Version
Requires phpzm/phpee Version ^1.0
irazasyed/telegram-bot-sdk Version ^2.0
monolog/monolog Version ^1.23
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package php-brasil/telegram contains the following files

Loading the files please wait ....