move slack greeting into this repo

This commit is contained in:
Alex Grintsvayg 2016-09-08 17:54:48 -04:00
parent c1938a3fb5
commit 0af495264d
2 changed files with 15 additions and 4 deletions

10
app.js
View file

@ -1,5 +1,7 @@
var SlackBot = require('slackbots');
var request = require('request');
var fs = require('fs');
var path = require('path');
['SLACK_TOKEN', 'RPCUSER', 'RPCPASSWORD', 'IMGUR_CLIENT_ID'].forEach(function(envVar) {
if (!process.env[envVar]) {
@ -14,10 +16,10 @@ var slackbot = new SlackBot({
function sendWelcomeMessage(usertowelcome) {
request('https://raw.githubusercontent.com/lbryio/lbry.io/master/posts/other/slack-greeting.md', function (error, response, body) {
if (!error && response.statusCode == 200) {
slackbot.postMessage(usertowelcome, body);
function sendWelcomeMessage(user) {
fs.readFile(path.join(path.dirname(require.main.filename), 'slack-greeting.md'), {encoding: 'utf-8'}, function (error, data) {
if (!error) {
slackbot.postMessage(user, data);
}
});
};

9
slack-greeting.md Normal file
View file

@ -0,0 +1,9 @@
Welcome to LBRY Slack! A few things for new users to know:
- LBRY is currently invite only. To get access ASAP, get on the list here: https://lbry.io/get
- We will not give you an invite unless you demonstrate an ability to contribute or are a badass in some other way
- Outside of the #help channel, do not ask basic or beginner questions
- If you're a developer, we encourage you to join #dev. Warning: competent people only
- Keep it on topic (LBRY), outside of #random_nsfw, which is a 4chan level of NSFW
- Read the FAQ: http://lbry.io/faq
- Be courteous, kind, and generous