Download the PHP package uzdevid/yii2-telegram-bot without Composer

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

PHP-da Telegram bot

PHP-da oson hamda mukammal Telegram bot yaratish uchun kerakli kutubxona.

O'rnatish

Ushbu kengaytmani o'rnatishning eng afzal usuli - composer orqali.

O'rnatish uchun quyidagi buyruqni ishga tushiring:

Botning asosiy obyektini yaratish

Bot sozlamalari

Bot tokenini @BotFather dan olishingiz mumkin

Agar bot doyimiy faqat bitta telegram akkaunt bilan ishlaydigan bo'lsa chat_id yoki username parametrini ham kiritishingiz mumkin. Shu holda habar yuborayotganda ushbu parametrlarni kiritishingiz shart bo'lmaydi

Bot obyektini yaratish

Matnli habar yuborish

chatId() - habar yuboriladigan chat id sini qabul qabul qiladi.

sender() - so'rov yuborishga mo'ljallangan.

method() - yuboriladigan so'rovni qabul qabul qiladi.

send() - so'rovni yuboradi.

Rasmli habar yuborish

Rasmli habar yuborish ham huddi matnli habar yuborish kabi amalga oshiriladi. Faqatgi farqi rasmni yuborish uchun method() metodiga SendPhoto obyektini uzatish kerak.

SendPhoto - rasmli habar yuborish uchun kerakli klass.

caption() - rasmli habar yuboriladigan matn.

hasSpoiler() - rasmni spoiler ko'rinishida yuborish.

Tugmali habar yuborish

Tugmali habar yuborilganidan so'ng undan keyingi habardan tugmalarni o'chirish uchun yangi habarni shunday ko'rinishda yuborish kerak

ReplyKeyboardMarkup - tugma yaratish uchun kerakli klass.

resizeKeyboard() - tugmalarni o'lchamini o'zgartirish mumkinligini yoqish.

addRow() - tugmalarga yangi qator yaratadi.

ReplyRow - tugmalar uchun yangi qator yaratish uchun kerakli klass.

addButton() - tugma qo'shish.

ReplyButton tugma yaratish uchun kerakli klass.

addReplyMarkup() - tugmalarni habarga biriktirib yuborish uchun kerakli metod.

Botdan habarlarni qabul qilish va qayta ishlash

index.php

$requestBody - telegramdan kelgan so'rov.

handler() - so'rovlarni qabul qiluvchi va qayta ishlovchi metod.

on() - qabul qilinadigan so'rovlarni qo'shish uchun kerakli metod.

ChatStart.php

canHandle() - so'rovni qabul qilinadimi yoki yo'qmi tekshiradi.

handle() - so'rovni qabul qilgandan so'ng ishlovchi metod.


All versions of yii2-telegram-bot with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
guzzlehttp/guzzle Version ^7.7
yiisoft/hydrator Version ^1.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 uzdevid/yii2-telegram-bot contains the following files

Loading the files please wait ....