Skip to content

Latest commit

 

History

History
50 lines (40 loc) · 1.1 KB

readme.md

File metadata and controls

50 lines (40 loc) · 1.1 KB

这只是 WorkTool API 的简单封装,以便于能够在各种程序中引入复用。

可以参考 WorkTool的API文档,但部分功能尚未封装。

已封装的功能

  • 发送文本
  • 发送图片/文件/音频/视频/其他
  • 发送腾讯文档/收集表
  • 发送微盘图片
  • 添加群成员
  • 移除群成员
  • 修改群名
  • 修改公告
  • 修改群备注
  • 解散群
  • 添加待办
  • 添加好友(从手机号)
  • 添加好友(从群)
  • 移除好友
  • 修改好友

使用示例

安装模块

pip install wecom_worktool

from wecom_worktool import Worktool

with Worktool("your_robot_id") as bot:
        bot.send_file(
            ["群1", "好友1"],
            "文件名.jpg",
            "https://your_image_url.jpg",
            bot.FileType.IMAGE
        )
        bot.send_text(
            ["好友1"],
            "Hello world!"
        )
        bot.send_text(
            ["群1"],
            "Hello world!",
            ["@所有人"]
        )