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 8ec8c3e1
authored
Jan 30, 2017
by
HanSon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
恢复修改example
1 parent
e8b1913e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
example/index.php
example/index.php
View file @
8ec8c3e
...
...
@@ -63,23 +63,23 @@ $robot->server->setMessageHandler(function ($message) use ($path) {
// 图片信息 返回接收到的图片
if
(
$message
instanceof
Image
)
{
//
return $message;
return
$message
;
}
// 视频信息 返回接收到的视频
if
(
$message
instanceof
Video
)
{
//
return $message;
return
$message
;
}
// 表情信息 返回接收到的表情
if
(
$message
instanceof
Emoticon
)
{
//
return $message;
return
$message
;
}
// 语音消息
if
(
$message
instanceof
Voice
){
/** @var $message Voice */
//
return '收到一条语音并下载在' . $message::getPath($message::$folder) . "/{$message->msg['MsgId']}.mp3";
return
'收到一条语音并下载在'
.
$message
::
getPath
(
$message
::
$folder
)
.
"/
{
$message
->
msg
[
'MsgId'
]
}
.mp3"
;
}
// 撤回信息
...
...
@@ -152,7 +152,7 @@ $robot->server->setMessageHandler(function ($message) use ($path) {
// 手机点击聊天事件
if
(
$message
instanceof
Touch
){
//
Text::send($message->msg['ToUserName'], "我点击了此聊天");
Text
::
send
(
$message
->
msg
[
'ToUserName'
],
"我点击了此聊天"
);
}
return
false
;
...
...
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