lurkchat / bot-php
1.0.5
2020-06-23 17:25 UTC
Requires
- ext-curl: *
- ext-json: *
- guzzlehttp/guzzle: ^6.5
Requires (Dev)
- laravel/framework: ~5.5|~6.0
- orchestra/testbench: ^4.0
- phpunit/phpunit: ^8.5
README
About Lurkchat
Lurkchat is reliable, secure and anonymous messenger.
Visit lurkchat.com
Sign up for free without email and other sensitive data and have pleasure with messaging and many other features
Welcome to Lurkchat bot
Getting started
Install the package
Using composer require
composer require lurkchat/bot-php
Or add to your composer.json file
...
"require": {
...
"lurkchat/bot-php": "^1.0"
}
and run
composer install
Usage example
Standalone
require_once("vendor/autoload.php"); $token = %YOUR_BOT_TOKEN%; $bot = new \Lurkchat\LurkchatBot($token);
In laravel
Service provider and 'LurkchatBot' alias are auto discovered so just publish config file
php artisan vendor:publish --provider="Lurkchat\Laravel\LurkchatBotServiceProvider" --tag="config"
If you use only 1 bot, add to .env file and this config will be used for default
LURKCHAT_BOT_TOKEN=%YOUR_BOT_TOKEN%
If you use multiple bots, you can provide token for each bot
use Lurkchat\Laravel\Facades\LurkchatBot; $bot = LurkchatBot::make($token);
Make API call
Standalone
$bot = new \Lurkchat\LurkchatBot($token); $info = $bot->getMe();
In laravel
With token provided in .env
$info = LurkchatBot::getMe();
With token provided for each bot
$info = LurkchatBot::make($token)->getMe();