在线看片18_亚洲性吧_在线污_神马午夜达达兔_奇米色网_在线免费看污

群機(jī)器人

使用說明

使用前必須先在群組里面添加機(jī)器人,然后將 Webhook 地址 中的 key 取出來,作為示例中 $groupKey 的值。

發(fā)送文本類型消息

快速發(fā)送文本消息

<?php
// 獲取 Messenger 實(shí)例
$messenger = $work->group_robot_messenger;

// 群組 key
$groupKey = 'ab4f609a-3feb-427c-ae9d-b319ca712d36';

$messenger->message('大家好,我是本群的"喝水提醒小助手"')->toGroup($groupKey)->send();
// 或者寫成
$messenger->toGroup($groupKey)->send('大家好,我是本群的"喝水提醒小助手"');

使用 Text 發(fā)送文本消息

<?php
// 準(zhǔn)備消息
$text = new \EasySwoole\WeChat\Work\GroupRobot\Messages\Text('hello');

// 發(fā)送
$messenger->message($text)->toGroup($groupKey)->send();

@某人:

<?php
// 通過構(gòu)造函數(shù)傳參
$text = new \EasySwoole\WeChat\Work\GroupRobot\Messages\Text('hello', 'her-cat', '18700000000');
//$text = new Text('hello', ['her-cat', 'easyswoole'], ['18700000000', '18700000001']);

// 通過 userId
$text->mention('her-cat');
//$text->mention(['her-cat', 'easyswoole']);

// 通過手機(jī)號
$text->mentionByMobile('18700000000');
//$text->mentionByMobile(['18700000000', '18700000001']);

// @所有人
$text->mention('@all');
//$text->mentionByMobile('@all');

$messenger->message($text)->toGroup($groupKey)->send();

發(fā)送 Markdown 類型消息

<?php
$content = '
# 標(biāo)題一
## 標(biāo)題二
<font color="info">綠色</font>
<font color="comment">灰色</font>
<font color="warning">橙紅色</font>
> 引用文字
';

$markdown = new \EasySwoole\WeChat\Work\GroupRobot\Messages\Markdown($content);

$messenger->message($markdown)->toGroup($groupKey)->send();

發(fā)送圖片類型消息

<?php
$img = file_get_contents('http://res.mail.qq.com/node/ww/wwopenmng/images/independent/doc/test_pic_msg1.png');

$image = new \EasySwoole\WeChat\Work\GroupRobot\Messages\Image(base64_encode($img), md5($img));

$result = $messenger->message($image)->toGroup($groupKey)->send();

發(fā)送圖文類型消息

<?php
$items = [
    new \EasySwoole\WeChat\Work\GroupRobot\Messages\NewsItem([
        'title' => '中秋節(jié)禮品領(lǐng)取',
        'description' => '今年中秋節(jié)公司有豪禮相送',
        'url' => 'http://www.luan888.cn',
        'image' => 'http://res.mail.qq.com/node/ww/wwopenmng/images/independent/doc/test_pic_msg1.png',
    ]),

    //...
];

$news = new \EasySwoole\WeChat\Work\GroupRobot\Messages\News($items);

$messenger->message($news)->toGroup($groupKey)->send();

其他方式

使用 group_robot 發(fā)送消息。

$work->groupRobot->message('大家好,我是本群的"喝水提醒小助手"')->toGroup($groupKey)->send();
主站蜘蛛池模板: 日韩欧美在线中文字幕 | 成人性视频在线播放 | 亚洲精品一二三区 | 自拍偷拍亚洲 | 精品视频在线免费 | 超碰亚洲 | 日韩色在线 | 国产日韩成人 | 狠狠干婷婷 | 老女人连续高潮呻吟 | 中文字幕精 | 欧美视频在线看 | 精品视频一区二区三区在线观看 | 九一在线视频 | 精品久久国产 | 欧美专区在线视频 | 欧美自拍| 在线观看高清av | 中文字幕av专区dvd | 国产日韩欧美大片 | a国产视频 | 国产午夜一区二区 | 亚洲黑丝在线 | 精品久久久久久久久久久久 | 欧美精品一二 | 国产免费一区二区三区免费视频 | 正在播放欧美 | www.久久艹 | 午夜肉体高潮免费毛片 | 亚洲一二三区视频 | 网站黄在线观看 | 色av一区二区 | 国产午夜在线视频 | 精品九九视频 | 中文字幕在线观看的网站 | 亚洲伊人影院 | 美女一区二区视频 | 亚洲欧美日韩一区二区三区四区 | 久久精品99 | 自拍偷拍网址 | 在线观看欧美 |