echo.py 392 B

1234567891011121314
  1. # -*- coding: utf-8 -*-
  2. from demeter.core import *
  3. from skill import Skill
  4. print(Skill)
  5. class Echo(Skill):
  6. def handle(self, text, parsed):
  7. text = text.lower().replace('echo', '').replace(u'传话', '')
  8. self.say(text, cache=False)
  9. def match(self, text, parsed):
  10. return any(word in text.lower() for word in ["echo", u"传话"])