Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
hfpp2012
/
vbot
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit a7baacb4
authored
Jan 19, 2017
by
HanSon
Committed by
GitHub
Jan 19, 2017
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge pull request #12 from HanSon/dev
修改文档错误
2 parents
128eea58
42c16a83
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
README.md
example/forward.php
README.md
View file @
a7baacb
...
...
@@ -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/', # 用于生成登录二维码以及文件保存
...
...
example/forward.php
View file @
a7baacb
...
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment