forked from Fascinated/Bat
sort sniped messages
This commit is contained in:
@ -57,6 +57,7 @@ public class MessageSnipeFeature extends Feature implements EventListener {
|
||||
*/
|
||||
public static SnipedMessage getDeletedMessage(BatGuild guild, String channelId) {
|
||||
List<SnipedMessage> messages = snipedMessages.getOrDefault(guild, new ArrayList<>());
|
||||
messages.sort(Comparator.comparing(SnipedMessage::getDeletedDate));
|
||||
for (SnipedMessage message : messages) {
|
||||
if (message.getDeletedDate() != null // Check if the message was deleted
|
||||
&& message.getMessage().getChannel().getId().equals(channelId)) {
|
||||
|
Reference in New Issue
Block a user