33
44
55<p align =" center " >
6- An elegant, Object-Oriented, reliable PHP Telegram Bot Interface <br >
6+ An elegant, Object-Oriented, reliable PHP Telegram Bot Library <br >
77<a href =" https://docs.novagram.ga " >Full Documentation</a > •
88<a href =" https://t.me/joinchat/JdBNOEqGheC33G476FiB2g " >Public support group</a >
99</p >
1010
11+ > ** v1.9 has been released:** check changelog [ here] ( https://github.com/skrtdev/NovaGram/blob/master/CHANGELOG.md#v19---source-code )
12+
1113### Example
1214An example code of a simple bot.
1315Works with both getUpdates and Webhooks
1416``` php
1517use skrtdev\NovaGram\Bot;
1618use skrtdev\Telegram\Message;
1719
18- $Bot = new Bot(" YOUR_TOKEN" );
20+ $Bot = new Bot(' YOUR_TOKEN' );
1921
20- $Bot->onCommand(" start" , function (Message $message) use ($Bot ) {
21- $message->reply(" Hey! Nice to meet you. Use /info to know more about me." );
22+ $Bot->onCommand(' start' , function (Message $message) {
23+ $message->reply(' Hey! Nice to meet you. Use /info to know more about me.' );
2224});
2325
24- $Bot->onCommand(" info" , function (Message $message) use ($Bot ) {
25- $message->reply(" Well, I'm just an example, but you can learn more about NovaGram at docs.novagram.ga" );
26+ $Bot->onCommand(' info' , function (Message $message) {
27+ $message->reply(' Well, I\ 'm just an example, but you can learn more about NovaGram at docs.novagram.ga' );
2628});
27-
2829```
2930
3031## Features
@@ -46,12 +47,12 @@ NovaGram is built in order to bring a lightweight alternative to make bots, so t
4647
4748Install NovaGram via Composer
4849```
49- composer require skrtdev/novagram ^1.8
50+ composer require skrtdev/novagram ^1.9
5051```
5152
5253After Installation, include NovaGram with:
5354``` php
54- require __DIR__ . '/ vendor/autoload.php';
55+ require ' vendor/autoload.php';
5556```
5657
5758### Installation via Phar
0 commit comments