Skip to content

nimaebrazi/Postgram

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Postgram

Send post on telegram, certain time

Libraries:

  1. Telegram bot api
  2. Database
  3. Jalali Date

Instalation:

  1. library install:
$ composer install
  1. DataBase Install
$ mysql -u <username> -p
mysql> create database postgram_bot;
mysql> create database postgram_bot_fake;
  1. 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
  1. 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

Config:

Set all configs in:

PROJECT_PATH/src/config/config.json

JUST THIS :)

Set lib db config:

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"
];

Run:

$ php getUpdateCLI.php

FAQ:

  1. why two database? :(
  2. Which databases uses bot? postgram_bot.sql

About

A telegram bot for manage post in channels or groups

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages