mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-01-24 18:04:01 +00:00
changed catch block in join listener for Exception, so the listener dont interrupt one another
fixed join template added join listener to check if a joined user should be muted changed cached message to be an intant instead fixed wrong id in mute table moved the timestamps for mute notifications to the footer fixed a case for message embeds, when the embed does not have a description
This commit is contained in:
@@ -38,7 +38,7 @@ public class JoinListenerBean extends ListenerAdapter {
|
||||
try {
|
||||
AUserInAServer aUserInAServer = userManagementService.loadUser(event.getMember());
|
||||
executeListener(event, joinListener, aUserInAServer);
|
||||
} catch (AbstractoRunTimeException e) {
|
||||
} catch (Exception e) {
|
||||
log.error("Listener {} failed with exception:", joinListener.getClass().getName(), e);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -4,9 +4,6 @@ import dev.sheldan.abstracto.core.models.database.AServer;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Repository
|
||||
public interface ServerRepository extends JpaRepository<AServer, Long> {
|
||||
List<AServer> findAll();
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ import org.springframework.scheduling.annotation.Async;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.awt.*;
|
||||
import java.time.Instant;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
@@ -128,7 +129,7 @@ public class MessageCacheBean implements MessageCache {
|
||||
.content(message.getContentRaw())
|
||||
.embeds(embeds)
|
||||
.reactions(getFutures(futures))
|
||||
.timeCreated(message.getTimeCreated())
|
||||
.timeCreated(Instant.from(message.getTimeCreated()))
|
||||
.attachmentUrls(attachmentUrls)
|
||||
.build());
|
||||
});
|
||||
|
||||
@@ -1 +1 @@
|
||||
User ${user.name}#${user.discriminator} (${userMention}) has joined the guild.
|
||||
User ${user.name}#${user.discriminator} (${user.asMention}) has joined the guild.
|
||||
Reference in New Issue
Block a user