echo.py 380 B

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