Interface MessageAttachableListenerManager
-
- All Known Subinterfaces:
Message
@Generated("listener-manager-generation.gradle") public interface MessageAttachableListenerManager
This class can be used to add and retrieveMessageAttachableListeners.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description ListenerManager<CachedMessagePinListener>addCachedMessagePinListener(CachedMessagePinListener listener)Adds aCachedMessagePinListener.ListenerManager<CachedMessageUnpinListener>addCachedMessageUnpinListener(CachedMessageUnpinListener listener)Adds aCachedMessageUnpinListener.static <T extends MessageAttachableListener & ObjectAttachableListener>
Collection<ListenerManager<T>>addMessageAttachableListener(DiscordApi api, long messageId, T listener)Adds a listener that implements one or moreMessageAttachableListeners to the message with the given id.static <T extends MessageAttachableListener & ObjectAttachableListener>
Collection<ListenerManager<T>>addMessageAttachableListener(DiscordApi api, String messageId, T listener)Adds a listener that implements one or moreMessageAttachableListeners to the message with the given id.<T extends MessageAttachableListener & ObjectAttachableListener>
Collection<ListenerManager<T>>addMessageAttachableListener(T listener)Adds a listener that implements one or moreMessageAttachableListeners.static ListenerManager<MessageDeleteListener>addMessageDeleteListener(DiscordApi api, long messageId, MessageDeleteListener listener)Adds aMessageDeleteListener.ListenerManager<MessageDeleteListener>addMessageDeleteListener(MessageDeleteListener listener)Adds aMessageDeleteListener.static ListenerManager<MessageEditListener>addMessageEditListener(DiscordApi api, long messageId, MessageEditListener listener)Adds aMessageEditListener.ListenerManager<MessageEditListener>addMessageEditListener(MessageEditListener listener)Adds aMessageEditListener.static ListenerManager<ReactionAddListener>addReactionAddListener(DiscordApi api, long messageId, ReactionAddListener listener)Adds aReactionAddListener.ListenerManager<ReactionAddListener>addReactionAddListener(ReactionAddListener listener)Adds aReactionAddListener.static ListenerManager<ReactionRemoveAllListener>addReactionRemoveAllListener(DiscordApi api, long messageId, ReactionRemoveAllListener listener)Adds aReactionRemoveAllListener.ListenerManager<ReactionRemoveAllListener>addReactionRemoveAllListener(ReactionRemoveAllListener listener)Adds aReactionRemoveAllListener.static ListenerManager<ReactionRemoveListener>addReactionRemoveListener(DiscordApi api, long messageId, ReactionRemoveListener listener)Adds aReactionRemoveListener.ListenerManager<ReactionRemoveListener>addReactionRemoveListener(ReactionRemoveListener listener)Adds aReactionRemoveListener.List<CachedMessagePinListener>getCachedMessagePinListeners()Gets a list with all registeredCachedMessagePinListeners.List<CachedMessageUnpinListener>getCachedMessageUnpinListeners()Gets a list with all registeredCachedMessageUnpinListeners.<T extends MessageAttachableListener & ObjectAttachableListener>
Map<T,List<Class<T>>>getMessageAttachableListeners()Gets a map with all registered listeners that implement one or moreMessageAttachableListeners and their assigned listener classes they listen to.static <T extends MessageAttachableListener & ObjectAttachableListener>
Map<T,List<Class<T>>>getMessageAttachableListeners(DiscordApi api, long messageId)Gets a map with all registered listeners that implement one or moreMessageAttachableListeners and their assigned listener classes they listen to for the message with the given id.static <T extends MessageAttachableListener & ObjectAttachableListener>
Map<T,List<Class<T>>>getMessageAttachableListeners(DiscordApi api, String messageId)Gets a map with all registered listeners that implement one or moreMessageAttachableListeners and their assigned listener classes they listen to for the message with the given id.List<MessageDeleteListener>getMessageDeleteListeners()Gets a list with all registeredMessageDeleteListeners.static List<MessageDeleteListener>getMessageDeleteListeners(DiscordApi api, long messageId)Gets a list with all registeredMessageDeleteListeners of a specific message.static List<MessageDeleteListener>getMessageDeleteListeners(DiscordApi api, String messageId)Gets a list with all registeredMessageDeleteListeners of a specific message.List<MessageEditListener>getMessageEditListeners()Gets a list with all registeredMessageEditListeners.static List<MessageEditListener>getMessageEditListeners(DiscordApi api, long messageId)Gets a list with all registeredMessageEditListeners of a specific message.static List<MessageEditListener>getMessageEditListeners(DiscordApi api, String messageId)Gets a list with all registeredMessageEditListeners of a specific message.List<ReactionAddListener>getReactionAddListeners()Gets a list with all registeredReactionAddListeners.static List<ReactionAddListener>getReactionAddListeners(DiscordApi api, long messageId)Gets a list with all registeredReactionAddListeners of a specific message.static List<ReactionAddListener>getReactionAddListeners(DiscordApi api, String messageId)Gets a list with all registeredReactionAddListeners of a specific message.List<ReactionRemoveAllListener>getReactionRemoveAllListeners()Gets a list with all registeredReactionRemoveAllListeners.static List<ReactionRemoveAllListener>getReactionRemoveAllListeners(DiscordApi api, long messageId)Gets a list with all registeredReactionRemoveAllListeners of a specific message.static List<ReactionRemoveAllListener>getReactionRemoveAllListeners(DiscordApi api, String messageId)Gets a list with all registeredReactionRemoveAllListeners of a specific message.List<ReactionRemoveListener>getReactionRemoveListeners()Gets a list with all registeredReactionRemoveListeners.static List<ReactionRemoveListener>getReactionRemoveListeners(DiscordApi api, long messageId)Gets a list with all registeredReactionRemoveListeners of a specific message.static List<ReactionRemoveListener>getReactionRemoveListeners(DiscordApi api, String messageId)Gets a list with all registeredReactionRemoveListeners of a specific message.<T extends MessageAttachableListener & ObjectAttachableListener>
voidremoveListener(Class<T> listenerClass, T listener)Removes a listener from this object.static <T extends MessageAttachableListener & ObjectAttachableListener>
voidremoveListener(DiscordApi api, long messageId, Class<T> listenerClass, T listener)Removes aMessageAttachableListenerfrom the message with the given id.static <T extends MessageAttachableListener & ObjectAttachableListener>
voidremoveListener(DiscordApi api, String messageId, Class<T> listenerClass, T listener)Removes aMessageAttachableListenerfrom the message with the given id.static <T extends MessageAttachableListener & ObjectAttachableListener>
voidremoveMessageAttachableListener(DiscordApi api, long messageId, T listener)Removes a listener that implements one or moreMessageAttachableListeners from the message with the given id.static <T extends MessageAttachableListener & ObjectAttachableListener>
voidremoveMessageAttachableListener(DiscordApi api, String messageId, T listener)Removes a listener that implements one or moreMessageAttachableListeners from the message with the given id.<T extends MessageAttachableListener & ObjectAttachableListener>
voidremoveMessageAttachableListener(T listener)Removes a listener that implements one or moreMessageAttachableListeners.
-
-
-
Method Detail
-
addReactionRemoveAllListener
static ListenerManager<ReactionRemoveAllListener> addReactionRemoveAllListener(DiscordApi api, long messageId, ReactionRemoveAllListener listener)
Adds aReactionRemoveAllListener.- 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 List<ReactionRemoveAllListener> getReactionRemoveAllListeners(DiscordApi api, long messageId)
Gets a list with all registeredReactionRemoveAllListeners 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 List<ReactionRemoveAllListener> getReactionRemoveAllListeners(DiscordApi api, String messageId)
Gets a list with all registeredReactionRemoveAllListeners of a specific message.- Parameters:
api- The discord api instance.messageId- The id of the message.- Returns:
- A list with all registered
ReactionRemoveAllListeners.
-
addReactionRemoveAllListener
ListenerManager<ReactionRemoveAllListener> addReactionRemoveAllListener(ReactionRemoveAllListener listener)
Adds aReactionRemoveAllListener.- Parameters:
listener- The listener to add.- Returns:
- The manager of the listener.
-
getReactionRemoveAllListeners
List<ReactionRemoveAllListener> getReactionRemoveAllListeners()
Gets a list with all registeredReactionRemoveAllListeners.- Returns:
- A list with all registered
ReactionRemoveAllListeners.
-
addReactionAddListener
static ListenerManager<ReactionAddListener> addReactionAddListener(DiscordApi api, long messageId, ReactionAddListener listener)
Adds aReactionAddListener.- 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 List<ReactionAddListener> getReactionAddListeners(DiscordApi api, long messageId)
Gets a list with all registeredReactionAddListeners 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 List<ReactionAddListener> getReactionAddListeners(DiscordApi api, String messageId)
Gets a list with all registeredReactionAddListeners of a specific message.- Parameters:
api- The discord api instance.messageId- The id of the message.- Returns:
- A list with all registered
ReactionAddListeners.
-
addReactionAddListener
ListenerManager<ReactionAddListener> addReactionAddListener(ReactionAddListener listener)
Adds aReactionAddListener.- Parameters:
listener- The listener to add.- Returns:
- The manager of the listener.
-
getReactionAddListeners
List<ReactionAddListener> getReactionAddListeners()
Gets a list with all registeredReactionAddListeners.- Returns:
- A list with all registered
ReactionAddListeners.
-
addReactionRemoveListener
static ListenerManager<ReactionRemoveListener> addReactionRemoveListener(DiscordApi api, long messageId, ReactionRemoveListener listener)
Adds aReactionRemoveListener.- 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 List<ReactionRemoveListener> getReactionRemoveListeners(DiscordApi api, long messageId)
Gets a list with all registeredReactionRemoveListeners 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 List<ReactionRemoveListener> getReactionRemoveListeners(DiscordApi api, String messageId)
Gets a list with all registeredReactionRemoveListeners of a specific message.- Parameters:
api- The discord api instance.messageId- The id of the message.- Returns:
- A list with all registered
ReactionRemoveListeners.
-
addReactionRemoveListener
ListenerManager<ReactionRemoveListener> addReactionRemoveListener(ReactionRemoveListener listener)
Adds aReactionRemoveListener.- Parameters:
listener- The listener to add.- Returns:
- The manager of the listener.
-
getReactionRemoveListeners
List<ReactionRemoveListener> getReactionRemoveListeners()
Gets a list with all registeredReactionRemoveListeners.- Returns:
- A list with all registered
ReactionRemoveListeners.
-
addMessageEditListener
static ListenerManager<MessageEditListener> addMessageEditListener(DiscordApi api, long messageId, MessageEditListener listener)
Adds aMessageEditListener.- 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 List<MessageEditListener> getMessageEditListeners(DiscordApi api, long messageId)
Gets a list with all registeredMessageEditListeners 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 List<MessageEditListener> getMessageEditListeners(DiscordApi api, String messageId)
Gets a list with all registeredMessageEditListeners of a specific message.- Parameters:
api- The discord api instance.messageId- The id of the message.- Returns:
- A list with all registered
MessageEditListeners.
-
addMessageEditListener
ListenerManager<MessageEditListener> addMessageEditListener(MessageEditListener listener)
Adds aMessageEditListener.- Parameters:
listener- The listener to add.- Returns:
- The manager of the listener.
-
getMessageEditListeners
List<MessageEditListener> getMessageEditListeners()
Gets a list with all registeredMessageEditListeners.- Returns:
- A list with all registered
MessageEditListeners.
-
addCachedMessageUnpinListener
ListenerManager<CachedMessageUnpinListener> addCachedMessageUnpinListener(CachedMessageUnpinListener listener)
Adds aCachedMessageUnpinListener.- Parameters:
listener- The listener to add.- Returns:
- The manager of the listener.
-
getCachedMessageUnpinListeners
List<CachedMessageUnpinListener> getCachedMessageUnpinListeners()
Gets a list with all registeredCachedMessageUnpinListeners.- Returns:
- A list with all registered
CachedMessageUnpinListeners.
-
addMessageDeleteListener
static ListenerManager<MessageDeleteListener> addMessageDeleteListener(DiscordApi api, long messageId, MessageDeleteListener listener)
Adds aMessageDeleteListener.- 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 List<MessageDeleteListener> getMessageDeleteListeners(DiscordApi api, long messageId)
Gets a list with all registeredMessageDeleteListeners 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 List<MessageDeleteListener> getMessageDeleteListeners(DiscordApi api, String messageId)
Gets a list with all registeredMessageDeleteListeners of a specific message.- Parameters:
api- The discord api instance.messageId- The id of the message.- Returns:
- A list with all registered
MessageDeleteListeners.
-
addMessageDeleteListener
ListenerManager<MessageDeleteListener> addMessageDeleteListener(MessageDeleteListener listener)
Adds aMessageDeleteListener.- Parameters:
listener- The listener to add.- Returns:
- The manager of the listener.
-
getMessageDeleteListeners
List<MessageDeleteListener> getMessageDeleteListeners()
Gets a list with all registeredMessageDeleteListeners.- Returns:
- A list with all registered
MessageDeleteListeners.
-
addCachedMessagePinListener
ListenerManager<CachedMessagePinListener> addCachedMessagePinListener(CachedMessagePinListener listener)
Adds aCachedMessagePinListener.- Parameters:
listener- The listener to add.- Returns:
- The manager of the listener.
-
getCachedMessagePinListeners
List<CachedMessagePinListener> getCachedMessagePinListeners()
Gets a list with all registeredCachedMessagePinListeners.- Returns:
- A list with all registered
CachedMessagePinListeners.
-
addMessageAttachableListener
static <T extends MessageAttachableListener & ObjectAttachableListener> Collection<ListenerManager<T>> addMessageAttachableListener(DiscordApi api, long messageId, T listener)
Adds a listener that implements one or moreMessageAttachableListeners 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> Collection<ListenerManager<T>> addMessageAttachableListener(DiscordApi api, String messageId, T listener)
Adds a listener that implements one or moreMessageAttachableListeners 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 moreMessageAttachableListeners 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, String messageId, T listener)
Removes a listener that implements one or moreMessageAttachableListeners 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> Map<T,List<Class<T>>> getMessageAttachableListeners(DiscordApi api, long messageId)
Gets a map with all registered listeners that implement one or moreMessageAttachableListeners 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> Map<T,List<Class<T>>> getMessageAttachableListeners(DiscordApi api, String messageId)
Gets a map with all registered listeners that implement one or moreMessageAttachableListeners 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, Class<T> listenerClass, T listener)
Removes aMessageAttachableListenerfrom 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, String messageId, Class<T> listenerClass, T listener)
Removes aMessageAttachableListenerfrom 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> Collection<ListenerManager<T>> addMessageAttachableListener(T listener)
Adds a listener that implements one or moreMessageAttachableListeners. 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 moreMessageAttachableListeners.- Type Parameters:
T- The type of the listener.- Parameters:
listener- The listener to remove.
-
getMessageAttachableListeners
<T extends MessageAttachableListener & ObjectAttachableListener> Map<T,List<Class<T>>> getMessageAttachableListeners()
Gets a map with all registered listeners that implement one or moreMessageAttachableListeners 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(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.
-
-