Skip to content

Instantly share code, notes, and snippets.

@youfou
Last active March 13, 2017 09:29
Show Gist options
  • Save youfou/88624bfce3a5450d079edea41f77cf63 to your computer and use it in GitHub Desktop.
Save youfou/88624bfce3a5450d079edea41f77cf63 to your computer and use it in GitHub Desktop.
利用wxpy内置的图灵机器人自动回复指定好友
from wxpy import *
bot = Bot()
tuling = Tuling('你的 API KEY (http://www.tuling123.com/)')
my_friend = ensure_one(bot.friends().search('好友的名称'))
@bot.register(my_friend, TEXT)
def tuling_reply(msg):
tuling.do_reply(msg)
bot.start()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment