pqrs / telegrammsg
Sends a message to a Telegram bot
dev-master
2018-05-04 08:27 UTC
Requires
- unreal4u/telegram-api: ~2.3
This package is auto-updated.
Last update: 2025-03-22 08:11:06 UTC
README
Sends messages to a telegram bot
Installation
composer require pqrs/telegrammsg=dev-master
Alternatively, add the dependency directly to your composer.json file:
"require": {
"pqrs/telegrammsg": "dev-master"
}
Usage
require_once __DIR__ . '/vendor/autoload.php'; // Autoload files using Composer autoload use TelegramMsg\Message; define( "TELEGRAM_USER_ID", "XXXXXXXX" ); define( "BOT_AUTH_TOKEN", "XXXXXXXXX:XXXXXXXXXXXXXXX-XXXXXXXXXXXXXXXXXXX" ); Message::send( TELEGRAM_USER_ID, BOT_AUTH_TOKEN, "This is a test" );
Contributing
Contributions are of course very welcome!
Credits
Copyright © 2018 Alvaro Piqueras - pqrs
License
This project is licensed under the MIT License - see the LICENSE file for details.