Removed hardcoded value with spaghetti

This commit is contained in:
Loïc Bersier 2024-10-12 21:37:17 +02:00
parent 02ccacf3d0
commit 79ebe9b1e1

View file

@ -21,7 +21,7 @@ defmodule HahaYes.Events.MessagesConsumer do
|> Enum.at(0)
|> String.downcase()
|> String.capitalize()
|> then(& Module.concat(HahaYes.Commands, &1).execute(msg, ws_state, String.split(String.replace(msg.content, "h3h3 download ", ""))))
|> then(& Module.concat(HahaYes.Commands, &1).execute(msg, ws_state, String.split(String.replace(String.downcase(msg.content), "#{prefix}#{String.downcase(&1)} ", ""))))
end
end
end