- library install:
$ composer install
- DataBase Install
$ mysql -u <username> -p
mysql> create database postgram_bot;
mysql> create database postgram_bot_fake;
- Import database:
$ mysql -u <username> -p postgram_bot < db_sql/postgram_bot.sql
$ mysql -u <username> -p postgram_bot_lib < db_sql/postgram_bot_lib.sql
- Remove sample library Commands:
when run bot, probably command not run or run a response in loop. check this path and remove similar command:
PROJECT_PATH/vendor/longman/telegram-bot/src/Commands
Set all configs in:
PROJECT_PATH/src/config/config.json
JUST THIS :)
in PROJECT_PATH/getUpdateCLI.php from line 19 set library db config. it's just fake for prevent lib exeption. :-(
$mysql_credentials = [
'host' => "localhost",
'user' => "yourUsername",
'password' => "yourPassword",
'database' => "postgram_bot_lib"
];
$ php getUpdateCLI.php
- why two database? :(
- Which databases uses bot?
postgram_bot.sql