Package net.discordservices.dservices4j
Class Commands
- java.lang.Object
 - 
- net.discordservices.dservices4j.Commands
 
 
- 
public class Commands extends Object
Class used for posting Command information (name, description and category) to the Discordservices API. 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCommands.CommandInfoClass used for theaddCommand(...)methods. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CommandsaddCommand(Commands.CommandInfo command)Adds a command to the list using aCommandInfoinstance.CommandsaddCommands(List<Commands.CommandInfo> commands)Adds the provided commands to the list using the provided List ofCommandInfoinstances.CommandsaddCommands(Commands.CommandInfo... commands)Adds the provided commands to the list using the providedCommandInfoinstances.voidpostCommands()Posts the previously set commands to the Discordservices API.CommandssetCommands(List<Commands.CommandInfo> commands)Sets the provided commands for the list using the provided List ofCommandInfoinstances.CommandssetCommands(Commands.CommandInfo... commands)Sets the provided commands for the list using the providedCommandInfoinstances. 
 - 
 
- 
- 
Method Detail
- 
addCommand
public Commands addCommand(Commands.CommandInfo command)
Adds a command to the list using aCommandInfoinstance.- Parameters:
 command- The Command that should be added.- Returns:
 - This class after the command was added. Useful for chaining.
 
 
- 
addCommands
public Commands addCommands(Commands.CommandInfo... commands)
Adds the provided commands to the list using the providedCommandInfoinstances.- Parameters:
 commands- The commands to add.- Returns:
 - This class after the command was added. Useful for chaining.
 
 
- 
addCommands
public Commands addCommands(List<Commands.CommandInfo> commands)
Adds the provided commands to the list using the provided List ofCommandInfoinstances.- Parameters:
 commands- The commands to add.- Returns:
 - This class after the command was added. Useful for chaining.
 
 
- 
setCommands
public Commands setCommands(Commands.CommandInfo... commands)
Sets the provided commands for the list using the providedCommandInfoinstances.
This will remove all previously set commands!- Parameters:
 commands- The commands to set.- Returns:
 - This class after the commands were set. Useful for chaining.
 
 
- 
setCommands
public Commands setCommands(List<Commands.CommandInfo> commands)
Sets the provided commands for the list using the provided List ofCommandInfoinstances.
This will remove all previously set commands!- Parameters:
 commands- The commands to set.- Returns:
 - This class after the commands were set. Useful for chaining.
 
 
- 
postCommands
public void postCommands()
Posts the previously set commands to the Discordservices API.Rate Limits
By default will the Wrapper only perform one request per 15 seconds per endpoint.
If however, the Request either isn't successful or gets rate limited will those errors be logged in your terminal.- Throws:
 NullPointerException- When no command was previously set.
 
 - 
 
 -