A Python robot that edits Wikipedia and interacts with people over IRC https://en.wikipedia.org/wiki/User:EarwigBot
Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

triggers.py 625 B

123456789101112131415161718192021222324252627
  1. # -*- coding: utf-8 -*-
  2. # Check what events on IRC we can respond to.
  3. from irc.commands import test, help, git
  4. def check(actions, data, hook):
  5. data.parse_args() # parse command arguments into data.command and data.args
  6. if hook == "join":
  7. pass
  8. if hook == "msg_private":
  9. pass
  10. if hook == "msg_public":
  11. pass
  12. if hook == "msg":
  13. if data.command == "!test":
  14. test.call(actions, data)
  15. elif data.command == "!help":
  16. help.call(actions, data)
  17. elif data.command == "!git":
  18. git.call(actions, data)