cronokirby / alchemy

A discord library for Elixir
MIT License
152 stars 34 forks source link

Parsing command parameter that contain space #70

Closed Arpple closed 5 years ago

Arpple commented 5 years ago

I need to parse a bot command with a parameter that contain space

a pattern of discord message I tried

!command "The Parameter"

what I got from Cogs

Cogs.def command(arg) do
  # arg = "The
end

is it possible to capture all the string in quote to be a single parameter or if there is other way to capture the space? (maybe The\ String or something)

Arpple commented 5 years ago

ok, after reading more api references, I see that there is the Cogs.set_parser to handle that