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

25 行
523 B

  1. # -*- coding: utf-8 -*-
  2. # A base class for commands on IRC.
  3. class BaseCommand(object):
  4. def __init__(self, connection):
  5. """docstring"""
  6. self.connection = connection
  7. def get_hook(self):
  8. """Hooks are: 'msg', 'msg_private', 'msg_public', and 'join'."""
  9. return None
  10. def get_help(self, command):
  11. """docstring"""
  12. return None
  13. def check(self, data):
  14. """docstring"""
  15. return False
  16. def process(self, data):
  17. """docstring"""
  18. pass