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

群機(jī)器人

使用說(shuō)明

使用前必須先在群組里面添加機(jī)器人,然后將 Webhook 地址 中的 key 取出來(lái),作為示例中 $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
// 通過(guò)構(gòu)造函數(shù)傳參
$text = new \EasySwoole\WeChat\Work\GroupRobot\Messages\Text('hello', 'her-cat', '18700000000');
//$text = new Text('hello', ['her-cat', 'easyswoole'], ['18700000000', '18700000001']);

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

// 通過(guò)手機(jī)號(hào)
$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://m.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();
主站蜘蛛池模板: 午夜看片 | 亚洲aaa| 福利二区视频 | 成人亚洲国产 | 欧美亚洲国产日韩 | 麻豆视频在线看 | 狼人色综合 | 国产女主播一区 | 国产91免费看 | 综合久久综合久久 | 久久综合成人网 | 草av| 巨乳在线观看 | 丁香在线视频 | 四虎影院站长工具 | 久久精品成人一区二区三区蜜臀 | 欧美乱妇狂野欧美视频 | 新97超碰 | 成人免费看片' | 黄色a一级片 | 国产精品视频导航 | 日批视频免费观看 | 成人免费视频观看视频 | 婷婷超碰| 97视频免费 | 激情视频一区二区三区 | juliaann欧美二区三区 | 深爱开心激情网 | 午夜成人免费视频 | 欧美天天射 | 黄页网站在线免费观看 | 国产九九精品视频 | 亚洲va韩国va欧美va | japanese中文字幕 | 最新中文字幕在线播放 | 日韩中字在线 | 国产乱码一区 | 久久综合免费视频 | 久久久久久一级片 | 久久成人激情 | 日韩午夜免费 |