//postMessageToChannel(name, message [, params, callback]) (return: promise) - posts a message to channel by name.
bot.postMessageToChannel(data.channels[i].name,'Have some fun with @Joker!\nFor commands write @joker --help',
bot.postMessageToChannel(data.channels[i].name,'Have some fun with @Joker!\nFor commands write @jokebot --help',
emoji.emojis('bowtie'));
}
returndata;
...
...
@@ -107,11 +107,11 @@ function handleMessage(message, current_channel){
elseif(message.includes(' funny story')){
Funnystory(current_channel);
}
elseif(message.includes(' userjoke')){
elseif(message.includes(' my joke')||message.includes(' myjoke')){
UserMakeJoke(message,current_channel);
}
elseif(message.includes(' me')){
comment="Please use @joker --help to know what I can do!:smile::smile::smile:\n You can write type of joke[knock-knock, general, programming, funny story, reddit]";
comment="Please use @jokebot --help to know what I can do!:smile::smile::smile:\n You can write type of joke[knock-knock, general, programming, funny story, reddit]";
bot.postMessageToChannel(current_channel,"Tell you what??? :no_mouth:",emoji.emojis('no_mouth'));
//Function for giving out information to user to control the bot
runHelp=(user_channel)=>{
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"
comment="Thanks for using jokebot bot!:ghost::ghost:laugh:\nBot info: type '@jokebot help' for infos\nBot functions: '@jokebot 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"
ownJoke="Wanna add your own joke? Just type '@jokebot [make joke : (question), (your joke)]' ! Want to check what jokes you added? Just simply type '@jokebot tell me my joke:smiley:'";