Nostrum.Api.get_global_application_commands
You're seeing just the function
get_global_application_commands
, go back to Nostrum.Api module for more information.
Specs
get_global_application_commands(Nostrum.Struct.User.id()) :: {:ok, [map()]} | error()
Fetch all global commands.
Parameters
application_id
: Application ID for which to search commands. If not given, this will be fetched fromMe
.
Return value
A list of ApplicationCommand
s on success. See the official reference:
https://discord.com/developers/docs/interactions/slash-commands#applicationcommand
Example
iex> Nostrum.Api.get_global_application_commands
{:ok,
[
%{
application_id: "455589479713865749",
description: "ed, man! man, ed",
id: "789841753196331029",
name: "edit"
}
]}