DEPRECATED - See Telegram-PHP.
All future updates will be available in Telegram-PHP.
- Configure config/telegram.php with Telegram API data.
- Configure config/autoload.php for config and model, or run when needed.
- Set a page as webhook and be sure to run the model Telegram.
Once the page is loaded (manually or via webhook), you can send or reply the requests.
To send a message to a user or group chat:
$this->telegram->send
->chat("123456")
->text("Hello world!")
->send();
To reply a user command:
if($this->telegram->text_command("start")){
$this->telegram->send
->text("Hi!")
->send();
}
To reply a user message:
if($this->telegram->text_has("are you alive")){
$this->telegram->send
->text("Yes!")
->send();
}
- Profesor Oak, an assistant for Pokemon GO.