AwakenDirective.js 386 Bytes
Newer Older
1
import BaseDirective from './BaseDirective';
xuchaozou's avatar
xuchaozou committed
2

3 4
class AwakenDirective extends BaseDirective {
  static name = '熊猫熊猫唤醒';
xuchaozou's avatar
xuchaozou committed
5

6 7 8 9
  match() {
    const { text } = this;
    if (/熊猫|什么/.test(text)) {
      return true;
xuchaozou's avatar
xuchaozou committed
10
    }
11 12 13
    return false;
  }

14 15 16
  async excute({
    sendMsg = function () { }
  }) {
17
    sendMsg("已经打开首页了")
18
  }
xuchaozou's avatar
xuchaozou committed
19 20
}

21
export default AwakenDirective;