github youfou/wxpy 0.3.0
wxpy 0.3.0 (2017-3-19)

latest releases: 0.3.9.8, 0.3.9.7, 0.3.9.6...
7 years ago
  • [重要调整] Bot.start() 改为在登陆后自动调用。

    注册函数会立即生效,无需手动 start,只需在代码底部使用 embed() 堵塞线程。

    from wxpy import *
    
    bot = Bot()
    
    @bot.register()
    def print_messages(msg):
       print(msg)
    
    # 无需 start,用 embed() 代替即可
    embed()
  • [参数调整] Bot.register(senders) 改为 chats

    原先的 senders 表示消息的发送者,而 chats 表示消息所在的聊天会话。

    调整为通过 chats 注册后,可以更方便的注册自己在手机中向特定会话发出的消息。

    例如,注册自己在文件传输助手上发出的消息:

    @bot.register(bot.file_helper, except_self=False)
    def print_messages(msg):
        print(msg)
  • [新增] 获取头像 Chat.get_avatar() (文档)

  • [新增] 移除群成员 Member.remove() (文档)

  • [文档] 新增 常见问题解答 (FAQ)

Don't miss a new wxpy release

NewReleases is sending notifications on new releases.