Getting a guild from the Client instance. Tried getServerSideProp and getStaticProp but both of them doesn't work with the app directory. Can someone help me with this?
export default async function GuildPage({
params: { guildId },
}: {
params: { guildId: string };
}) {
const data = await Guild.findOne({ guildId });
if (!data) return <Container>Guild not found!</Container>;
// issue is here:
const guild = discordClient.guilds.cache.get(data.guildId);
console.log(guild);
return <Container>test</Container>;
}