Commit a7baacb4 by HanSon Committed by GitHub

Merge pull request #12 from HanSon/dev

修改文档错误
2 parents 128eea58 42c16a83
......@@ -43,8 +43,8 @@ composer require hanson/vbot
require_once __DIR__ . './../vendor/autoload.php';
use Hanson\Vbot\Foundation\Vbot;
use Hanson\Robot\Message\Message;
use Hanson\Robot\Message\Text;
use Hanson\Vbot\Message\Entity\Message;
use Hanson\Vbot\Message\Entity\Text;
$robot = new Vbot([
'tmp' => '/path/to/tmp/', # 用于生成登录二维码以及文件保存
......
......@@ -17,7 +17,7 @@ $robot = new Vbot([
]);
$robot->server->setMessageHandler(function ($message) {
if ($message->type === 'Text') {
if ($message instanceof Text) {
/** @var $message Text */
$contact = contact()->getUsernameById('hanson');
Text::send($contact, $message);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!