Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/wpsocio/wptelegram-bot-api

Production Repository | Telegram Bot API library for WordPress. Development takes place in our monorepo - https://github.com/wpsocio/wp-projects/tree/main/packages/php/wptelegram-bot-api
https://github.com/wpsocio/wptelegram-bot-api

client library telegram telegram-bot telegram-bot-api wordpress

Last synced: 2 days ago
JSON representation

Production Repository | Telegram Bot API library for WordPress. Development takes place in our monorepo - https://github.com/wpsocio/wp-projects/tree/main/packages/php/wptelegram-bot-api

Awesome Lists containing this project

README

        

# WP Telegram Bot API

Telegram Bot API library for WordPress.

## Usage

```bash
composer require wpsocio/wptelegram-bot-api
```

```php
require_once __DIR__ . '/autoload.php';

$bot_token = 'YOUR BOT TOKEN HERE';

$bot_api = new \WPTelegram\BotAPI\API( $bot_token );

$bot_api->sendMessage( [
'chat_id' => 123456789,
'text' => 'Hello World',
] );

$bot_api->sendPhoto( [
'chat_id' => 123456789,
'photo' => 'https://domain.com/path/to/photo.jpg',
] );
```

## Requirements

- `PHP >= 8.0`
- `WP >= 6.4`