Class MessageBulkDeleteEvent
java.lang.Object
net.dv8tion.jda.api.events.Event
net.dv8tion.jda.api.events.message.MessageBulkDeleteEvent
- All Implemented Interfaces:
GenericEvent
Indicates that a bulk deletion is executed in a
Set
GuildMessageChannel
.
Set
JDABuilder.setBulkDeleteSplittingEnabled(boolean)
to false in order to enable this event.
Can be used to detect that a large chunk of Messages is deleted in a GuildMessageChannel. Providing a list of Message IDs and the specific GuildMessageChannel.
Requirements
This event requires at least one of the following intents (Will not fire at all if neither is enabled):
GUILD_MESSAGES
to work in guild message channelsDIRECT_MESSAGES
to work in private channels
-
Constructor Summary
ConstructorDescriptionMessageBulkDeleteEvent
(JDA api, long responseNumber, GuildMessageChannel channel, List<String> messageIds) -
Method Summary
Modifier and TypeMethodDescriptionTheGuildMessageChannel
where the messages have been deletedgetGuild()
TheGuild
where the messages were deleted.List of messages that have been deleted.Methods inherited from class net.dv8tion.jda.api.events.Event
getJDA, getRawData, getResponseNumber, toString
-
Constructor Details
-
MessageBulkDeleteEvent
-
-
Method Details
-
getChannel
TheGuildMessageChannel
where the messages have been deleted- Returns:
- The TextChannel
-
getGuild
TheGuild
where the messages were deleted.- Returns:
- The Guild
-
getMessageIds
List of messages that have been deleted.- Returns:
- The list of message ids
-