A Slack bot named ReconBolt that sends you spicy Valorant news from https://playvalorant.com/en-us/news/.
Create a new slack app https://api.slack.com/apps?new_app=1
Retrieve apps client ID and client Secret and fill in .env
SLACK_CLIENT_ID=''
SLACK_CLIENT_SECRET=''
Add the redirection URL http://localhost:3000/install
to your app
Postgres database required. https://www.postgresql.org/download/
Update knexfile.js
with your database information:
module.exports = {
development: {
client: 'pg',
connection: {
port: 5432,
host: 'localhost',
database: 'slackbots',
user: 'root',
password: '',
}
}
}
Install dependencies
npm install
Migrate database to create required tables
npm run migrate
Start development server
npm run dev
localhost:3000/install
The install endpoint handles OAuth tokens and saves Slack server channel's required information to push messages.
localhost:3000/update
The endpoint is used to trigger a search for new articles. When new articles are found they are pushed to servers. By default the included cron job runs every five minutes.
Deploy to your favorite service that runs docker containers. Update knexfile.js
and .env
with your production database connection information.
To start production mode
npm run start
- Knex - A SQL Query Builder for Javascript
- Axios - Promise based HTTP client for the browser and node.js
- James Vansteenkiste - Initial work - jvanst
This project is licensed under the MIT License - see the LICENSE.md file for details