diff --git a/application/src/main/java/org/togetherjava/tjbot/features/help/HelpThreadCreatedListener.java b/application/src/main/java/org/togetherjava/tjbot/features/help/HelpThreadCreatedListener.java index 3994107a6b..8988f305d9 100644 --- a/application/src/main/java/org/togetherjava/tjbot/features/help/HelpThreadCreatedListener.java +++ b/application/src/main/java/org/togetherjava/tjbot/features/help/HelpThreadCreatedListener.java @@ -97,8 +97,7 @@ private static boolean isPostedBySelfUser(Message message) { } private RestAction createAIResponse(ThreadChannel threadChannel) { - RestAction originalQuestion = - threadChannel.retrieveMessageById(threadChannel.getIdLong()); + RestAction originalQuestion = threadChannel.retrieveStartMessage(); return originalQuestion.flatMap(HelpThreadCreatedListener::isContextSufficient, message -> helper.constructChatGptAttempt(threadChannel, getMessageContent(message), componentIdInteractor)); @@ -110,7 +109,7 @@ private static boolean isContextSufficient(Message message) { } private RestAction pinOriginalQuestion(ThreadChannel threadChannel) { - return threadChannel.retrieveMessageById(threadChannel.getIdLong()).flatMap(Message::pin); + return threadChannel.retrieveStartMessage().flatMap(Message::pin); } private RestAction generateAutomatedResponse(ThreadChannel threadChannel) { @@ -172,7 +171,7 @@ public void onButtonClick(ButtonInteractionEvent event, List args) { ThreadChannel channel = event.getChannel().asThreadChannel(); Member interactionUser = Objects.requireNonNull(event.getMember()); - channel.retrieveMessageById(channel.getId()) + channel.retrieveStartMessage() .queue(forumPostMessage -> handleDismiss(interactionUser, channel, forumPostMessage, event, args));