Skip to content
This repository has been archived by the owner on Mar 20, 2022. It is now read-only.
/ CodeIgniter-Telegram Public archive

Modelo de Telegram para enviar mensajes a través de un bot.

Notifications You must be signed in to change notification settings

duhow/CodeIgniter-Telegram

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 

Repository files navigation

DEPRECATED - See Telegram-PHP.

All future updates will be available in Telegram-PHP.

CodeIgniter-Telegram

  • 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.

Usage

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();
}

Examples

About

Modelo de Telegram para enviar mensajes a través de un bot.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages