A Python robot that edits Wikipedia and interacts with people over IRC https://en.wikipedia.org/wiki/User:EarwigBot
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

123456789101112131415161718192021
  1. # -*- coding: utf-8 -*-
  2. # Check what events on IRC we can respond to.
  3. from irc.commands import test, git
  4. def check(actions, data, hook):
  5. if hook == "join":
  6. pass
  7. if hook == "msg_private":
  8. pass
  9. if hook == "msg_public":
  10. pass
  11. if hook == "msg":
  12. if data.msg == "!test":
  13. test.call(actions, data)
  14. if data.msg.startswith("!git"):
  15. git.call(actions, data)