✨ Add Help command
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
<?php
|
||||
|
||||
use Shikiryu\Bot\Bot;
|
||||
use Shikiryu\Bot\Commands\Lorem;
|
||||
use Shikiryu\Bot\Commands\Youtubedl;
|
||||
|
||||
|
||||
require 'vendor/autoload.php';
|
||||
@@ -23,9 +21,9 @@ $event = $_SERVER['HTTP_X_H1_EVENT'] ?? '';
|
||||
$signature = $_SERVER['HTTP_X_H1_SIGNATURE'] ?? '';
|
||||
|
||||
// Give the bot something to listen for.
|
||||
$bot->hears('(convertis|télécharges?) (https?:\/\/[^\s]+) en (audio|video|vidéo)', Youtubedl::class);
|
||||
|
||||
$bot->hears('lorem( ipsum)?', Lorem::class);
|
||||
foreach ($bot->listCommands() as $command) {
|
||||
$bot->hears(call_user_func([$command, 'getPattern']), $command);
|
||||
}
|
||||
|
||||
$bot->hears('(hello|hi|bonjour|salut)', function (Bot $bot) {
|
||||
$bot->replyPolitely('Bonjour');
|
||||
|
Reference in New Issue
Block a user