mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-04-18 04:50:38 +00:00
[AB-358] upgrading to JDA 5
removal of jda-utils adding message context commands [AB-360] fixing confirmation buttons being triggered by somebody not the author
This commit is contained in:
@@ -20,6 +20,7 @@ import dev.sheldan.abstracto.logging.config.LoggingPostTarget;
|
||||
import dev.sheldan.abstracto.logging.model.template.MessageDeletedAttachmentLog;
|
||||
import dev.sheldan.abstracto.logging.model.template.MessageDeletedLog;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.dv8tion.jda.api.entities.GuildMessageChannel;
|
||||
import net.dv8tion.jda.api.entities.Member;
|
||||
import net.dv8tion.jda.api.entities.TextChannel;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -76,7 +77,7 @@ public class MessageDeleteLogListener implements AsyncMessageDeletedListener {
|
||||
public void executeListener(CachedMessage messageFromCache, Member authorMember) {
|
||||
log.debug("Message {} in channel {} in guild {} was deleted.", messageFromCache.getMessageId(), messageFromCache.getChannelId(), messageFromCache.getServerId());
|
||||
|
||||
TextChannel textChannel = channelService.getTextChannelFromServer(messageFromCache.getServerId(), messageFromCache.getChannelId());
|
||||
GuildMessageChannel textChannel = channelService.getMessageChannelFromServer(messageFromCache.getServerId(), messageFromCache.getChannelId());
|
||||
MessageDeletedLog logModel = MessageDeletedLog
|
||||
.builder()
|
||||
.cachedMessage(messageFromCache)
|
||||
|
||||
@@ -17,6 +17,7 @@ import dev.sheldan.abstracto.logging.config.LoggingPostTarget;
|
||||
import dev.sheldan.abstracto.logging.model.template.MessageDeletedAttachmentLog;
|
||||
import dev.sheldan.abstracto.logging.model.template.MessageEditedLog;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.dv8tion.jda.api.entities.GuildMessageChannel;
|
||||
import net.dv8tion.jda.api.entities.Message;
|
||||
import net.dv8tion.jda.api.entities.TextChannel;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -56,7 +57,7 @@ public class MessageEditedListener implements AsyncMessageUpdatedListener {
|
||||
return DefaultListenerResult.IGNORED;
|
||||
}
|
||||
log.debug("Message {} in channel {} in guild {} was edited.", messageBefore.getMessageId(), messageBefore.getChannelId(), model.getServerId());
|
||||
TextChannel textChannel = channelService.getTextChannelFromServer(model.getServerId(), messageBefore.getChannelId());
|
||||
GuildMessageChannel textChannel = channelService.getMessageChannelFromServer(model.getServerId(), messageBefore.getChannelId());
|
||||
MessageEditedLog lodModel = MessageEditedLog
|
||||
.builder()
|
||||
.messageAfter(messageAfter)
|
||||
|
||||
Reference in New Issue
Block a user