Last active
March 31, 2017 03:51
-
-
Save wynnzen/04c578615f3258ac5f4f799d5f4b260e to your computer and use it in GitHub Desktop.
weixin_robot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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