samuelsogbesan / leetbot

LeetCode Question Bot for Discord.
Apache License 2.0
1 stars 0 forks source link

Implement Parser 🥥 #14

Closed samuelsogbesan closed 3 years ago

samuelsogbesan commented 3 years ago

Implement the code for parsing commands inputted from the user.

Commands are expected to take the form '-commandName --arg1 --arg2 arg2Value' and should be parsed into the form

{ command: 'command-name', args: { arg1: [values], arg2: [values], flag3: undefined } }

If the argument has no value (i.e. it's a flag, such as -commandName --arg1, the value should be undefined).

To work on this, checkout the branch command-parser.