오원석

conflict.resolve

# Request for contributions
Please contribute to this repository if any of the following is true:
- You have expertise in community development, communication, or education
- You want open source communities to be more collaborative and inclusive
- You want to help lower the burden to first time contributors
- You want to enhance this project for your assignment project
# How to contribute
Prerequisites:
- Familiarity with [pull requests](https://help.github.com/articles/using-pull-requests) and [issues](https://guides.github.com/features/issues/).
- Knowledge of [Markdown](https://help.github.com/articles/markdown-basics/) for editing `.md` documents.
In particular, this project members seeks the following types of contributions:
- **Ideas**: participate in an issue thread or start your own to have your voice
heard.
- **Writing**: contribute your expertise in an area by helping us expand the included
content.
- **Copy editing**: fix typos, clarify language, and generally improve the quality
of the content.
- **Formatting**: help keep content easy to read with consistent formatting.
# Conduct
We are committed to providing a friendly, safe and welcoming environment for
all, regardless of gender, sexual orientation, disability, ethnicity, religion,
or similar personal characteristic.
Please avoid using overtly sexual nicknames or other nicknames that
might detract from a friendly, safe and welcoming environment for all.
Please be kind and courteous. There's no need to be mean or rude.
Respect that people have differences of opinion and that every design or
implementation choice carries a trade-off and numerous costs. There is seldom
a right answer, merely an optimal answer given a set of values and
circumstances.
Please keep unstructured critique to a minimum. If you have solid ideas you
want to experiment with, make a fork and see how it works.
We will exclude you from interaction if you insult, demean or harass anyone.
That is not welcome behaviour. We interpret the term "harassment" as
including the definition in the
[Citizen Code of Conduct](http://citizencodeofconduct.org/);
if you have any lack of clarity about what might be included in that concept,
please read their definition. In particular, we don't tolerate behavior that
excludes people in socially marginalized groups.
Private harassment is also unacceptable. No matter who you are, if you feel
you have been or are being harassed or made uncomfortable by a community
member, please contact one of the channel ops or any of the
[CONTRIBUTING.md](https://github.com/jden/CONTRIBUTING.md) core team
immediately. Whether you're a regular contributor or a newcomer, we care about
making this community a safe place for you and we've got your back.
Likewise any spamming, trolling, flaming, baiting or other attention-stealing
behaviour is not welcome.
# Communication
In both contexts, please follow the conduct guidelines above. Language issues
are often contentious and we'd like to keep discussion brief, civil and focused
on what we're actually doing, not wandering off into too much imaginary stuff.
# Frequently Asked Questions
*please add*
const MongoClient = require('mongodb').MongoClient;
const jokedoc = require('./joke_data/jokes.json');
const jokedoc = require('../joke_data/jokes.json');
const dbname = 'jokeapi';
const collec = 'jokes';
const dboperation = require('./operations.js');
......
const MongoClient = require('mongodb').MongoClient;
const jokedoc = require('./joke_data/Funny_story.json');
const jokedoc = require('../joke_data/Funny_story.json');
const dbname = 'FunnyStoryapi';
const collec = 'FunnyStory';
const dboperation = require('./operations.js');
......
const MongoClient = require('mongodb').MongoClient;
const jokedoc = require('./joke_data/reddit_joke.json');
const jokedoc = require('../joke_data/reddit_joke.json');
const dbname = 'redditjoke';
const collec = 'reddit';
const dboperation = require('./operations.js');
......
The MIT License (MIT)
Copyright (c) 2019 김민욱, 김연준, 오원석
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
......@@ -4,7 +4,8 @@
<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>
<b>Collected Jokes api link: https://github.com/15Dkatz/official_joke_api<br>
Opensource for slackbot module link : https://github.com/mishk0/slack-bot-api<br>
Used Database: Mongodb</b><br>
Base opensource for jokebot idea: https://github.com/bradtraversy/slack_jokebot<br><br>
Used Database: Mongodb</b><br><br><br>
![joker_fix](https://user-images.githubusercontent.com/39256000/58455581-0ce84100-815d-11e9-833c-90c7af08f52f.jpg)
......
......@@ -116,9 +116,8 @@ function handleMessage(message, current_channel){
}
}
else if(message.includes(' help')){
comment = "If you want to start @joker then write [tell me] and write type of joke [knock-knock, general, programming, funny story, reddit]:smiley:!!!";
bot.postMessageToChannel(current_channel, comment, emoji.emojis('smiliey'));
else if(message.includes(' --help')){
runHelp(current_channel);
}
else if(message.includes(' what jokes')){
jokeTypes = ["general", 'programming', 'knock-knock','reddit','funny story'];
......@@ -399,10 +398,10 @@ knockknockJoke= (user_channel)=>{
}
//Function for giving out information to user to control the bot
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",emoji.emojis('question'));
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"
current_jokes = "Joke types I have: general , knock-knock , programming , reddit, funny story"
bot.postMessageToChannel(user_channel, comment + current_jokes ,emoji.emojis('question'));
}
}
......
{"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
{"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
......