Download the PHP package natilosir/telegram-bot-sdk without Composer

On this page you can find all versions of the php package natilosir/telegram-bot-sdk. 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-bot-sdk

Bot-SDK

A professional SDK BOT Telegram for PHP

Requirements

Installation

You can install this SDK package via Composer:

ORM

Error log

Overview

Editor.php is an online code editor that allows users to edit files in a manner similar to Visual Studio Code (VSCode). It provides a user-friendly interface for managing and editing code files directly from your web browser.

Opening Files

By default, the editor opens the file route.php. If you want to open other files, you can do so by appending the file path to the URL, like this:

Handling Unsaved Files

If you encounter an "Error opening file" message when trying to open a file that has not been saved previously, please press Ctrl + S. This action will create a new file and automatically save it.

Saving Files

To save your changes, you can click the purple "Save" button located in the top right corner of the editor (for mobile users). Alternatively, you can use the keyboard shortcut Ctrl + S to save the file quickly.

Features

Route::Class

Please provide the code you would like me to review.

Now we will review all sections of the code. To use this class, make sure to include use natilosir\bot\Route; before calling the Route class.

add Method Overview

This method accepts two parameters: patterns and action.

  1. Patterns (Input 1):

    • You can specify the patterns as either an array or a string. This defines the command or phrase that, when triggered by the user, will determine which file to open.
    • For example, if the user types and sends the command /start, you would specify this command in the patterns parameter.
  2. Action (Input 2):

    • The second input is the path to the file located within the controller directory.
    • For instance, if there is a file named start.php in the controller folder, you should provide the second input simply as start. The system will automatically understand that it needs to open the file located at controller/start.php.
  3. Accessing Files from Other Directories:
    • If you want to open a file from a different folder, you can use the . notation.
    • For example, if you want to open the file controller/user/send.php, you would specify the second input as user/send.

Example Usage add methods

Default Method Overview

Using the def method, you can specify a default file to be opened. This is particularly useful when a user sends a command that does not match any of the patterns defined in the add method.

How It Works

Example Usage

Handle Method Overview

The handle method is designed to process user input. It allows the system to receive a specific string or command sent by the user.

How It Works

Example Usage

Bot::Class

HTTP request


deleteMessage Method

The deleteMessage method allows you to delete a message from a chat.

Parameters

Example


forwardMessage Method

The forwardMessage method allows you to forward a message from one chat to another.

Parameters

Example Usage


sendMessage Method

The sendMessage method sends a text message to a specified chat.

Parameters

Example


copyMessage Method

The copyMessage method allows you to copy a message from one chat to another in a Telegram bot.

Parameters

Example


inline Method

The inline method allows you to create inline keyboard buttons for your bot.

Parameters

Example

Here is an example of how to use the inline method to create an inline keyboard with a button:


keyboard Method

The keyboard method allows you to create a custom keyboard layout for your bot's messages.

Parameters

Example


editMessageReplyMarkup Method

The editMessageReplyMarkup method is used to edit the reply markup of a message sent by the bot.

Parameters

Example


answerCallbackQuery Method

This method is used to send a response to a callback query received from a button press in a Telegram bot.

Parameters

Example Usage


alert Method

The alert method is used to send an alert to the user in response to a callback query.

Parameters

Example


sendChatAction Method

The sendChatAction method is used to send a chat action (like typing, uploading, etc.) to a specific chat.

Parameters

Example


All versions of telegram-bot-sdk with dependencies

PHP Build Version
Package Version
Requires natilosir/jalali Version ^1.0
natilosir/bot Version ^1.0
natilosir/orm Version ^1.0
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 natilosir/telegram-bot-sdk contains the following files

Loading the files please wait ....