hears('(convertis|télécharges?) (https?:\/\/[^\s]+) en (audio|video|vidéo)', Youtubedl::class); $bot->hears('lorem( ipsum)?', Lorem::class); $bot->hears('(hello|hi|bonjour|salut)', function (\Shikiryu\Bot\Bot $bot) { $bot->replyPolitely('Bonjour'); }); $body = file_get_contents('php://input'); $data = json_decode($body, true); if ($data['type'] !== 'Create' || $data['object']['name'] !== 'message') { return ; } $message = json_decode($data['object']['content'], true)['message']; $bot->listen($message);