Get first message in thread with @discordjs/core

I'm able to get the last 50 messages in a thread with:
import { REST } from "@discordjs/rest";
import { ChannelsAPI } from "@discordjs/core";

const rest = new REST({ version: "10" }).setToken(
  token
);
const channelsAPI = new ChannelsAPI(rest);

const messages = await channelsAPI.getMessages(<threadId>);


Is there a way I could either:
  • Get the first message posted in that thread
  • invert the order the messages are coming back? (oldest first instead of newest first)
node@v18.16.1
@discordjs/core@0.6.0
discord.js@14.11.0
Was this page helpful?