오원석

makejoke.posttochannel

......@@ -126,12 +126,12 @@ function handleMessage(message, current_channel){
}
else if(message.includes(' make joke : '))
{
MakeJoke(message);
MakeJoke(message,current_channel);
}
}
function MakeJoke(message){
function MakeJoke(message,user_channel){
var obj={
table:[]
}
......@@ -158,6 +158,8 @@ function MakeJoke(message){
});
}
});
comment="Sucess making joke!!:+1::thumbsup:\nWhen you use your joke, please enter @jokebot tell-me-userjoke";
bot.postMessageToChannel(user_channel,`${comment}:kissing_heart:`,emoji.emojis('nerd_face'));
}
else{
console.log("file not exists");
......@@ -169,6 +171,7 @@ function MakeJoke(message){
}
console.log('완료');
});
}
})
......
{"table":[{"id":1,"type":"userjoke","setup":" one plus one equals? ","punchline":" window!"},{"id":2,"type":"userjoke","setup":" what 6 x 3 ? ","punchline":" 63 building!"},{"id":3,"type":"userjoke","setup":" what 2 x 9 ?","punchline":" iquana!"},{"id":4,"type":"userjoke","setup":" where are you?","punchline":" your heart"},{"id":5,"type":"userjoke","setup":" jogutae ","punchline":" babo"}]}
\ No newline at end of file
{"table":[{"id":1,"type":"userjoke","setup":" one plus one equals? ","punchline":" window!"},{"id":2,"type":"userjoke","setup":" what 6 x 3 ? ","punchline":" 63 building!"},{"id":3,"type":"userjoke","setup":" what 2 x 9 ?","punchline":" iquana!"},{"id":4,"type":"userjoke","setup":" where are you?","punchline":" your heart"},{"id":5,"type":"userjoke","setup":" jogutae ","punchline":" babo"},{"id":6,"type":"userjoke","setup":" oh","punchline":" wonserk"}]}
\ No newline at end of file
......