Interface Interaction

    • Method Detail

      • asSlashCommandInteraction

        default java.util.Optional<SlashCommandInteraction> asSlashCommandInteraction()
        Get this interaction as slash command interaction if the type matches.
        Returns:
        the interaction as slash command interaction if the type matches; an empty optional otherwise
      • asSlashCommandInteractionWithCommandId

        default java.util.Optional<SlashCommandInteraction> asSlashCommandInteractionWithCommandId​(long commandId)
        Get this interaction as slash command interaction if the type and the command id match.
        Parameters:
        commandId - The command id to match.
        Returns:
        the interaction as slash command interaction if the properties match; an empty optional otherwise
      • asAutocompleteInteraction

        default java.util.Optional<AutocompleteInteraction> asAutocompleteInteraction()
        Get this interaction as autocomplete interaction if the type matches.
        Returns:
        the interaction as autocomplete interaction if the type matches; an empty optional otherwise
      • asAutocompleteInteraction

        default java.util.Optional<AutocompleteInteraction> asAutocompleteInteraction​(long commandId)
        Get this interaction as autocomplete interaction if the type and the command id match.
        Parameters:
        commandId - The command id to match.
        Returns:
        the interaction as autocomplete interaction if the properties match; an empty optional otherwise
      • asUserContextMenuInteraction

        default java.util.Optional<UserContextMenuInteraction> asUserContextMenuInteraction()
        Get this interaction as user context menu interaction if the type matches.
        Returns:
        the interaction as user context menu interaction if the type matches; an empty optional otherwise
      • asUserContextMenuInteractionWithCommandId

        default java.util.Optional<UserContextMenuInteraction> asUserContextMenuInteractionWithCommandId​(long commandId)
        Get this interaction as user context menu interaction if the type and the command id match.
        Parameters:
        commandId - The command id to match.
        Returns:
        the interaction as user context menu interaction if the properties match; an empty optional otherwise
      • asMessageContextMenuInteraction

        default java.util.Optional<MessageContextMenuInteraction> asMessageContextMenuInteraction()
        Get this interaction as message context menu interaction if the type matches.
        Returns:
        the interaction as message context menu interaction if the type matches; an empty optional otherwise
      • asMessageContextMenuInteractionWithCommandId

        default java.util.Optional<MessageContextMenuInteraction> asMessageContextMenuInteractionWithCommandId​(long commandId)
        Get this interaction as message context menu interaction if the type and the command id match.
        Parameters:
        commandId - The command id to match.
        Returns:
        the interaction as message context menu interaction if the properties match; an empty optional otherwise
      • asMessageComponentInteraction

        default java.util.Optional<MessageComponentInteraction> asMessageComponentInteraction()
        Get this interaction as message component interaction if the type matches.
        Returns:
        the interaction as message component interaction if the type matches; an empty optional otherwise
      • asMessageComponentInteractionWithCustomId

        default java.util.Optional<MessageComponentInteraction> asMessageComponentInteractionWithCustomId​(java.lang.String customId)
        Get this interaction as message component interaction if the type and the given custom id match.
        Parameters:
        customId - The custom id to match.
        Returns:
        the interaction as message component interaction if the properties match; an empty optional otherwise
      • asModalInteraction

        default java.util.Optional<ModalInteraction> asModalInteraction()
        Get this interaction as modal interaction if the type matches.
        Returns:
        the interaction as modal interaction if the type matches; an empty optional otherwise
      • asModalInteractionWithCustomId

        default java.util.Optional<ModalInteraction> asModalInteractionWithCustomId​(java.lang.String customId)
        Get this interaction as modal interaction if the type and the given custom id match.
        Parameters:
        customId - The custom id to match.
        Returns:
        the interaction as modal interaction if the properties match; an empty optional otherwise