Showing
2 changed files
with
6 additions
and
3 deletions
... | @@ -126,12 +126,12 @@ function handleMessage(message, current_channel){ | ... | @@ -126,12 +126,12 @@ function handleMessage(message, current_channel){ |
126 | } | 126 | } |
127 | else if(message.includes(' make joke : ')) | 127 | else if(message.includes(' make joke : ')) |
128 | { | 128 | { |
129 | - MakeJoke(message); | 129 | + MakeJoke(message,current_channel); |
130 | } | 130 | } |
131 | } | 131 | } |
132 | 132 | ||
133 | 133 | ||
134 | -function MakeJoke(message){ | 134 | +function MakeJoke(message,user_channel){ |
135 | var obj={ | 135 | var obj={ |
136 | table:[] | 136 | table:[] |
137 | } | 137 | } |
... | @@ -158,6 +158,8 @@ function MakeJoke(message){ | ... | @@ -158,6 +158,8 @@ function MakeJoke(message){ |
158 | }); | 158 | }); |
159 | } | 159 | } |
160 | }); | 160 | }); |
161 | + comment="Sucess making joke!!:+1::thumbsup:\nWhen you use your joke, please enter @jokebot tell-me-userjoke"; | ||
162 | + bot.postMessageToChannel(user_channel,`${comment}:kissing_heart:`,emoji.emojis('nerd_face')); | ||
161 | } | 163 | } |
162 | else{ | 164 | else{ |
163 | console.log("file not exists"); | 165 | console.log("file not exists"); |
... | @@ -169,6 +171,7 @@ function MakeJoke(message){ | ... | @@ -169,6 +171,7 @@ function MakeJoke(message){ |
169 | } | 171 | } |
170 | console.log('완료'); | 172 | console.log('완료'); |
171 | }); | 173 | }); |
174 | + | ||
172 | } | 175 | } |
173 | }) | 176 | }) |
174 | 177 | ... | ... |
1 | -{"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 | ... | \ No newline at end of file |
1 | +{"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 | ... | \ No newline at end of file | ... | ... |
-
Please register or login to post a comment