Created
March 19, 2017 22:02
-
-
Save cyberlex404/f7b5729fb6e7f4d4ca941357b77fdf5f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?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