Download the PHP package andisiahaan/gramsea-telegram-bot without Composer

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

Gramsea Telegram Bot PHP Library

PHP Version

Library PHP sederhana dan powerful untuk berinteraksi dengan Telegram Bot API tanpa dependensi framework.

โœจ Fitur

๐Ÿ“ฆ Instalasi

๐Ÿš€ Quick Start

Penggunaan Dasar

Menggunakan Fluent Sender (Recommended)


๐Ÿ“– Dokumentasi

Class Gramsea

Class utama dengan magic method untuk semua Telegram Bot API.

Sender Factory Methods

Webhook Management

Chat Member Checks

Chat Actions

Moderation

Keyboard Builders

Bot Commands

File Operations


๐Ÿ“จ Sender Classes

Library menyediakan 5 sender class dengan fluent chaining API:

Class Kegunaan
MessageSender General sender, auto-delegates ke sender yang tepat
TextSender Khusus text message dengan link preview options
MediaSender Khusus single media (photo, video, audio, document)
MediaGroupSender Khusus media group/album (2-10 items)
MassMessageSender Concurrent mass sending ke banyak target sekaligus

MessageSender (Recommended)

Auto-detects dan delegates ke sender yang tepat:

TextSender

Untuk text message dengan kontrol penuh atas link preview.

Link Preview Methods:

MediaSender

Untuk single media dengan caption.

Media Methods:

MediaGroupSender

Untuk mengirim album (2-10 media items).

Media Group Rules:

Common Chaining Methods

Semua sender class memiliki method berikut:


MassMessageSender

Untuk mengirim pesan secara concurrent ke banyak target sekaligus menggunakan Guzzle Pool. Setiap target memiliki konten sendiri (text, media, reply_markup).

Target Format:

Result Methods (MassSendResult):

Global Options:


๐Ÿ“จ Update Wrapper

Object-oriented wrapper untuk mengakses data webhook.

Type Checks:

Message Object:

Chat Object:

User Object:


Support Classes

Support\DeepLink

Generate dan parse Telegram deep links.

Support\TextFormatter

Fluent builder untuk HTML formatting.

Support\ReplyMarkup

Format keyboard markup dengan auto row wrapping.

Support\Limit

Constants untuk Telegram API limits.

Support\Emoji

Emoji constants yang sering dipakai.

Support\MediaHelper

Deteksi tipe media dari file extension.

Support\InlineKeyboard

Fluent builder untuk inline keyboard dengan pattern umum.

Support\CallbackData

Encode/decode callback data dengan kompresi untuk ID besar.


Curl Configuration


Exception Handling

Library menyediakan exception classes yang spesifik untuk berbagai error dari Telegram API:

Exception Error Code Keterangan
BadRequestException 400 Parameter tidak valid
UnauthorizedException 401 Bot token tidak valid
ForbiddenException 403 Bot tidak punya akses (diblok, di-kick, dll)
NotFoundException 404 Chat/user/message tidak ditemukan
ConflictException 409 Conflict webhook/polling
TooManyRequestsException 429 Rate limit tercapai
TelegramServerException 500+ Server Telegram error
ApiException - Base class untuk semua API errors
NetworkException - Network/connection errors

Basic Usage

Exception Methods

ApiException (Base Class)

ForbiddenException

NotFoundException

ConflictException

TooManyRequestsException

NetworkException


๐Ÿ“ Struktur Library

๐Ÿงช Testing

๐Ÿ“„ License

MIT License - lihat LICENSE

๐Ÿ‘ค Author

Andi Saputra Siahaan


All versions of gramsea-telegram-bot with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
ext-curl Version *
ext-json Version *
ext-mbstring Version *
guzzlehttp/guzzle Version ^7.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 andisiahaan/gramsea-telegram-bot contains the following files

Loading the files please wait ...