Class MessageBulkDeleteEvent


  • public class MessageBulkDeleteEvent
    extends Event
    Indicates that a bulk deletion is executed in a TextChannel.
    Use JDABuilder.setBulkDeleteSplittingEnabled(boolean) to true in order to enable this event.

    Can be used to detect tha a large chunk of Messages is deleted in a TextChannel. Providing a list of Message IDs and the specific TextChannel.

    • Constructor Detail

      • MessageBulkDeleteEvent

        public MessageBulkDeleteEvent​(JDA api,
                                      long responseNumber,
                                      TextChannel channel,
                                      java.util.List<java.lang.String> messageIds)
    • Method Detail

      • getChannel

        public TextChannel getChannel()
        The TextChannel where the messages have been deleted
        Returns:
        The TextChannel
      • getGuild

        public Guild getGuild()
        The Guild where the messages were deleted.
        Returns:
        The Guild
      • getMessageIds

        public java.util.List<java.lang.String> getMessageIds()
        List of messages that have been deleted.
        Returns:
        The list of message ids