diff --git a/README.md b/README.md index bbbe9e9..3ac58c7 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,21 @@ -# Discord_Elixir_test +# HahaYes + +**TODO: Add description** + +## Installation + +If [available in Hex](https://hex.pm/docs/publish), the package can be installed +by adding `haha_yes` to your list of dependencies in `mix.exs`: + +```elixir +def deps do + [ + {:haha_yes, "~> 0.1.0"} + ] +end +``` + +Documentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc) +and published on [HexDocs](https://hexdocs.pm). Once published, the docs can +be found at . -Toying around with Elixir and Nostrum \ No newline at end of file diff --git a/lib/commands.ex b/lib/commands.ex new file mode 100644 index 0000000..3d0c317 --- /dev/null +++ b/lib/commands.ex @@ -0,0 +1,47 @@ +defmodule HahaCommands do + @moduledoc """ + Contain all the function for each commands + """ + + alias Nostrum.Api + + @doc """ + Reply with a simple "Pong!" + + ## Example + + User: h3h3 ping + + Bot: Pong! + """ + + def ping(msg) do + Api.create_message(msg.channel_id, "Pong!") + end + + @doc """ + Download the video sent by the user at 480p max. + + ## Parameters + + - url: String that represents the URL to download a video from. + + ## Examples + + User: h3h3 download https://x.com/i/status/1844807680373768595 + + Bot: