Toggle navigation
Toggle navigation
This project
Loading...
Sign in
김민욱
/
Slack Jokebot
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Issues
1
Network
Create a new issue
Commits
Issue Boards
Authored by
김연준
2019-05-28 15:18:33 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
096ad4b69a3221044d39bbc89734bfc97d3668a1
096ad4b6
1 parent
5d20c9d2
Changing README screenshot
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
48 deletions
README.md
Routers/route.js
README.md
View file @
096ad4b
<h1>
Building a Slackbot
</h1><br>
<h2>
A slackbot that reacts to user's chat
</h2><br>

\ No newline at end of file

\ No newline at end of file
...
...
Routers/route.js
View file @
096ad4b
...
...
@@ -300,51 +300,5 @@ runHelp = () =>{
comment
=
"Thanks for using Joker bot!:ghost::ghost:laugh:\nBot info: type '@joker --help'\nBot functions: @joker tell me [something] "
bot
.
postMessageToChannel
(
'everyone'
,
"Type @joker and write a joke that you would like\n ex- @joker random"
,
face
);
}
}
}
// function generalJoke(){
// dboperation.getdata(dbname, collec, "general")
// .then((data) =>{
// var query = { state: 'OK' };
// var n = data.count(query);
// var r = Math.floor(Math.random() * n);
// var randomElement = data.find(query).limit(1).skip(r);
// var question = randomElement.setup;
// var joke = randomElement.punchline;
// const face = {
// icon_emoji: ':laughing:'
// };
// bot.postMessageToChannel('everyone', question, joke, face);
// bot.postMessageToChannel('full-stack-web', question, joke, face);
// bot.postMessageToChannel('bot_test', question, joke, face);
// });
// };
// // Tell a yomama Joke
// function yomamaJoke(){
// axios.get('http://api.yomomma.info/')
// .then(res =>{
// const joke = res.data.joke;
// const face = {
// icon_emoji: ':laughing:'
// };
// bot.postMessageToChannel('everyone', `Yo mama: ${joke}`,face);
// bot.postMessageToChannel('full-stack-web', `Yo mama: ${joke}`,face);
// bot.postMessageToChannel('bot_test', `Yo mama: ${joke}`,face);
// });
// };
// //Tell random joke
// function runhelp(){
// const face = {
// icon_emoji: ':question:'
// };
// bot.postMessageToChannel('everyone', "Type @joker and write a joke that you would like\n ex- @joker random",face);
// bot.postMessageToChannel('full-stack-web', "Type @joker and write a joke that you would like\n ex- @joker random",face);
// }
...
...
Please
register
or
login
to post a comment