Interface InteractionController
- All Known Implementing Classes:
InteractionControllerImpl
public interface InteractionController
A class which provides numerous methods to interact with Discord slash commands.
-
Method Summary
Modifier and TypeMethodDescriptiongetCommand
(String name) Gets the command with the given name or null if no command by that name exists.void
registerCommand
(InteractionCommand command) Registers the given slash command with Discord.
-
Method Details
-
getCommand
Gets the command with the given name or null if no command by that name exists.- Parameters:
name
- The name of the command.- Returns:
- The
command
by the given name, or null.
-
registerCommand
Registers the given slash command with Discord.- Parameters:
command
- The slash command to be registered.- Throws:
InteractionException
- if a command with that name was already registered or if the given command was already registered.
-