1. Go to this page and download the library: Download rtippin/messenger-bots library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use RTippin\Messenger\Facades\MessengerBots;
use RTippin\MessengerBots\Bots\ChuckNorrisBot;
use RTippin\MessengerBots\Bots\CoinTossBot;
use RTippin\MessengerBots\Bots\CommandsBot;
use RTippin\MessengerBots\Bots\DadJokeBot;
use RTippin\MessengerBots\Bots\DocumentFinderBot;
use RTippin\MessengerBots\Bots\GiphyBot;
use RTippin\MessengerBots\Bots\InsultBot;
use RTippin\MessengerBots\Bots\InviteBot;
use RTippin\MessengerBots\Bots\JokeBot;
use RTippin\MessengerBots\Bots\KanyeBot;
use RTippin\MessengerBots\Bots\KnockBot;
use RTippin\MessengerBots\Bots\LocationBot;
use RTippin\MessengerBots\Bots\NukeBot;
use RTippin\MessengerBots\Bots\RandomImageBot;
use RTippin\MessengerBots\Bots\ReactionBombBot;
use RTippin\MessengerBots\Bots\ReactionBot;
use RTippin\MessengerBots\Bots\ReplyBot;
use RTippin\MessengerBots\Bots\RockPaperScissorsBot;
use RTippin\MessengerBots\Bots\RollBot;
use RTippin\MessengerBots\Bots\WeatherBot;
use RTippin\MessengerBots\Bots\WikiBot;
use RTippin\MessengerBots\Bots\YoMommaBot;
use RTippin\MessengerBots\Bots\YoutubeBot;
use RTippin\MessengerBots\Packages\GamesPackage;
use RTippin\MessengerBots\Packages\JokesterPackage;
use RTippin\MessengerBots\Packages\NeoPackage;
class MessengerServiceProvider extends ServiceProvider
{
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot(): void
{
MessengerBots::registerHandlers([
ChuckNorrisBot::class,
CoinTossBot::class,
CommandsBot::class,
DadJokeBot::class,
DocumentFinderBot::class,
GiphyBot::class,
InsultBot::class,
InviteBot::class,
JokeBot::class,
KanyeBot::class,
KnockBot::class,
LocationBot::class,
NukeBot::class,
RandomImageBot::class,
ReactionBombBot::class,
ReactionBot::class,
ReplyBot::class,
RockPaperScissorsBot::class,
RollBot::class,
WeatherBot::class,
WikiBot::class,
YoMommaBot::class,
YoutubeBot::class,
]);
MessengerBots::registerPackagedBots([
GamesPackage::class,
JokesterPackage::class,
NeoPackage::class,
]);
}
}