Skip to content

Instantly share code, notes, and snippets.

@cyberlex404
Created March 19, 2017 22:02
Show Gist options
  • Select an option

  • Save cyberlex404/f7b5729fb6e7f4d4ca941357b77fdf5f to your computer and use it in GitHub Desktop.

Select an option

Save cyberlex404/f7b5729fb6e7f4d4ca941357b77fdf5f to your computer and use it in GitHub Desktop.
<?php
namespace Drupal\telegram_holiday\Plugin\TelegramBots;
use Drupal\telegram_bots_api\TelegramBotBase;
/**
* @TelegramBot(
* id = "BraslavskieHolidayBot",
* bot = "braslavskie_holiday_bot",
* description = @Translation("BraslavskieHolidayBot"),
* token = "297--4900:--Es--7l------rcC--BzK--3SM--v6p---"
* )
*/
class BraslavskieHolidayBot extends TelegramBotBase {
public function webhook($update) {
// TODO: Implement webhook() method.
$this->api->sendMessage([
'chat_id' => '',
'text' => 'Hello new Telegram bot',
]);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment