Fix JDA deprecation issue

This commit is contained in:
Allink 2023-07-25 03:47:33 +01:00
parent 80f19f0349
commit 8876076a9d
No known key found for this signature in database
2 changed files with 2 additions and 2 deletions

View File

@ -62,7 +62,7 @@ public class MessageReactionListener extends ListenerAdapter
final MessageBuilder archiveMessageBuilder = new MessageBuilder();
archiveMessageBuilder.setContent("Report completed by " + completer.getUser().getAsMention() + " (" + Discord.deformat(completer.getUser().getAsTag() + ")"));
archiveMessageBuilder.setAllowedMentions(Collections.emptyList());
archiveMessageBuilder.setEmbed(embed);
archiveMessageBuilder.setEmbeds(embed);
final Message archiveMessage = archiveMessageBuilder.build();
archiveChannel.sendMessage(archiveMessage).complete();

View File

@ -71,7 +71,7 @@ public class DiscordCommandManager
embedBuilder.setTitle("Command error");
embedBuilder.setColor(Color.RED);
embedBuilder.setDescription("You don't have permission to execute this command.");
messageBuilder.setEmbed(embedBuilder.build());
messageBuilder.setEmbeds(embedBuilder.build());
final Message message = messageBuilder.build();
final CompletableFuture<Message> futureMessage = channel.sendMessage(message).submit(true);