/source application command with test

This commit is contained in:
Owen
2024-12-13 23:02:23 +01:00
parent 1c4d0fb8af
commit 5975458407
12 changed files with 233 additions and 162 deletions
+13
View File
@@ -0,0 +1,13 @@
defmodule PlantIdDiscordBot.Cog.Info do
use Nostrum.Consumer
@api Application.compile_env(:plantid_discord_bot, :api)
@source Application.compile_env(:plantid_discord_bot, :source)
@doc """
Sends a link to the source code for this bot.
"""
def source(interaction) do
@api.create_interaction_response(interaction, %{type: 4, data: %{content: @source}})
end
end