![]() |
PhpBotFramework
1.0.0
A framework for Telegram Bots' APIs.
|
Core of the framework. More...
Public Member Functions | |
| __construct (string $token) | |
| Contrusct an empty bot. More... | |
| __destruct () | |
| Destroy the object. | |
| & | getChatID () |
| Get chat id of the current user. More... | |
| setChatID ($chat_id) | |
| Set current chat id. More... | |
| & | sendMessage ($text, string $reply_markup=null, int $reply_to=null, string $parse_mode='HTML', bool $disable_web_preview=true, bool $disable_notification=false) |
| Send a text message. More... | |
| & | forwardMessage ($from_chat_id, int $message_id, bool $disable_notification=false) |
| Forward a message. More... | |
| & | sendPhoto ($photo, string $reply_markup=null, string $caption='', bool $disable_notification=false) |
| Send a photo. More... | |
| & | sendAudio ($audio, string $caption=null, string $reply_markup=null, int $duration=null, string $title=null, bool $disable_notification=false, int $reply_to_message_id=null) |
| Send an audio. More... | |
| & | senddocument ($document, string $caption='', string $reply_markup=null, bool $disable_notification=false, int $reply_to_message_id=null) |
| Send a document. More... | |
| & | sendSticker ($sticker, string $reply_markup=null, bool $disable_notification=false, int $reply_to_message_id=null) |
| Send a sticker. More... | |
| & | sendChatAction (string $action) |
| Say the user what action is the bot doing. More... | |
| & | getChat ($chat_id) |
| Get info about a chat. More... | |
| & | answerCallbackQuery ($text='', $show_alert=false, string $url='') |
| & | editMessageText ($text, int $message_id, $reply_markup=null, string $parse_mode='HTML', bool $disable_web_preview=false) |
| Edit text of a message sent by the bot. More... | |
| & | editInlineMessageText ($text, string $inline_message_id, string $reply_markup=null, string $parse_mode='HTML', bool $disable_web_preview=false) |
| Edit text of a message sent via the bot. More... | |
| & | editMessageReplyMarkup ($message_id, $inline_keyboard) |
| & | answerInlineQuerySwitchPM ($results, $switch_pm_text, $switch_pm_parameter='', $is_personal=true, $cache_time=300) |
| & | answerEmptyInlineQuerySwitchPM ($switch_pm_text, $switch_pm_parameter='', $is_personal=true, $cache_time=300) |
| & | apiRequest (string $method, array $parameters) |
| Exec any api request using this method. More... | |
Public Attributes | |
| $ch | |
| Curl connection for request. | |
Protected Member Functions | |
| & | getUpdates (int $offset=0, int $limit=100, int $timeout=60) |
| Request bot updates. More... | |
| & | exec_curl_request ($url) |
| Base core function to execute url request. More... | |
Protected Attributes | |
| $chat_id | |
| Chat_id of the user that interacted with the bot. | |
| $api_url | |
| Url request (containing $token). | |
Core of the framework.
Contains data used by the bot to works, curl request handling, and all api methods (sendMessage, editMessageText, etc).
1.8.12