1
0
Fork 0
mirror of https://github.com/kou029w/daraz-san.git synced 2025-01-18 16:08:06 +00:00
daraz-san/scripts/tellme.js
2020-04-09 00:24:48 +09:00

18 lines
581 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

const { directMention } = require("@slack/bolt");
const tellme = require("./util/tellme");
const nyanco = require("./util/nyanco");
// Description:
// だらずさんは何でも知っているので教えてくれます
//
// Synopsis:
// tell me <phrase> - <phrase> について教えてあげよう、妖怪ウィキウィキペディアは使ってないよ!
module.exports = [
directMention(),
/tell( ?me)? (.*)/i,
async ({ context, say }) => {
const ans = await tellme(context.matches[2]);
if (ans != null) return say(`${nyanco()} ${ans}`);
},
];