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>);
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
2 Replies
d.js toolkit
d.js toolkit12mo ago
• What's your exact discord.js npm list discord.js and node node -v version? • Post the full error stack trace, not just the top part! • Show your code! • Explain what exactly your issue is. • Not a discord.js issue? Check out #useful-servers.
Leo
Leo12mo ago
Had no idea, thank you!