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, nameLocalization
Fields inherited from class com.jagrosh.jdautilities.command.Interaction
botMissingPermMessage, botPermissions, cooldown, cooldownScope, guildOnly, nsfwOnly, ownerCommand, userMissingPermMessage, userPermissions
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionnet.dv8tion.jda.api.interactions.commands.build.CommandData
Builds CommandData for the ContextMenu upsert.protected abstract void
execute
(MessageContextMenuEvent event) The main body method of aMessageContextMenu
.final void
run
(MessageContextMenuEvent event) Runs checks for theMessageContextMenu
with the givenMessageContextMenuEvent
that called it.Methods inherited from class com.jagrosh.jdautilities.command.ContextMenu
getCooldownError, getCooldownKey, getName, getNameLocalization, getType
Methods inherited from class com.jagrosh.jdautilities.command.Interaction
getBotPermissions, getCooldown, getCooldownScope, getUserPermissions, isOwnerCommand
-
Constructor Details
-
MessageContextMenu
public MessageContextMenu()
-
-
Method Details
-
run
Runs checks for theMessageContextMenu
with the givenMessageContextMenuEvent
that 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
- TheMessageContextMenuEvent
that triggered this menu.
-
buildCommandData
public net.dv8tion.jda.api.interactions.commands.build.CommandData buildCommandData()Description copied from class:ContextMenu
Builds CommandData for the ContextMenu upsert. This code is executed when we need to upsert the menu. Useful for manual upserting.- Overrides:
buildCommandData
in classContextMenu
- Returns:
- the built command data
-