Interface MessageAttachableListenerManager

  • All Known Subinterfaces:
    Message

    @Generated("listener-manager-generation.gradle")
    public interface MessageAttachableListenerManager
    This class can be used to add and retrieve MessageAttachableListeners.
    • Method Detail

      • addButtonClickListener

        static ListenerManager<ButtonClickListener> addButtonClickListener​(DiscordApi api,
                                                                           long messageId,
                                                                           ButtonClickListener listener)
        Adds a ButtonClickListener.
        Parameters:
        api - The discord api instance.
        messageId - The id of the message which should be listened to.
        listener - The listener to add.
        Returns:
        The manager of the listener.
      • getButtonClickListeners

        static java.util.List<ButtonClickListener> getButtonClickListeners​(DiscordApi api,
                                                                           long messageId)
        Gets a list with all registered ButtonClickListeners of a specific message.
        Parameters:
        api - The discord api instance.
        messageId - The id of the message.
        Returns:
        A list with all registered ButtonClickListeners.
      • getButtonClickListeners

        static java.util.List<ButtonClickListener> getButtonClickListeners​(DiscordApi api,
                                                                           java.lang.String messageId)
        Gets a list with all registered ButtonClickListeners of a specific message.
        Parameters:
        api - The discord api instance.
        messageId - The id of the message.
        Returns:
        A list with all registered ButtonClickListeners.
      • getButtonClickListeners

        java.util.List<ButtonClickListener> getButtonClickListeners()
        Gets a list with all registered ButtonClickListeners.
        Returns:
        A list with all registered ButtonClickListeners.
      • addSelectMenuChooseListener

        static ListenerManager<SelectMenuChooseListener> addSelectMenuChooseListener​(DiscordApi api,
                                                                                     long messageId,
                                                                                     SelectMenuChooseListener listener)
        Adds a SelectMenuChooseListener.
        Parameters:
        api - The discord api instance.
        messageId - The id of the message which should be listened to.
        listener - The listener to add.
        Returns:
        The manager of the listener.
      • getSelectMenuChooseListeners

        static java.util.List<SelectMenuChooseListener> getSelectMenuChooseListeners​(DiscordApi api,
                                                                                     long messageId)
        Gets a list with all registered SelectMenuChooseListeners of a specific message.
        Parameters:
        api - The discord api instance.
        messageId - The id of the message.
        Returns:
        A list with all registered SelectMenuChooseListeners.
      • getSelectMenuChooseListeners

        static java.util.List<SelectMenuChooseListener> getSelectMenuChooseListeners​(DiscordApi api,
                                                                                     java.lang.String messageId)
        Gets a list with all registered SelectMenuChooseListeners of a specific message.
        Parameters:
        api - The discord api instance.
        messageId - The id of the message.
        Returns:
        A list with all registered SelectMenuChooseListeners.
      • getSelectMenuChooseListeners

        java.util.List<SelectMenuChooseListener> getSelectMenuChooseListeners()
        Gets a list with all registered SelectMenuChooseListeners.
        Returns:
        A list with all registered SelectMenuChooseListeners.
      • getMessageContextMenuCommandListeners

        static java.util.List<MessageContextMenuCommandListener> getMessageContextMenuCommandListeners​(DiscordApi api,
                                                                                                       long messageId)
        Gets a list with all registered MessageContextMenuCommandListeners of a specific message.
        Parameters:
        api - The discord api instance.
        messageId - The id of the message.
        Returns:
        A list with all registered MessageContextMenuCommandListeners.
      • getMessageContextMenuCommandListeners

        static java.util.List<MessageContextMenuCommandListener> getMessageContextMenuCommandListeners​(DiscordApi api,
                                                                                                       java.lang.String messageId)
        Gets a list with all registered MessageContextMenuCommandListeners of a specific message.
        Parameters:
        api - The discord api instance.
        messageId - The id of the message.
        Returns:
        A list with all registered MessageContextMenuCommandListeners.
      • getMessageContextMenuCommandListeners

        java.util.List<MessageContextMenuCommandListener> getMessageContextMenuCommandListeners()
        Gets a list with all registered MessageContextMenuCommandListeners.
        Returns:
        A list with all registered MessageContextMenuCommandListeners.
      • getMessageComponentCreateListeners

        static java.util.List<MessageComponentCreateListener> getMessageComponentCreateListeners​(DiscordApi api,
                                                                                                 long messageId)
        Gets a list with all registered MessageComponentCreateListeners of a specific message.
        Parameters:
        api - The discord api instance.
        messageId - The id of the message.
        Returns:
        A list with all registered MessageComponentCreateListeners.
      • getMessageComponentCreateListeners

        static java.util.List<MessageComponentCreateListener> getMessageComponentCreateListeners​(DiscordApi api,
                                                                                                 java.lang.String messageId)
        Gets a list with all registered MessageComponentCreateListeners of a specific message.
        Parameters:
        api - The discord api instance.
        messageId - The id of the message.
        Returns:
        A list with all registered MessageComponentCreateListeners.
      • getMessageComponentCreateListeners

        java.util.List<MessageComponentCreateListener> getMessageComponentCreateListeners()
        Gets a list with all registered MessageComponentCreateListeners.
        Returns:
        A list with all registered MessageComponentCreateListeners.
      • getCachedMessagePinListeners

        java.util.List<CachedMessagePinListener> getCachedMessagePinListeners()
        Gets a list with all registered CachedMessagePinListeners.
        Returns:
        A list with all registered CachedMessagePinListeners.
      • addMessageDeleteListener

        static ListenerManager<MessageDeleteListener> addMessageDeleteListener​(DiscordApi api,
                                                                               long messageId,
                                                                               MessageDeleteListener listener)
        Adds a MessageDeleteListener.
        Parameters:
        api - The discord api instance.
        messageId - The id of the message which should be listened to.
        listener - The listener to add.
        Returns:
        The manager of the listener.
      • getMessageDeleteListeners

        static java.util.List<MessageDeleteListener> getMessageDeleteListeners​(DiscordApi api,
                                                                               long messageId)
        Gets a list with all registered MessageDeleteListeners of a specific message.
        Parameters:
        api - The discord api instance.
        messageId - The id of the message.
        Returns:
        A list with all registered MessageDeleteListeners.
      • getMessageDeleteListeners

        static java.util.List<MessageDeleteListener> getMessageDeleteListeners​(DiscordApi api,
                                                                               java.lang.String messageId)
        Gets a list with all registered MessageDeleteListeners of a specific message.
        Parameters:
        api - The discord api instance.
        messageId - The id of the message.
        Returns:
        A list with all registered MessageDeleteListeners.
      • getMessageDeleteListeners

        java.util.List<MessageDeleteListener> getMessageDeleteListeners()
        Gets a list with all registered MessageDeleteListeners.
        Returns:
        A list with all registered MessageDeleteListeners.
      • getCachedMessageUnpinListeners

        java.util.List<CachedMessageUnpinListener> getCachedMessageUnpinListeners()
        Gets a list with all registered CachedMessageUnpinListeners.
        Returns:
        A list with all registered CachedMessageUnpinListeners.
      • addMessageEditListener

        static ListenerManager<MessageEditListener> addMessageEditListener​(DiscordApi api,
                                                                           long messageId,
                                                                           MessageEditListener listener)
        Adds a MessageEditListener.
        Parameters:
        api - The discord api instance.
        messageId - The id of the message which should be listened to.
        listener - The listener to add.
        Returns:
        The manager of the listener.
      • getMessageEditListeners

        static java.util.List<MessageEditListener> getMessageEditListeners​(DiscordApi api,
                                                                           long messageId)
        Gets a list with all registered MessageEditListeners of a specific message.
        Parameters:
        api - The discord api instance.
        messageId - The id of the message.
        Returns:
        A list with all registered MessageEditListeners.
      • getMessageEditListeners

        static java.util.List<MessageEditListener> getMessageEditListeners​(DiscordApi api,
                                                                           java.lang.String messageId)
        Gets a list with all registered MessageEditListeners of a specific message.
        Parameters:
        api - The discord api instance.
        messageId - The id of the message.
        Returns:
        A list with all registered MessageEditListeners.
      • getMessageEditListeners

        java.util.List<MessageEditListener> getMessageEditListeners()
        Gets a list with all registered MessageEditListeners.
        Returns:
        A list with all registered MessageEditListeners.
      • addReactionAddListener

        static ListenerManager<ReactionAddListener> addReactionAddListener​(DiscordApi api,
                                                                           long messageId,
                                                                           ReactionAddListener listener)
        Adds a ReactionAddListener.
        Parameters:
        api - The discord api instance.
        messageId - The id of the message which should be listened to.
        listener - The listener to add.
        Returns:
        The manager of the listener.
      • getReactionAddListeners

        static java.util.List<ReactionAddListener> getReactionAddListeners​(DiscordApi api,
                                                                           long messageId)
        Gets a list with all registered ReactionAddListeners of a specific message.
        Parameters:
        api - The discord api instance.
        messageId - The id of the message.
        Returns:
        A list with all registered ReactionAddListeners.
      • getReactionAddListeners

        static java.util.List<ReactionAddListener> getReactionAddListeners​(DiscordApi api,
                                                                           java.lang.String messageId)
        Gets a list with all registered ReactionAddListeners of a specific message.
        Parameters:
        api - The discord api instance.
        messageId - The id of the message.
        Returns:
        A list with all registered ReactionAddListeners.
      • getReactionAddListeners

        java.util.List<ReactionAddListener> getReactionAddListeners()
        Gets a list with all registered ReactionAddListeners.
        Returns:
        A list with all registered ReactionAddListeners.
      • addReactionRemoveAllListener

        static ListenerManager<ReactionRemoveAllListener> addReactionRemoveAllListener​(DiscordApi api,
                                                                                       long messageId,
                                                                                       ReactionRemoveAllListener listener)
        Adds a ReactionRemoveAllListener.
        Parameters:
        api - The discord api instance.
        messageId - The id of the message which should be listened to.
        listener - The listener to add.
        Returns:
        The manager of the listener.
      • getReactionRemoveAllListeners

        static java.util.List<ReactionRemoveAllListener> getReactionRemoveAllListeners​(DiscordApi api,
                                                                                       long messageId)
        Gets a list with all registered ReactionRemoveAllListeners of a specific message.
        Parameters:
        api - The discord api instance.
        messageId - The id of the message.
        Returns:
        A list with all registered ReactionRemoveAllListeners.
      • getReactionRemoveAllListeners

        static java.util.List<ReactionRemoveAllListener> getReactionRemoveAllListeners​(DiscordApi api,
                                                                                       java.lang.String messageId)
        Gets a list with all registered ReactionRemoveAllListeners of a specific message.
        Parameters:
        api - The discord api instance.
        messageId - The id of the message.
        Returns:
        A list with all registered ReactionRemoveAllListeners.
      • getReactionRemoveAllListeners

        java.util.List<ReactionRemoveAllListener> getReactionRemoveAllListeners()
        Gets a list with all registered ReactionRemoveAllListeners.
        Returns:
        A list with all registered ReactionRemoveAllListeners.
      • addReactionRemoveListener

        static ListenerManager<ReactionRemoveListener> addReactionRemoveListener​(DiscordApi api,
                                                                                 long messageId,
                                                                                 ReactionRemoveListener listener)
        Adds a ReactionRemoveListener.
        Parameters:
        api - The discord api instance.
        messageId - The id of the message which should be listened to.
        listener - The listener to add.
        Returns:
        The manager of the listener.
      • getReactionRemoveListeners

        static java.util.List<ReactionRemoveListener> getReactionRemoveListeners​(DiscordApi api,
                                                                                 long messageId)
        Gets a list with all registered ReactionRemoveListeners of a specific message.
        Parameters:
        api - The discord api instance.
        messageId - The id of the message.
        Returns:
        A list with all registered ReactionRemoveListeners.
      • getReactionRemoveListeners

        static java.util.List<ReactionRemoveListener> getReactionRemoveListeners​(DiscordApi api,
                                                                                 java.lang.String messageId)
        Gets a list with all registered ReactionRemoveListeners of a specific message.
        Parameters:
        api - The discord api instance.
        messageId - The id of the message.
        Returns:
        A list with all registered ReactionRemoveListeners.
      • getReactionRemoveListeners

        java.util.List<ReactionRemoveListener> getReactionRemoveListeners()
        Gets a list with all registered ReactionRemoveListeners.
        Returns:
        A list with all registered ReactionRemoveListeners.
      • addMessageAttachableListener

        static <T extends MessageAttachableListener & ObjectAttachableListener> java.util.Collection<ListenerManager<T>> addMessageAttachableListener​(DiscordApi api,
                                                                                                                                                      long messageId,
                                                                                                                                                      T listener)
        Adds a listener that implements one or more MessageAttachableListeners to the message with the given id. Adding a listener multiple times will only add it once and return the same listener managers on each invocation. The order of invocation is according to first addition.
        Type Parameters:
        T - The type of the listener.
        Parameters:
        api - The discord api instance.
        messageId - The id of the message which should be listened to.
        listener - The listener to add.
        Returns:
        The managers for the added listener.
      • addMessageAttachableListener

        static <T extends MessageAttachableListener & ObjectAttachableListener> java.util.Collection<ListenerManager<T>> addMessageAttachableListener​(DiscordApi api,
                                                                                                                                                      java.lang.String messageId,
                                                                                                                                                      T listener)
        Adds a listener that implements one or more MessageAttachableListeners to the message with the given id. Adding a listener multiple times will only add it once and return the same listener managers on each invocation. The order of invocation is according to first addition.
        Type Parameters:
        T - The type of the listener.
        Parameters:
        api - The discord api instance.
        messageId - The id of the message which should be listened to.
        listener - The listener to add.
        Returns:
        The managers for the added listener.
      • removeMessageAttachableListener

        static <T extends MessageAttachableListener & ObjectAttachableListener> void removeMessageAttachableListener​(DiscordApi api,
                                                                                                                     long messageId,
                                                                                                                     T listener)
        Removes a listener that implements one or more MessageAttachableListeners from the message with the given id.
        Type Parameters:
        T - The type of the listener.
        Parameters:
        api - The discord api instance.
        messageId - The id of the message.
        listener - The listener to remove.
      • removeMessageAttachableListener

        static <T extends MessageAttachableListener & ObjectAttachableListener> void removeMessageAttachableListener​(DiscordApi api,
                                                                                                                     java.lang.String messageId,
                                                                                                                     T listener)
        Removes a listener that implements one or more MessageAttachableListeners from the message with the given id.
        Type Parameters:
        T - The type of the listener.
        Parameters:
        api - The discord api instance.
        messageId - The id of the message.
        listener - The listener to remove.
      • getMessageAttachableListeners

        static <T extends MessageAttachableListener & ObjectAttachableListener> java.util.Map<T,​java.util.List<java.lang.Class<T>>> getMessageAttachableListeners​(DiscordApi api,
                                                                                                                                                                        long messageId)
        Gets a map with all registered listeners that implement one or more MessageAttachableListeners and their assigned listener classes they listen to for the message with the given id.
        Type Parameters:
        T - The type of the listeners.
        Parameters:
        api - The discord api instance.
        messageId - The id of the message.
        Returns:
        A map with all registered listeners that implement one or more MessageAttachableListeners and their assigned listener classes they listen to.
      • getMessageAttachableListeners

        static <T extends MessageAttachableListener & ObjectAttachableListener> java.util.Map<T,​java.util.List<java.lang.Class<T>>> getMessageAttachableListeners​(DiscordApi api,
                                                                                                                                                                        java.lang.String messageId)
        Gets a map with all registered listeners that implement one or more MessageAttachableListeners and their assigned listener classes they listen to for the message with the given id.
        Type Parameters:
        T - The type of the listeners.
        Parameters:
        api - The discord api instance.
        messageId - The id of the message.
        Returns:
        A map with all registered listeners that implement one or more MessageAttachableListeners and their assigned listener classes they listen to.
      • removeListener

        static <T extends MessageAttachableListener & ObjectAttachableListener> void removeListener​(DiscordApi api,
                                                                                                    long messageId,
                                                                                                    java.lang.Class<T> listenerClass,
                                                                                                    T listener)
        Removes a MessageAttachableListener from the message with the given id.
        Type Parameters:
        T - The type of the listener.
        Parameters:
        api - The discord api instance.
        messageId - The id of the message.
        listenerClass - The listener class.
        listener - The listener to remove.
      • removeListener

        static <T extends MessageAttachableListener & ObjectAttachableListener> void removeListener​(DiscordApi api,
                                                                                                    java.lang.String messageId,
                                                                                                    java.lang.Class<T> listenerClass,
                                                                                                    T listener)
        Removes a MessageAttachableListener from the message with the given id.
        Type Parameters:
        T - The type of the listener.
        Parameters:
        api - The discord api instance.
        messageId - The id of the message.
        listenerClass - The listener class.
        listener - The listener to remove.
      • addMessageAttachableListener

        <T extends MessageAttachableListener & ObjectAttachableListener> java.util.Collection<ListenerManager<T>> addMessageAttachableListener​(T listener)
        Adds a listener that implements one or more MessageAttachableListeners. Adding a listener multiple times will only add it once and return the same listener managers on each invocation. The order of invocation is according to first addition.
        Type Parameters:
        T - The type of the listener.
        Parameters:
        listener - The listener to add.
        Returns:
        The managers for the added listener.
      • removeMessageAttachableListener

        <T extends MessageAttachableListener & ObjectAttachableListener> void removeMessageAttachableListener​(T listener)
        Removes a listener that implements one or more MessageAttachableListeners.
        Type Parameters:
        T - The type of the listener.
        Parameters:
        listener - The listener to remove.
      • getMessageAttachableListeners

        <T extends MessageAttachableListener & ObjectAttachableListener> java.util.Map<T,​java.util.List<java.lang.Class<T>>> getMessageAttachableListeners()
        Gets a map with all registered listeners that implement one or more MessageAttachableListeners and their assigned listener classes they listen to.
        Type Parameters:
        T - The type of the listeners.
        Returns:
        A map with all registered listeners that implement one or more MessageAttachableListeners and their assigned listener classes they listen to.
      • removeListener

        <T extends MessageAttachableListener & ObjectAttachableListener> void removeListener​(java.lang.Class<T> listenerClass,
                                                                                             T listener)
        Removes a listener from this object.
        Type Parameters:
        T - The type of the listener.
        Parameters:
        listenerClass - The listener class.
        listener - The listener to remove.