All Projects β†’ radibit β†’ Js Tips Slack Bot

radibit / Js Tips Slack Bot

Licence: mit
πŸ“¨ Slack Bot for getting the latest JS Tips

Programming Languages

javascript
184084 projects - #8 most used programming language

Labels

Projects that are alternatives of or similar to Js Tips Slack Bot

slack-timezone-bot
πŸ€–β° Slack bot to show time in users' timezones
Stars: ✭ 51 (+183.33%)
Mutual labels:  slackbot
operationcode-pybot
Operation Code's Official Slackbot
Stars: ✭ 29 (+61.11%)
Mutual labels:  slackbot
Threat-Intel-Slack-Bot
Interactive Threat Intelligence Bot that leverages serverless framework, AWS/GCP, and Slack
Stars: ✭ 26 (+44.44%)
Mutual labels:  slackbot
slackr
Simple shell command to send or pipe content to slack via webhooks. (To upload snippets or files use: www.github.com/a-sync/slackfu)
Stars: ✭ 41 (+127.78%)
Mutual labels:  slackbot
slack-cat
meow
Stars: ✭ 16 (-11.11%)
Mutual labels:  slackbot
SlackWebhooksGithubCrawler
Search for Slack Webhooks token publicly exposed on Github
Stars: ✭ 21 (+16.67%)
Mutual labels:  slackbot
chessbot
Slack bot for playing chess.
Stars: ✭ 32 (+77.78%)
Mutual labels:  slackbot
Slacker
Slack Bot Framework
Stars: ✭ 495 (+2650%)
Mutual labels:  slackbot
slack widgets
An abstraction of the JSON structure needed to create widgets in Slack message attachments
Stars: ✭ 14 (-22.22%)
Mutual labels:  slackbot
fplbot
πŸ€– Chatbot for Fantasy Premier League (Slack/Discord)
Stars: ✭ 14 (-22.22%)
Mutual labels:  slackbot
inspireNuggetsSlackBot
A simple Slackbot that displays random inspiring techie quotes and jokes for developers/designers.
Stars: ✭ 15 (-16.67%)
Mutual labels:  slackbot
git-slack-notify
Sends Slack notifications for new commits in Git repositories
Stars: ✭ 12 (-33.33%)
Mutual labels:  slackbot
iou-slack-bot
πŸ’Έ IOU Slack Bot - Keep track of your debts with your peers.
Stars: ✭ 13 (-27.78%)
Mutual labels:  slackbot
progress
Create Slack progress bars
Stars: ✭ 64 (+255.56%)
Mutual labels:  slackbot
allot
Parse placeholder and wildcard text commands
Stars: ✭ 51 (+183.33%)
Mutual labels:  slackbot
slackcat
Concatenate files(s), or stdin, directly to Slack. 🐈
Stars: ✭ 19 (+5.56%)
Mutual labels:  slackbot
dienstplan
Slack bot app for duty rotations
Stars: ✭ 14 (-22.22%)
Mutual labels:  slackbot
Scrape Rss Bot
Slack bot that converts links to an RSS feed
Stars: ✭ 16 (-11.11%)
Mutual labels:  slackbot
letterbot
Github Action 으둜 λ§Œλ“  λ””μŠ€μ½”λ“œ, μŠ¬λž™μ— 맀일 μ•„μΉ¨ 8μ‹œμ— λΈŒλ¦¬ν•‘μ„ ν•΄μ£ΌλŠ” λ΄‡μž…λ‹ˆλ‹€
Stars: ✭ 37 (+105.56%)
Mutual labels:  slackbot
pr-police
⚠️ Pr. Police is deprecated and no longer supported ⚠️
Stars: ✭ 60 (+233.33%)
Mutual labels:  slackbot

JS Tips Slack Bot

Slack Bot implementation for sending the latest JS tips collected in https://github.com/loverajoel/jstips.

Install Node.js and npm

This is a Node.js app, so the first step is to be sure you have installed Node.js and npm:

  • OS X

Go to nodejs.org, Click install, and run through the install process.

  • Ubuntu

You can use the Node.js binary distributions

curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash -
sudo apt-get install -y nodejs

More installation help at https://github.com/nodesource/distributions#deb

  • Windows

Go ahead to download the Windows binary at https://nodejs.org/en/download/

Clone this repo

Next step is to clone this repository using the following command:

git clone [email protected]:radibit/js-tips-slack-bot.git

and navigate to the cloned project folder:

cd js-tips-slack-bot

Installation

In the project folder run the command

npm install

in order to install locally the required dependencies.

Config

There are four config variables for this project:

  • GH_TOKEN - GitHub API token - can be generated from your GitHub settings panel
  • SLACK_TOKEN - Slack API Token - in order to create one visit Slack API settings
  • SLACK_GROUP - Target Slack group - specify the Slack group that will receive the messages
  • SLACK_POST_TO ( optional ) - Specify if the messages should be posted to a private group ( group ) which is the default option or a public channel ( channel )
  • DATABASE_URL - Heroku Postgres URL - provide URL in order to connect the app to a Postgres database. Once you installed the Heroku Postgres add-on you can find the required information on the connection settings panel

Test it locally

First you need to create .env file in the root folder of the project and list there the required config variables. You can use as a reference the .sample-env file.

After providing the required values for the config variables, you can run the app with the following command:

npm run start

If you want to end the started terminal process, you can do this using ctrl + c

Playing with the script you can adjust whether you want to send the js tip to a Slack group ( default ), channel or single user. More info about the exposed methods of the Slack's Real Time Messaging API can be found here

Heroku set up and deployment

It's fun to play locally with the app πŸ˜ƒ, but the real benefit of using it comes when we deploy it and set it up to automatically send us the new JS tips every day. So let's do this:

  1. Create an account and download Heroku https://toolbelt.heroku.com/

  2. Rename the .sample-env file to .env inside of the project folder and replace the placeholder variables with real tokens/values (see Config section)

  3. In the terminal, within the project folder, run the following command to create a new Heroku app:

heroku create

More help info how to use the Heroku CLI can be found on the Heroku DevCenter

  1. Commit and push the Heroku app:
git add -f .env

git commit -m "Added private tokens that I promise to never-ever-ever share with the public."

git push heroku master

With the last command you are actually deploying your app to Heroku and after that it will be already running live.

  1. You can find your new app listed in the Heroku dashboard

  2. Set up a database in order to store the latest JS tip and send a Slack message only when there is a new one.

You need to configure the Heroku Postgres add-on and create a table with a name js_tip and two columns - msg_id ( PRIMARY KEY ) and name ( varchar (250) )

  1. Enjoy πŸŽ‰
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].