[AB-xxx] adding ability to automate giveaways using modmail and adding storage for give away keys

ignoring message updated events for messages not within servers
This commit is contained in:
Sheldan
2024-12-25 19:54:24 +01:00
parent 8819c12b81
commit cdbdb395ac
38 changed files with 1266 additions and 87 deletions

View File

@@ -66,6 +66,9 @@ public class MessageUpdatedListenerBean extends ListenerAdapter {
@Override
@Transactional
public void onMessageUpdate(@Nonnull MessageUpdateEvent event) {
if(!event.isFromGuild()) {
return;
}
metricService.incrementCounter(MESSAGE_UPDATED_COUNTER);
Message message = event.getMessage();
messageCache.getMessageFromCache(message.getGuild().getIdLong(), message.getChannel().getIdLong(), event.getMessageIdLong()).thenAccept(cachedMessage -> {