[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:
Sheldan
2022-02-27 23:51:06 +01:00
parent 17470f9718
commit 09450429dd
248 changed files with 2362 additions and 1482 deletions

View File

@@ -26,7 +26,7 @@ public class RepostCheckChannelModelConverter {
FullChannel
.builder()
.channel(channel)
.serverChannel(channelService.getTextChannelFromServerNullable(guild, channel.getId()))
.serverChannel(channelService.getMessageChannelFromServerNullable(guild, channel.getId()))
.build()
).collect(Collectors.toList());
repostCheckChannelGroups.add(

View File

@@ -39,7 +39,7 @@ public class RepostMessageReceivedListener implements AsyncMessageReceivedListen
if(!message.isFromGuild() || message.isWebhookMessage() || message.getType().isSystem()) {
return DefaultListenerResult.IGNORED;
}
AChannel channel = channelManagementService.loadChannel(message.getTextChannel().getIdLong());
AChannel channel = channelManagementService.loadChannel(message.getChannel().getIdLong());
if(repostCheckChannelService.duplicateCheckEnabledForChannel(channel)) {
repostService.processMessageAttachmentRepostCheck(message);
List<MessageEmbed> imageEmbeds = message.getEmbeds().stream().filter(messageEmbed -> messageEmbed.getType().equals(EmbedType.IMAGE)).collect(Collectors.toList());