Skip to content

Commit 1ede67c

Browse files
committed
hopefully stop bot necroposting
1 parent 7319c89 commit 1ede67c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/main/java/xyz/htmlcsjs/coffeeFloppa/handlers/MessageHandler.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424

2525
import java.io.ByteArrayInputStream;
2626
import java.nio.charset.StandardCharsets;
27+
import java.time.Duration;
28+
import java.time.Instant;
2729
import java.util.*;
2830
import java.util.stream.Collectors;
2931

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

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

8994
if (channel instanceof PrivateChannel dm) {

0 commit comments

Comments
 (0)