Download the PHP package dannsbass/bots without Composer

On this page you can find all versions of the php package dannsbass/bots. 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 bots

Bots

Simple Telegram Bot API library for PHP

Quick Start

Initiate with setToken and end with run method.

Sample 1: Start

Sample 2: Keyboard

Sample 3: Inline Keyboard

Sample 4: Sending Document

Sample 5: Chat Array

Sample 6: Regex

Documentation

Note that all properties and methods are static. For example: Bot::$property or Bot::method().

Bot Properties

Property Type Description
token string bot token from @BotFather
name string bot name from @BotFather
url string telegram URL for endpoint
getUpdates array parsed-JSON from Telegram server
inputObject object decoded-JSON from Telegram server
_command array list of commands and responses
_onMessage array list of events (types) and the responses
version integer app version
message_id string message ID
message_text string message text
user string first name (and last name)
from_id integer from ID
chat_id integer from ID
admin_id integer admin ID

Bot Methods

Method Parameter(s) Description
setToken string bot token, string bot name
setAdmin integer admin ID
isAdmin to check if user is admin
name to get bot name
chat string command, string or callable response to set command and its response
cmd string command, string or callable response to set command and its response
chat_array associative array list of command (key) and its response (value) to set command and its response
keyboard string keyboard pattern, string input_field_placeholder = 'type here', boolean resize_keyboard = true, boolean one_time_keyboard = true to create keyboard(s) from string
inline_keyboard string keyboard pattern to create inline keyboard(s) from string
message_id to get message id
message_text to get message text
user to get user first name (and last name)
from_id to get user ID
chat_id to get chat ID
on string type, string or callable response to set response
regex string pattern, string or callable response to set response
run to run the bot
send string method, associative array data to send request to Telegram server
answerInlineQuery result, array options = [] to answer Inline Query
answerCallbackQuery text, array options = [] to answer Callback Query
message to get body of message JSON from user
type to get type of message
__callStatic string method, array parameters to call any method
prosesPesan string teks, array data = null to send a long message
bg_exec string function name, array parameters, string PHP script to be loaded first, integer timeout = 1000 to call function in background

Telegram Events

Note that event parameters up to 2 parameters. For example: Bot::start($param1, $param2).

Telegram Methods

All Telegram methods are compatible with this bot. For example:

See more: https://core.telegram.org/bots/api#available-methods


All versions of bots with dependencies

PHP Build Version
Package Version
Requires danog/tg-file-decoder Version ^0.1.13
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 dannsbass/bots contains the following files

Loading the files please wait ....