From 230c09d8f4f1d0067a9c3f9df37f17bff82238fc Mon Sep 17 00:00:00 2001 From: Johannes Christ Date: Thu, 2 May 2024 18:37:27 +0200 Subject: [PATCH] Remove `Nostrum.Api.get_token/0` This will be useless once / if we support multiple bots or library usage, and at the moment it simply returns a value that the user sets and can read on his or her own. --- lib/nostrum/api.ex | 8 -------- 1 file changed, 8 deletions(-) diff --git a/lib/nostrum/api.ex b/lib/nostrum/api.ex index ae39aaad9..29979174c 100644 --- a/lib/nostrum/api.ex +++ b/lib/nostrum/api.ex @@ -4345,14 +4345,6 @@ defmodule Nostrum.Api do end end - @doc """ - Returns the token of the bot. - """ - @spec get_token() :: String.t() - def get_token do - Application.get_env(:nostrum, :token) - end - defp handle_request_with_decode(response) defp handle_request_with_decode({:ok, body}), do: {:ok, Jason.decode!(body, keys: :atoms)} defp handle_request_with_decode({:error, _} = error), do: error