From 02ccacf3d03249fc7937014d5ab283a0fc2b440c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lo=C3=AFc=20Bersier?= <loic.bersier1@gmail.com>
Date: Sat, 12 Oct 2024 21:37:06 +0200
Subject: [PATCH] repeat what the user says

---
 lib/HahaCommands/say.ex | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
 create mode 100644 lib/HahaCommands/say.ex

diff --git a/lib/HahaCommands/say.ex b/lib/HahaCommands/say.ex
new file mode 100644
index 0000000..4ed6620
--- /dev/null
+++ b/lib/HahaCommands/say.ex
@@ -0,0 +1,21 @@
+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