Created
October 24, 2016 14:55
-
-
Save imfht/5d1545eaed8360569652eed97cc6183e to your computer and use it in GitHub Desktop.
微信公众号的小脚本
This file contains hidden or 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 | |
import werobot | |
robot = werobot.WeRoBot(token='HelloWorld') | |
dic = {'11':'(-`ェ´-╬) web技术', | |
'12':'面向对象 编译原理', | |
'13':'马克思', | |
'21':'计网课设 机器学习', | |
'22':'操作系统课设 计组课设', | |
'31':'(・ω´・ ) 面向对象', | |
'32':'汇编语言 编译原理', | |
'33':'马克思', | |
'41':'web技术 计网课设', | |
'42':'形势政策', | |
'51':'机器学习 汇编语言', | |
'52':'操作系统课设 计组课设', | |
} | |
@robot.text | |
def echo(message): | |
if message.content in dic.keys(): | |
return dic[message.content] | |
else: | |
return '(`・ω・´) ' | |
robot.run(server='auto',port=8888) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment