Commit 96f71272 authored by 夏彬's avatar 夏彬

修改机器人相关代码

parent 35332f6e
No preview for this file type
...@@ -22,18 +22,18 @@ $options = [ ...@@ -22,18 +22,18 @@ $options = [
* 下载配置项 * 下载配置项
*/ */
'download' => [ 'download' => [
'image' => false, 'image' => true,
'voice' => false, 'voice' => false,
'video' => false, 'video' => false,
'emoticon' => false, 'emoticon' => false,
'file' => false, 'file' => true,
'emoticon_path' => $path . 'emoticons', // 表情库路径(PS:表情库为过滤后不重复的表情文件夹) 'emoticon_path' => $path . 'emoticons', // 表情库路径(PS:表情库为过滤后不重复的表情文件夹)
], ],
/* /*
* 输出配置项 * 输出配置项
*/ */
'console' => [ 'console' => [
'output' => FALSE, // 是否输出 'output' => true, // 是否输出
'message' => TRUE, // 是否输出接收消息 (若上面为 false 此处无效) 'message' => TRUE, // 是否输出接收消息 (若上面为 false 此处无效)
], ],
/* /*
......
...@@ -13,6 +13,15 @@ use Hanson\Vbot\Message\Traits\Multimedia; ...@@ -13,6 +13,15 @@ use Hanson\Vbot\Message\Traits\Multimedia;
use Hanson\Vbot\Message\Traits\SendAble; use Hanson\Vbot\Message\Traits\SendAble;
use Swoole\Mysql\Exception; use Swoole\Mysql\Exception;
if ( ! function_exists( 'exif_imagetype' ) ) {
function exif_imagetype ( $filename ) {
if ( ( list($width, $height, $type, $attr) = getimagesize( $filename ) ) !== false ) {
return $type;
}
return false;
}
}
class Image extends Message implements MessageInterface class Image extends Message implements MessageInterface
{ {
use Multimedia, SendAble; use Multimedia, SendAble;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment