This is a Slack app designed to help you build a competent raid fireteam in Destiny 2. It's triggered with a slash command that you customize.
/speaker marcuswindecker
returns an initial response that looks like:
I'm consulting with the Traveler...
This initial response satisfies the 3sec window that Slack waits for before timing out the request. Once the full stats are retrieved, a followup response is POSTed to the response_url
sent with the initial Slack request.
Optionally, you can submit a platform ('psn', 'xbox', 'pc') to search that platform specifically. If this platform isn't present, then the request will default to PSN.
An error message is returned if the user isn't found on the platform or if an incorrect number of params is sent in the request.
- Clone or fork this repo
npm install
npm start
- The server will spin up at
http://localhost:3000
(you can configure the port inindex.js
) - Verify that the app has compiled correctly and is accessible using Postman or cURL
- When you are able to verify that the app is responding as expected, follow these instructions to deploy the app on Heroku
- When you've verified that the app is correctly deployed on Heroku, create a new slack app in your channel. Create a slash command within the app and point it at your newly created Heroku URL using whatever command you prefer to trigger the app, I like
/speaker
but you can use/freaker
if you want. - If all goes well, you'll be reporting on fools in no time and getting those 30-minute raids in with a solid team.
Note: currently, there is only a single endpoint configured: /api/raid
. The request/response structures are as follows:
POST /api/raid
Request:
{
text: '[<platform>] <username>',
response_url: <url>
}
Initial Response:
{
response_type: 'in_channel',
text: 'I\'m consulting with the Traveler...'
}
Delayed Response (success):
{
response_type: 'in_channel',
text: 'Here are the detailed stats for <username> on <platform>'
attachments: [{
fallback: '<username> has <completion_count> completions in total on <platform>.',
fields: [
{
title: 'Total Completions',
value: <completion_count>,
short: true
},
{
title: 'Completion Percentage',
value: <completion_percentage>,
short: true
},
{
title: 'Fastest Time',
value: <fastest_time>,
short: true
}
],
color: 'good'
}]
}
Delayed Response (error):
{
response_type: 'in_channel',
attachments: [{
fallback: <error_message>,
text: <error_message>,
color: 'danger'
}]
}
The code in this repo may be stable or unstable at any given time. Beware! Maybe if this thing gets traction I'll put a proper release protocol in place but for now everything's going to master
!
- Ability to specify a specific raid with the request i.e.
/speaker leviathan marcuswindecker
,/speaker eaterofworlds marcuswindecker
- Include additional stats like:
- times: average, most recent
- dates: first, most recent
- The Traveler npm package from @alexanderwe - This package is the only reason this entire project came together. I can't express how happy I was to find this and how smooth it made the project.
- The raid.report team for their work on one of the most damn useful Destiny 2 webapps I've come across. Seriously, that thing is slick.
- Bungie for providing such a comprehensive API for Destiny 2.