Skip to content

Commit

Permalink
New chart command
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiTenno committed Mar 6, 2017
1 parent cd61d8e commit a4f5a88
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions src/commands/Ondemand/Progression.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
'use strict';

const Command = require('../../Command.js');

/**
* Displays the Warframe Progression Chart
*/
class Progression extends Command {
/**
* Constructs a callable command
* @param {Genesis} bot The bot object
*/
constructor(bot) {
super(bot, 'warframe.misc.progress', 'progress', 'Display Warframe Progression Chart');
this.progressionChart = 'http://i.imgur.com/0uutM7a.png';
}

/**
* Run the command
* @param {Message} message Message with a command to handle, reply to,
* or perform an action based on parameters.
*/
run(message) {
message.channel.sendFile(this.progressionChart, 'progression.png',
`Operator ${message.author.toString()}, the progression flowchart, at your request.`)
.then(() => {
if (message.deletable) {
return message.delete(2000);
}
return Promise.resolve();
}).catch(this.logger.error);
}
}

module.exports = Progression;

0 comments on commit a4f5a88

Please sign in to comment.