Class SlashCmdEventManager

  • All Implemented Interfaces:
    org.javacord.api.listener.channel.group.GroupChannelAttachableListener, org.javacord.api.listener.channel.server.text.ServerTextChannelAttachableListener, org.javacord.api.listener.channel.TextChannelAttachableListener, org.javacord.api.listener.channel.user.PrivateChannelAttachableListener, org.javacord.api.listener.GloballyAttachableListener, org.javacord.api.listener.interaction.SlashCommandCreateListener, org.javacord.api.listener.ObjectAttachableListener, org.javacord.api.listener.server.ServerAttachableListener, org.javacord.api.listener.user.UserAttachableListener

    public class SlashCmdEventManager
    extends Object
    implements org.javacord.api.listener.interaction.SlashCommandCreateListener
    Slash command event manager. Creates and listens for the slash command that it is assigned.
    Author:
    Jeffrey Morris
    • Constructor Detail

      • SlashCmdEventManager

        public SlashCmdEventManager​(org.javacord.api.DiscordApi api,
                                    SlashCmd cmd)
        Constructor.
        Parameters:
        cmd - the slash command to listen for.
    • Method Detail

      • onSlashCommandCreate

        public void onSlashCommandCreate​(org.javacord.api.event.interaction.SlashCommandCreateEvent event)
        The listener for if the command should be activated.
        Specified by:
        onSlashCommandCreate in interface org.javacord.api.listener.interaction.SlashCommandCreateListener
        Parameters:
        event - the event created to check.