samuelsogbesan / leetbot

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

Implement Command Parser 🥥 #15

Closed samuelsogbesan closed 3 years ago

samuelsogbesan commented 3 years ago

Implements the method responsible for consuming discord bot commands. The method returns an object containing the command as well as its arguments. An argument itself is an object mapping the argumentName to an array of argumentValues, in order. If an arguement is just a flag (it has no values), then it is mapped to undefined.

UPDATED Example:

image

Returns:

image

The implementation is a bit messy so I'll need to clean it up.

closes #14