Refactor command-related code #2
Labels
c:commands
Category: Commands
p:high
Priority: High
s:done
Stage: Done
t:change-request
Type: Change Request
Description
This issue proposes the simplification of command-related code, and the implementation of a better, more object-oriented solution to command loading and parsing.
Why?
The current code for loading and parsing commands makes use of a number of "-er" classes, e.g.
CommandLoader
,CommandParser
. Such classes tend to behave simply as collections of functionality, rather than definitions for proper objects.Implementation Details
A single
Command
class that serves two functions:getCommand(msg: Message)
method that identified a command by checking for a prefix and a valid command name, and returning the name of the command to be executed, if any.The text was updated successfully, but these errors were encountered: