From 779f99a5f3afaa7ce3bea7bc1ed9d506e32456d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Bersier?= Date: Sat, 12 Oct 2024 17:05:40 +0200 Subject: [PATCH] Move commands to their own files --- lib/{commands.ex => HahaCommands/download.ex} | 18 ++-------------- lib/HahaCommands/ping.ex | 21 +++++++++++++++++++ 2 files changed, 23 insertions(+), 16 deletions(-) rename lib/{commands.ex => HahaCommands/download.ex} (79%) create mode 100644 lib/HahaCommands/ping.ex diff --git a/lib/commands.ex b/lib/HahaCommands/download.ex similarity index 79% rename from lib/commands.ex rename to lib/HahaCommands/download.ex index 3d0c317..931fca9 100644 --- a/lib/commands.ex +++ b/lib/HahaCommands/download.ex @@ -1,24 +1,10 @@ -defmodule HahaCommands do +defmodule HahaYes.Commands.Download 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. @@ -36,7 +22,7 @@ defmodule HahaCommands do Bot: