Skip to content

Instantly share code, notes, and snippets.

@wynnzen
Last active March 31, 2017 03:51
Show Gist options
  • Save wynnzen/04c578615f3258ac5f4f799d5f4b260e to your computer and use it in GitHub Desktop.
Save wynnzen/04c578615f3258ac5f4f799d5f4b260e to your computer and use it in GitHub Desktop.
weixin_robot
#coding=utf-8
from wxpy import *
bot = Bot(console_qr=False,cache_path=True)
myfriend2 = bot.mps().search("小冰")[0]
mygroup = bot.groups().search("某个组名")[0]
@bot.register([mygroup], TEXT)
def reply_my_friend(msg):
myfriend2.send(msg.text)
@bot.register([myfriend2], TEXT)
def reply_group(msg):
mygroup.send(msg.text)
bot.start()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment