Showing
9 changed files
with
103 additions
and
12 deletions
CONTRIBUTING.md
0 → 100644
1 | +# Request for contributions | ||
2 | + | ||
3 | +Please contribute to this repository if any of the following is true: | ||
4 | +- You have expertise in community development, communication, or education | ||
5 | +- You want open source communities to be more collaborative and inclusive | ||
6 | +- You want to help lower the burden to first time contributors | ||
7 | +- You want to enhance this project for your assignment project | ||
8 | + | ||
9 | +# How to contribute | ||
10 | + | ||
11 | +Prerequisites: | ||
12 | + | ||
13 | +- Familiarity with [pull requests](https://help.github.com/articles/using-pull-requests) and [issues](https://guides.github.com/features/issues/). | ||
14 | +- Knowledge of [Markdown](https://help.github.com/articles/markdown-basics/) for editing `.md` documents. | ||
15 | + | ||
16 | +In particular, this project members seeks the following types of contributions: | ||
17 | + | ||
18 | +- **Ideas**: participate in an issue thread or start your own to have your voice | ||
19 | +heard. | ||
20 | +- **Writing**: contribute your expertise in an area by helping us expand the included | ||
21 | +content. | ||
22 | +- **Copy editing**: fix typos, clarify language, and generally improve the quality | ||
23 | +of the content. | ||
24 | +- **Formatting**: help keep content easy to read with consistent formatting. | ||
25 | + | ||
26 | +# Conduct | ||
27 | + | ||
28 | +We are committed to providing a friendly, safe and welcoming environment for | ||
29 | +all, regardless of gender, sexual orientation, disability, ethnicity, religion, | ||
30 | +or similar personal characteristic. | ||
31 | + | ||
32 | +Please avoid using overtly sexual nicknames or other nicknames that | ||
33 | +might detract from a friendly, safe and welcoming environment for all. | ||
34 | + | ||
35 | +Please be kind and courteous. There's no need to be mean or rude. | ||
36 | +Respect that people have differences of opinion and that every design or | ||
37 | +implementation choice carries a trade-off and numerous costs. There is seldom | ||
38 | +a right answer, merely an optimal answer given a set of values and | ||
39 | +circumstances. | ||
40 | + | ||
41 | +Please keep unstructured critique to a minimum. If you have solid ideas you | ||
42 | +want to experiment with, make a fork and see how it works. | ||
43 | + | ||
44 | +We will exclude you from interaction if you insult, demean or harass anyone. | ||
45 | +That is not welcome behaviour. We interpret the term "harassment" as | ||
46 | +including the definition in the | ||
47 | +[Citizen Code of Conduct](http://citizencodeofconduct.org/); | ||
48 | +if you have any lack of clarity about what might be included in that concept, | ||
49 | +please read their definition. In particular, we don't tolerate behavior that | ||
50 | +excludes people in socially marginalized groups. | ||
51 | + | ||
52 | +Private harassment is also unacceptable. No matter who you are, if you feel | ||
53 | +you have been or are being harassed or made uncomfortable by a community | ||
54 | +member, please contact one of the channel ops or any of the | ||
55 | +[CONTRIBUTING.md](https://github.com/jden/CONTRIBUTING.md) core team | ||
56 | +immediately. Whether you're a regular contributor or a newcomer, we care about | ||
57 | +making this community a safe place for you and we've got your back. | ||
58 | + | ||
59 | +Likewise any spamming, trolling, flaming, baiting or other attention-stealing | ||
60 | +behaviour is not welcome. | ||
61 | + | ||
62 | +# Communication | ||
63 | + | ||
64 | +In both contexts, please follow the conduct guidelines above. Language issues | ||
65 | +are often contentious and we'd like to keep discussion brief, civil and focused | ||
66 | +on what we're actually doing, not wandering off into too much imaginary stuff. | ||
67 | + | ||
68 | +# Frequently Asked Questions | ||
69 | + | ||
70 | +*please add* |
1 | const MongoClient = require('mongodb').MongoClient; | 1 | const MongoClient = require('mongodb').MongoClient; |
2 | -const jokedoc = require('./joke_data/jokes.json'); | 2 | +const jokedoc = require('../joke_data/jokes.json'); |
3 | const dbname = 'jokeapi'; | 3 | const dbname = 'jokeapi'; |
4 | const collec = 'jokes'; | 4 | const collec = 'jokes'; |
5 | const dboperation = require('./operations.js'); | 5 | const dboperation = require('./operations.js'); | ... | ... |
1 | const MongoClient = require('mongodb').MongoClient; | 1 | const MongoClient = require('mongodb').MongoClient; |
2 | -const jokedoc = require('./joke_data/Funny_story.json'); | 2 | +const jokedoc = require('../joke_data/Funny_story.json'); |
3 | const dbname = 'FunnyStoryapi'; | 3 | const dbname = 'FunnyStoryapi'; |
4 | const collec = 'FunnyStory'; | 4 | const collec = 'FunnyStory'; |
5 | const dboperation = require('./operations.js'); | 5 | const dboperation = require('./operations.js'); | ... | ... |
1 | const MongoClient = require('mongodb').MongoClient; | 1 | const MongoClient = require('mongodb').MongoClient; |
2 | -const jokedoc = require('./joke_data/reddit_joke.json'); | 2 | +const jokedoc = require('../joke_data/reddit_joke.json'); |
3 | const dbname = 'redditjoke'; | 3 | const dbname = 'redditjoke'; |
4 | const collec = 'reddit'; | 4 | const collec = 'reddit'; |
5 | const dboperation = require('./operations.js'); | 5 | const dboperation = require('./operations.js'); | ... | ... |
File moved
LICENSE
0 → 100644
1 | +The MIT License (MIT) | ||
2 | + | ||
3 | +Copyright (c) 2019 김민욱, 김연준, 오원석 | ||
4 | + | ||
5 | +Permission is hereby granted, free of charge, to any person obtaining a copy | ||
6 | +of this software and associated documentation files (the "Software"), to deal | ||
7 | +in the Software without restriction, including without limitation the rights | ||
8 | +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
9 | +copies of the Software, and to permit persons to whom the Software is | ||
10 | +furnished to do so, subject to the following conditions: | ||
11 | + | ||
12 | +The above copyright notice and this permission notice shall be included in all | ||
13 | +copies or substantial portions of the Software. | ||
14 | + | ||
15 | +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
16 | +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
17 | +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
18 | +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
19 | +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
20 | +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
21 | +SOFTWARE. |
... | @@ -4,7 +4,8 @@ | ... | @@ -4,7 +4,8 @@ |
4 | <h3>Currently operating on aws EC2 / managing it to run on docker container combining mongodb and the code to interact on 'aws docker version' branch</h3><br><br> | 4 | <h3>Currently operating on aws EC2 / managing it to run on docker container combining mongodb and the code to interact on 'aws docker version' branch</h3><br><br> |
5 | <b>Collected Jokes api link: https://github.com/15Dkatz/official_joke_api<br> | 5 | <b>Collected Jokes api link: https://github.com/15Dkatz/official_joke_api<br> |
6 | Opensource for slackbot module link : https://github.com/mishk0/slack-bot-api<br> | 6 | Opensource for slackbot module link : https://github.com/mishk0/slack-bot-api<br> |
7 | -Used Database: Mongodb</b><br> | 7 | +Base opensource for jokebot idea: https://github.com/bradtraversy/slack_jokebot<br><br> |
8 | +Used Database: Mongodb</b><br><br><br> | ||
8 | 9 | ||
9 | 10 | ||
10 |  | 11 |  | ... | ... |
... | @@ -116,9 +116,8 @@ function handleMessage(message, current_channel){ | ... | @@ -116,9 +116,8 @@ function handleMessage(message, current_channel){ |
116 | } | 116 | } |
117 | 117 | ||
118 | } | 118 | } |
119 | - else if(message.includes(' help')){ | 119 | + else if(message.includes(' --help')){ |
120 | - comment = "If you want to start @joker then write [tell me] and write type of joke [knock-knock, general, programming, funny story, reddit]:smiley:!!!"; | 120 | + runHelp(current_channel); |
121 | - bot.postMessageToChannel(current_channel, comment, emoji.emojis('smiliey')); | ||
122 | } | 121 | } |
123 | else if(message.includes(' what jokes')){ | 122 | else if(message.includes(' what jokes')){ |
124 | jokeTypes = ["general", 'programming', 'knock-knock','reddit','funny story']; | 123 | jokeTypes = ["general", 'programming', 'knock-knock','reddit','funny story']; |
... | @@ -399,10 +398,10 @@ knockknockJoke= (user_channel)=>{ | ... | @@ -399,10 +398,10 @@ knockknockJoke= (user_channel)=>{ |
399 | } | 398 | } |
400 | 399 | ||
401 | //Function for giving out information to user to control the bot | 400 | //Function for giving out information to user to control the bot |
402 | -runHelp = () =>{ | 401 | +runHelp = (user_channel) =>{ |
403 | - | ||
404 | - comment = "Thanks for using Joker bot!:ghost::ghost:laugh:\nBot info: type '@joker --help'\nBot functions: @joker tell me [something] " | ||
405 | - bot.postMessageToChannel('everyone', "Type @joker and write a joke that you would like\n ex- @joker random",emoji.emojis('question')); | ||
406 | 402 | ||
403 | + 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" | ||
404 | + current_jokes = "Joke types I have: general , knock-knock , programming , reddit, funny story" | ||
405 | + bot.postMessageToChannel(user_channel, comment + current_jokes ,emoji.emojis('question')); | ||
407 | } | 406 | } |
408 | } | 407 | } | ... | ... |
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"}]} | ||
... | \ 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"}]} | ||
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
-
Please register or login to post a comment