aboutsummaryrefslogtreecommitdiff
path: root/lib/command/util.ex
diff options
context:
space:
mode:
Diffstat (limited to 'lib/command/util.ex')
-rw-r--r--lib/command/util.ex18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/command/util.ex b/lib/command/util.ex
new file mode 100644
index 0000000..8f2018f
--- /dev/null
+++ b/lib/command/util.ex
@@ -0,0 +1,18 @@
+defmodule Thulani.Command.Util do
+ alias Nostrum.Snowflake
+ @type qualified_channel :: {Snowflake.t(), Snowflake.t()}
+
+ defmacro __using__(_opts) do
+ mod = __MODULE__
+
+ quote do
+ alias unquote(mod)
+ end
+ end
+
+ defmacro command(word, rest, msg) do
+ quote do
+ {:cmd, " #{unquote(word)}" <> unquote(rest), unquote(msg)}
+ end
+ end
+end