PHP code example of prowebcraft / telebot
1. Go to this page and download the library: Download prowebcraft/telebot library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
prowebcraft / telebot example snippets
/**
* Welcome message based on context
*/
public function hiCommand()
{
if ($this->isChatGroup()) {
$this->reply('Hey everybody in this chat!');
} else {
$this->reply('Hello, human!');
}
}
e_once "YourBot.php";
$config = [];
$bot = new YourBot('YourBotName', []);
$bot->start();
php
class YourBot extends \Prowebcraft\Telebot\Telebot
{
}
bash
$ php daemon.php