Download the PHP package httd1/telegramphp without Composer
On this page you can find all versions of the php package httd1/telegramphp. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download httd1/telegramphp
More information about httd1/telegramphp
Files in httd1/telegramphp
Package telegramphp
Short Description This is a PHP package for using Telegram Bot API
License Apache-2.0
Informations about the package telegramphp
TelegramPhp
👌 Read this documentation in Portuguese here
This is a package for the Telegram Bots API.
This package was made exclusively for use with Webhook.
Before using this package, please read the entire Telegram Bot API documentation: https://core.telegram.org/bots/api
Requirements
- PHP >= 7.0
- cURL
- JSON
Installation
Usage:
🔒 Secure
Telegram provides ways to verify if a request actually comes from its servers (read more here).
You can set a in your webhook, and Telegram will include this token in the X-Telegram-Bot-Api-Secret-Token header.
This package allows you to validate your .
Handling Commands
Use the methods , or to catch and handle commands sent to your bot. Each method receives a callback or class method.
-
- Use for standard Telegram commands like /comando or simple inputs that you consider a command, such as '👍'. You can use to define expected parameters.
-
- For some kind of commands, you can build you own pattern using regular expression such as telegram urls for example!
-
- Fallback handler when no command matches.
Some methods available:
, , , , , , , - User full name; - List of languages ID; , , - Media type, _photo, animation, audio, document, sticker, story, video, videonote, voice, contact, dice, game, poll, venue, location, invoice; , - Chat type, private, group, supergroup, channel; - Download a file, receive with paramether a return of and the file destination; - Set a token used in Webhook(_secrettoken) updates; - Checks the _secrettoken set on the the webhook.
Buttons:
Use the static Buttons class to create inline or reply keyboards.
, , , , ,, , ,
, , , ,
-
- Force a reply to the message, documentation
-
- Removes the Telegram keyboard buttons and displays the device keyboard, documentation
Message reactions
Telegram Bots can react to messages using simple emojis such as 👍, 👌, 🔥, 😍... or custom emojis.
You can see the all available reaction emoji here
We have , an static class for reacting to messages.
-
Reaction with ❤
- Reacting with custom emojis
Send files:
-
Send audio
-
Send photo
-
Send video
- Send file
Download files
Logs
You can capture bot logs using , symple set one or more classes to catch all user logs.
-
Class to catch and process all user logs.
- Setting class on the
Updates types
It's possible to execute a callback for a specific type of Updates sent by the Telegram API, for example, executing a callback to '_my_chatmember' or '_chatmember'.
-
Handling '_my_chatmember' updates
- Handling '_chatmember' updates
🔥 Share your project made with this class, your project could be featured here!
• J.M
- @scdownbot (+50K Users)
- @twitterdlrobot (+20K Users)
- Off @rastreiorobot (+14K Users)
- @btn_bot (+200 Users)
- @mailtemprobot (+5k Users)
All versions of telegramphp with dependencies
ext-curl Version *