Use safe_concat instead of concat
This commit is contained in:
parent
79ebe9b1e1
commit
80e0f53e85
1 changed files with 1 additions and 1 deletions
|
@ -21,7 +21,7 @@ defmodule HahaYes.Events.MessagesConsumer do
|
||||||
|> Enum.at(0)
|
|> Enum.at(0)
|
||||||
|> String.downcase()
|
|> String.downcase()
|
||||||
|> String.capitalize()
|
|> 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
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue