Files
plantid-discord-bot/lib/mocks/nostrum_api.ex
T
owenrees 02372f2076 Feat/error logs (#16)
* added list of tasks to achieve

* update deps

* update elixir version in CI/CD pipeline

* update todo with branch push checks

* underscores separation of large numbers

* update elixir version and deps

* add basic module  docs

* remove IO.inspect call

* check if list is empty rather than traversing list for length

* revert empty list code

* duration tests

* add mime type tests

* use logger instread of inspect, remove todos

* replace list length check with Enum.empty

* replace list length check with !Enum.empty?

* numbers readability fix by using underscores on large numbers

* iucn parser replaced case with multiclause function and added test

* replace map and join with map_join

* fix multiple spec issues where map() must be inside a list
2025-12-06 23:41:59 +01:00

19 lines
522 B
Elixir

defmodule PlantIdDiscordBotTest.Mocks.Nostrum.Api do
@moduledoc """
Mocks the Nostrum.Api module.
"""
# def create_message(_channel_id, content), do: {:ok, content}
def create_message(_channel_id, content) do
send(self(), {:create_message, 123_456, content})
{:ok, content}
end
def create_interaction_response(_interaction, response), do: {:ok, response}
def get_application_information() do
{:ok, %{name: "Test Bot", approximate_guild_count: 1, owner: %{username: "Test User"}}}
end
end