Application commands, global and per guild. Bots usually declare commands with Lingo.Bot.Commands and register them with Lingo.register_commands/1 instead.
Every function returns {:ok, result}, :ok when Discord sends no body, or
{:error, %Lingo.Error{}}. Calls go to the current bot (see Lingo.with_bot/2).
Summary
Functions
Replaces all global application commands with commands.
Replaces all of a guild's application commands with commands.
Creates or replaces one global application command.
Creates or replaces one guild application command.
Deletes a global application command.
Deletes a guild application command.
Fetches a global application command.
Fetches a guild application command.
Fetches the permission settings of one command in a guild.
Lists the global application commands.
Lists a guild's application commands.
Lists the permission settings of every command in a guild.
Edits a global application command.
Edits a guild application command.
Functions
@spec bulk_overwrite_global([map()]) :: Lingo.Api.result([Lingo.Type.ApplicationCommand.t()])
Replaces all global application commands with commands.
@spec bulk_overwrite_guild(Lingo.Api.id(), [map()]) :: Lingo.Api.result([Lingo.Type.ApplicationCommand.t()])
Replaces all of a guild's application commands with commands.
@spec create_global(Lingo.Api.params()) :: Lingo.Api.result(Lingo.Type.ApplicationCommand.t())
Creates or replaces one global application command.
@spec create_guild(Lingo.Api.id(), Lingo.Api.params()) :: Lingo.Api.result(Lingo.Type.ApplicationCommand.t())
Creates or replaces one guild application command.
@spec delete_global(Lingo.Api.id()) :: Lingo.Api.result()
Deletes a global application command.
@spec delete_guild(Lingo.Api.id(), Lingo.Api.id()) :: Lingo.Api.result()
Deletes a guild application command.
@spec get_global(Lingo.Api.id()) :: Lingo.Api.result(Lingo.Type.ApplicationCommand.t())
Fetches a global application command.
@spec get_guild(Lingo.Api.id(), Lingo.Api.id()) :: Lingo.Api.result(Lingo.Type.ApplicationCommand.t())
Fetches a guild application command.
@spec get_permissions(Lingo.Api.id(), Lingo.Api.id()) :: Lingo.Api.result(Lingo.Type.CommandPermissions.t())
Fetches the permission settings of one command in a guild.
@spec list_global() :: Lingo.Api.result([Lingo.Type.ApplicationCommand.t()])
Lists the global application commands.
@spec list_guild(Lingo.Api.id()) :: Lingo.Api.result([Lingo.Type.ApplicationCommand.t()])
Lists a guild's application commands.
@spec list_permissions(Lingo.Api.id()) :: Lingo.Api.result([Lingo.Type.CommandPermissions.t()])
Lists the permission settings of every command in a guild.
@spec update_global(Lingo.Api.id(), Lingo.Api.params()) :: Lingo.Api.result(Lingo.Type.ApplicationCommand.t())
Edits a global application command.
@spec update_guild(Lingo.Api.id(), Lingo.Api.id(), Lingo.Api.params()) :: Lingo.Api.result(Lingo.Type.ApplicationCommand.t())
Edits a guild application command.