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-06-01 18:30:45 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
5b103ab936df864fe7d652067e282e157670482b
5b103ab9
1 parent
83302c73
add new funny joke
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
Routers/route.js
Routers/route.js
View file @
5b103ab
...
...
@@ -113,8 +113,8 @@ function handleMessage(message, current_channel){
bot
.
postMessageToChannel
(
current_channel
,
comment
,
emoji
.
emojis
(
'smiliey'
));
}
else
if
(
message
.
includes
(
' what jokes'
)){
jokeTypes
=
[
"general"
,
'programming'
,
'knock-knock'
];
bot
.
postMessageToChannel
(
current_channel
,
`I have
${
jokeTypes
[
0
]}
,
${
jokeTypes
[
1
]}
,
${
jokeTypes
[
2
]}
jokes!! :thumbsup: :thumbsup:`
,
emoji
.
emojis
(
'thumbsup'
));
jokeTypes
=
[
"general"
,
'programming'
,
'knock-knock'
,
'reddit'
,
'funny story'
];
bot
.
postMessageToChannel
(
current_channel
,
`I have
${
jokeTypes
[
0
]}
,
${
jokeTypes
[
1
]}
,
${
jokeTypes
[
2
]}
,
${
jokeTypes
[
3
]}
,
${
jokeTypes
[
4
]}
jokes!! :thumbsup: :thumbsup:`
,
emoji
.
emojis
(
'thumbsup'
));
return
;
}
//else if(message.inculdes(' write'))
...
...
@@ -257,7 +257,7 @@ programmingJoke= (user_channel)=>{
//Function for giving out
random joke after filtering only reddit jokes
//Function for giving out
funny story
Funnystory
=
(
user_channel
)
=>
{
MongoClient
.
connect
(
url
,
function
(
err
,
client
){
if
(
err
)
throw
err
;
...
...
Please
register
or
login
to post a comment