-
Notifications
You must be signed in to change notification settings - Fork 7
Conversation
sync with master
Added the "rank" command to allow speedrunners to pull their specific stats in the general categories. The new command has the form: rank <playername> <category> <type> playername = name in the speedrun sheet category = 3star, 4star, 5star, or Torment (defaults to 4star) type = overall or no-csb (defaults to overall)
Oh I forgot to mention this is intended to resolve #29 |
ffrkbot.js
Outdated
@@ -18,7 +18,7 @@ const client = new Commando.Client({ | |||
|
|||
client.on('ready', () => { | |||
console.log(`Logged in as ${client.user.username}!`); | |||
client.user.setGame(',help'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change isn't related and should be in a separate pull request.
utilities/speedrank-utils.js
Outdated
} | ||
switch (category) { | ||
case '3star': | ||
category = 'GL 3* '+version+ ' rankings'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For consistency's sake, I'd like for you to use Javascript's template literals to match the rest of the documentation for anything here. For example, instead of:
category = 'GL 3* '+version+ ' rankings';
Try:
`category = GL 3* ${version} rankings;`
Removed some extraneous changes from commit Brought rank command in line with template literal usage
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've made some comments with change requests.
As a final note, you don't have to do this for this particular pull request, but you'll notice that there's a lot of repeated code right now in this and in speedrun-utils.js
. If you want to be really fly, make a separate pull request in which you combine common functions into one file, then export those functions so you can import them elsewhere. That way, you aren't duplicating functions across files and you don't have to maintain two versions of the same function.
1) Cleaned up rank command examples 2) The spreadsheet formatting of the playername will now be used in the table output
Speedrank (brasstax#33)
Speedrank (brasstax#33)
Added the "rank" command to allow speedrunners to pull their specific stats in the general categories.
The new command has the form:
rank
playername = name in the speedrun sheet
category = 3star, 4star, 5star, or Torment (defaults to 4star)
type = overall or no-csb (defaults to overall)