t-comm
Version:
专业、稳定、纯粹的工具库
22 lines (21 loc) • 734 B
TypeScript
/**
* 获取天气信息并发送
* @param {object} options 配置
* @param {string} options.webhookUrl 机器人hook地址
* @param {string} [options.chatId] 会话Id
* @param {string} [options.force] 是否在和之前获取数据相同时,也发送
* @returns {Promise<Object>} 请求Promise
* @example
* ```ts
* await sendWeatherRobotMsg({
* webhookUrl: 'https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=xxx',
* chatId: ['chat-id-1', 'chat-id-2'],
* force: false, // 默认 false:和上次数据一致时不发送
* });
* ```
*/
export declare function sendWeatherRobotMsg({ webhookUrl, chatId, force, }: {
webhookUrl: string;
chatId: string | string[];
force?: boolean;
}): Promise<any>;