Use safe_concat instead of concat

This commit is contained in:
Loïc Bersier 2024-10-13 17:17:28 +02:00
parent 79ebe9b1e1
commit 80e0f53e85

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(String.downcase(msg.content), "#{prefix}#{String.downcase(&1)} ", ""))))
|> then(& Module.safe_concat(HahaYes.Commands, &1).execute(msg, ws_state, String.split(String.replace(String.downcase(msg.content), "#{prefix}#{String.downcase(&1)} ", ""))))
end
end
end