김연준

runhelp function details added

...@@ -108,7 +108,7 @@ function handleMessage(message, current_channel){ ...@@ -108,7 +108,7 @@ function handleMessage(message, current_channel){
108 bot.postMessageToChannel(current_channel, comment, emoji.emojis('flushed')); 108 bot.postMessageToChannel(current_channel, comment, emoji.emojis('flushed'));
109 } 109 }
110 } 110 }
111 - else if(message.includes(' help')){ 111 + else if(message.includes(' --help')){
112 comment = "If you want to start @joker then write [tell me] and write type of joke [knock-knock, general, programming, funny story, reddit]:smiley:!!!"; 112 comment = "If you want to start @joker then write [tell me] and write type of joke [knock-knock, general, programming, funny story, reddit]:smiley:!!!";
113 bot.postMessageToChannel(current_channel, comment, emoji.emojis('smiliey')); 113 bot.postMessageToChannel(current_channel, comment, emoji.emojis('smiliey'));
114 } 114 }
...@@ -344,10 +344,10 @@ knockknockJoke= (user_channel)=>{ ...@@ -344,10 +344,10 @@ knockknockJoke= (user_channel)=>{
344 } 344 }
345 345
346 //Function for giving out information to user to control the bot 346 //Function for giving out information to user to control the bot
347 -runHelp = () =>{ 347 +runHelp = (user_channel) =>{
348 -
349 - comment = "Thanks for using Joker bot!:ghost::ghost:laugh:\nBot info: type '@joker --help'\nBot functions: @joker tell me [something] "
350 - bot.postMessageToChannel('everyone', "Type @joker and write a joke that you would like\n ex- @joker random",emoji.emojis('question'));
351 348
349 + comment = "Thanks for using Joker bot!:ghost::ghost:laugh:\nBot info: type '@joker --help' for infos\nBot functions: '@joker tell me [something] joke' will send related jokes, if I don't have what you mentioned, I will tell you I don't have that joke:smile:\n"
350 + current_jokes = "Joke types I have: general , knock-knock , programming , reddit, funny story"
351 + bot.postMessageToChannel(user_channel, comment + current_jokes ,emoji.emojis('question'));
352 } 352 }
353 } 353 }
......