Skip to content

Commit

Permalink
Tiny fix for #109
Browse files Browse the repository at this point in the history
For .sayblah, chunk was correctly consuming "say", but then we got an
unknown error when it tried to consume spaces
  • Loading branch information
finnbar committed Jan 28, 2022
1 parent 323b288 commit f0de7ea
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Tablebot/Internal/Handler/Command.hs
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,7 @@ parseCommands cs m prefix = case parse (parser cs) "" (messageText m) of
Nothing -> Just <$> command
matchCommand :: CompiledCommand -> Parser (Maybe (Parser (Message -> CompiledDatabaseDiscord ()), [CompiledCommand]))
matchCommand c = do
_ <- chunk (commandName c)
skipSpace1 <|> eof
try (chunk (commandName c) *> (skipSpace1 <|> eof))
return (Just (commandParser c, commandSubcommands c))

data ReadableError = UnknownError | KnownError String [String]
Expand Down

0 comments on commit f0de7ea

Please sign in to comment.