Compare commits
No commits in common. "79ebe9b1e15543bf4945aeeb44c788289ea458a6" and "c0dba0633bafe4b6f381cf90f0fd06b79ae772fe" have entirely different histories.
79ebe9b1e1
...
c0dba0633b
2 changed files with 1 additions and 22 deletions
|
@ -1,21 +0,0 @@
|
||||||
defmodule HahaYes.Commands.Say do
|
|
||||||
@moduledoc """
|
|
||||||
Repeat back what the user said
|
|
||||||
"""
|
|
||||||
|
|
||||||
alias Nostrum.Api
|
|
||||||
|
|
||||||
@doc """
|
|
||||||
Repeat back what the user said
|
|
||||||
|
|
||||||
## Example
|
|
||||||
|
|
||||||
User: h3h3 say how are you
|
|
||||||
|
|
||||||
Bot: how are you
|
|
||||||
"""
|
|
||||||
|
|
||||||
def execute(msg, _ws_state, args) do
|
|
||||||
Api.create_message(msg.channel_id, Enum.join(args, " "))
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -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.concat(HahaYes.Commands, &1).execute(msg, ws_state, String.split(String.replace(msg.content, "h3h3 download ", ""))))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue