Commit 0f17dc90 authored by MBoretto's avatar MBoretto

Updating README.md

parent 46df2f1f
...@@ -144,6 +144,7 @@ try { ...@@ -144,6 +144,7 @@ try {
``` ```
If you want insert in database messages/users for further usage in commands, create database and import structure.sql and enable mysql support after object creation and BEFORE handle method If you want insert in database messages/users for further usage in commands, create database and import structure.sql and enable mysql support after object creation and BEFORE handle method
```php ```php
<?php <?php
...@@ -151,27 +152,29 @@ $credentials = array('host'=>'localhost', 'user'=>'dbuser', 'password'=>'dbpass' ...@@ -151,27 +152,29 @@ $credentials = array('host'=>'localhost', 'user'=>'dbuser', 'password'=>'dbpass'
$telegram->enableMySQL($credentials); $telegram->enableMySQL($credentials);
```
Utilis Utilis
------ ------
Maybe you would like to develop your own commands. A good practice is to store them outside vendor/. This can be done adding before the method: Maybe you would like to develop your own commands. A good practice is to store them outside vendor/. This can be done adding before the method:
'''php ```php
$COMMANDS_FOLDER = __DIR__.'/Commands/'; $COMMANDS_FOLDER = __DIR__.'/Commands/';
$telegram->addCommandsPath($COMMANDS_FOLDER); $telegram->addCommandsPath($COMMANDS_FOLDER);
''' ```
You can also log incoming messages on a text file, set this option with the methods: You can also log incoming messages on a text file, set this option with the methods:
'''php ```php
$telegram->setLogRequests(true); $telegram->setLogRequests(true);
$telegram->setLogPath($BOT_NAME.'.log'); $telegram->setLogPath($BOT_NAME.'.log');
''' ```
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment