public interface ICommand
Modifier and Type | Method and Description |
---|---|
String |
anyUsage(net.dv8tion.jda.api.events.Event event)
Generates example usages of the command.
|
String |
checkPermissions(net.dv8tion.jda.api.events.Event event)
Check if the user has permission to run this command, and to run it in the current channel.
|
List<String> |
getAliases()
Get a list of alternative names to call this command.
|
IArgument |
getArgument(String name)
Get a specific argument by its name.
|
List<IArgument> |
getArguments()
Get a list of arguments expected by this command.
|
List<net.dv8tion.jda.api.Permission> |
getClientPermissions()
Get the list of Permission required by the bot in the server to execute this command.
|
String |
getDescription()
Get the command's short description.
|
String |
getDescription(net.dv8tion.jda.api.events.Event event)
Get the command's short description.
|
String |
getDetails()
Get the command's detailed description.
|
String |
getDetails(net.dv8tion.jda.api.events.Event event)
Get the command's detailed description.
|
List<String> |
getExamples()
Get a list of example usages.
|
String |
getGroup()
get the command group's name or category.
|
String |
getGroup(net.dv8tion.jda.api.events.Event event)
get the command group's name or category.
|
List<net.dv8tion.jda.api.Permission> |
getMemberPermissions()
Get the list of Permission required by the Discord member in the server to execute this command.
|
String |
getName()
get the command's name.
|
String |
getName(net.dv8tion.jda.api.events.Event event)
get the command's name.
|
Throttling |
getThrottling()
Get the Throttling configuration for this command.
|
boolean |
isGuildOnly()
Checks if the command should only be used inside a Discord server.
|
boolean |
isNsfw()
Checks if the command should only be used in channels marked as NSFW.
|
boolean |
isPrivateUseOnly()
Checks if the command should only be used in Direct Messages.
|
boolean |
isRunInThread()
Checks if the command should run inside a Discord Thread.
|
boolean |
isThreadOnly()
Checks if the command should only be used inside threads.
|
void |
onDirectMessageReceived(net.dv8tion.jda.api.events.message.MessageReceivedEvent event)
Handles a command call from Direct Messages.
|
void |
onGuildMessageReceived(net.dv8tion.jda.api.events.message.MessageReceivedEvent event)
Handles a command call from a Normal Server Channel.
|
void |
onGuildThreadMessageReceived(net.dv8tion.jda.api.events.message.MessageReceivedEvent event)
Handles a command call from a Thread Server Channel.
|
String |
usage(String arg,
net.dv8tion.jda.api.events.Event event)
Generates an example usage of the command.
|
boolean isNsfw()
boolean isGuildOnly()
boolean isRunInThread()
boolean isThreadOnly()
boolean isPrivateUseOnly()
String getName()
String getGroup()
String getDescription()
String getDetails()
String getName(net.dv8tion.jda.api.events.Event event)
event
- Discord's event that triggered this function call.String getGroup(net.dv8tion.jda.api.events.Event event)
event
- Discord's event that triggered this function call.String getDescription(net.dv8tion.jda.api.events.Event event)
event
- Discord's event that triggered this function call.String getDetails(net.dv8tion.jda.api.events.Event event)
event
- Discord's event that triggered this function call.String anyUsage(net.dv8tion.jda.api.events.Event event)
event
- Discord's event that triggered this function call.String usage(String arg, net.dv8tion.jda.api.events.Event event)
arg
- Arguments in the example.event
- Discord event that triggered this function call.String checkPermissions(net.dv8tion.jda.api.events.Event event)
event
- Discord event that triggered this function call.void onGuildThreadMessageReceived(net.dv8tion.jda.api.events.message.MessageReceivedEvent event)
event
- Discord event that triggered this function call.void onGuildMessageReceived(net.dv8tion.jda.api.events.message.MessageReceivedEvent event)
event
- Discord event that triggered this function call.void onDirectMessageReceived(net.dv8tion.jda.api.events.message.MessageReceivedEvent event)
event
- Discord event that triggered this function call.IArgument getArgument(String name)
name
- Argument's name.Throttling getThrottling()
List<IArgument> getArguments()
List<String> getExamples()
List<String> getAliases()
List<net.dv8tion.jda.api.Permission> getClientPermissions()
List<net.dv8tion.jda.api.Permission> getMemberPermissions()