Interface Interaction

    • Method Detail

      • asSlashCommandInteraction

        default 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 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
      • asMessageComponentInteraction

        default 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 Optional<MessageComponentInteraction> asMessageComponentInteractionWithCustomId​(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