ryanwinchester / tmi.ex

Twitch Messaging Interface for Elixir.
Apache License 2.0
42 stars 7 forks source link

Macros for matching regex #3

Closed ryanwinchester closed 2 months ago

ryanwinchester commented 3 years ago

It would be great if we could do stuff like:

handle_message ~r/^!(?<cmd>[^\w]+)/, matches, sender, chat do
  %{"cmd" => command} = matches
  reply(chat, "Cool #{command} command, #{sender}")
end
ryanwinchester commented 2 months ago

i don't think i will do this