Package com.jagrosh.jdautilities.command
Class MessageContextMenu
java.lang.Object
com.jagrosh.jdautilities.command.Interaction
com.jagrosh.jdautilities.command.ContextMenu
com.jagrosh.jdautilities.command.MessageContextMenu
-
Field Summary
Fields inherited from class com.jagrosh.jdautilities.command.ContextMenu
name, nameLocalizationFields inherited from class com.jagrosh.jdautilities.command.Interaction
botMissingPermMessage, botPermissions, cooldown, cooldownScope, guildOnly, nsfwOnly, ownerCommand, userMissingPermMessage, userPermissions -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnet.dv8tion.jda.api.interactions.commands.build.CommandDataBuilds CommandData for the ContextMenu upsert.protected abstract voidexecute(MessageContextMenuEvent event) The main body method of aMessageContextMenu.final voidrun(MessageContextMenuEvent event) Runs checks for theMessageContextMenuwith the givenMessageContextMenuEventthat called it.Methods inherited from class com.jagrosh.jdautilities.command.ContextMenu
getCooldownError, getCooldownKey, getName, getNameLocalization, getTypeMethods inherited from class com.jagrosh.jdautilities.command.Interaction
getBotPermissions, getCooldown, getCooldownScope, getUserPermissions, isOwnerCommand
-
Constructor Details
-
MessageContextMenu
public MessageContextMenu()
-
-
Method Details
-
run
Runs checks for theMessageContextMenuwith the givenMessageContextMenuEventthat called it.
Will terminate, and possibly respond with a failure message, if any checks fail.- Parameters:
event- The MessageContextMenuEvent that triggered this menu
-
execute
The main body method of aMessageContextMenu.
This is the "response" for a successfulrun(MessageContextMenuEvent)- Parameters:
event- TheMessageContextMenuEventthat triggered this menu.
-
buildCommandData
public net.dv8tion.jda.api.interactions.commands.build.CommandData buildCommandData()Description copied from class:ContextMenuBuilds CommandData for the ContextMenu upsert. This code is executed when we need to upsert the menu. Useful for manual upserting.- Overrides:
buildCommandDatain classContextMenu- Returns:
- the built command data
-