Skip to content

Commit

Permalink
hopefully stop bot necroposting
Browse files Browse the repository at this point in the history
  • Loading branch information
htmlcsjs committed Apr 1, 2024
1 parent 7319c89 commit 1ede67c
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

import java.io.ByteArrayInputStream;
import java.nio.charset.StandardCharsets;
import java.time.Duration;
import java.time.Instant;
import java.util.*;
import java.util.stream.Collectors;

Expand Down Expand Up @@ -84,6 +86,9 @@ public static Mono<Object> edited(MessageUpdateEvent event) {

@NotNull
private static Mono<Object> executeMessage(Message message, String msgContent) {
if (Duration.between(message.getTimestamp(), Instant.now()).toHours() >= 2) {
return Mono.empty();
}
Channel channel = message.getChannel().block();

if (channel instanceof PrivateChannel dm) {
Expand Down

0 comments on commit 1ede67c

Please sign in to comment.