jakevoytko / crbot

A Discord bot that acts as a call-and-response bot. It reacts to ? commands with the learned response.
MIT License
7 stars 3 forks source link

Modify ?learn to better deal with whitespace #18

Closed jakevoytko closed 7 years ago

jakevoytko commented 7 years ago

Both Russ and Chris ran into this; ?learn<space>call<space><space>response or ?learn<space><space>call<space>response are both handled badly (it's a parse error). It should gracefully handle the extra whitespace.

Chris suggested Regexes, but since the command is already split to multiplex between parsers, I think I actually want to find the first non-empty words for call and beginning of response