Create a gist now

Instantly share code, notes, and snippets.

へんすう
controller.hears(['@[0-9a-z_]+'], 'direct_message,direct_mention,mention,ambient', function(bot, message) {
if(message.channel === "C2Z3UJWAW"){
var mentionedID = message.text.match(/@[0-9a-z_]+/);
var ansstr = mentionedID + " そうだよ";
bot.say({
channel:"C2Z3UJWAW",
text:ansstr,
username:"BOT",
icon_url:"https://i.gyazo.com/f3e1776ca8cbde6644df9fe04bcbf05a.jpg"
});
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment