Closed mralanlee closed 6 years ago
I think the command routing system needs an overhaul in general. Ideally the routing commands would all conform to an abstract class to ensure certain commands.
canRespondToMessage handleMessage
Then the chat router simply takes all messages and loops through the chat command files and finds the first one that canRespond and returns the result of handleMessage
As a quick workaround to this issue, can we add a "minor text fix" in professor redwood's response to encourage people to try again? Right now it directs people to go to #professor_redwood but the !wild, !raid, and !egg commands need to be in the neighborhood channel. Perhaps something like (suggested by AdoptEmAll): "If you're trying to report an egg, a raid, or a Pokémon in the wild, use !egg, !raid, or !wild respectively. Otherwise, this command can only be run in #professor_redwood".
Thanks so much for all the hard work so far!
Other quick workaround request: can professor redwood respond to anything that starts with !nests to "see the pinned messages in #general_pogo_chat" ? Thanks again!
sparklerfish L36 Mystic - Today at 7:43 AM
I was thinking that we could change up the way the commands are setup. Currently we are using if statements to process each command. It may be better to use something like
switch
andcase
statements to evaluate the commands that come in, and it would make the cases more readable.