${RVX}
${RVX}
Explore posts from servers
DIAdiscord.js - Imagine an app
Created by ${RVX} on 1/6/2024 in #djs-questions
Oauth rest
export async function getUserGuilds(token) {
const rest = new REST({ version: "10", authPrefix: "Bearer" }).setToken(token);

try {
return await rest.get(Routes.userGuilds());
} catch (error) {
console.error(error);
return [];
}
}
export async function getUserGuilds(token) {
const rest = new REST({ version: "10", authPrefix: "Bearer" }).setToken(token);

try {
return await rest.get(Routes.userGuilds());
} catch (error) {
console.error(error);
return [];
}
}
im passing the accessToken from oauth in as the token here and im getting this error
DiscordAPIError[0]: 401: Unauthorized
DiscordAPIError[0]: 401: Unauthorized
what am i doing wrong here? im using next auth to get the users access token
18 replies
SIASapphire - Imagine a framework
Created by ${RVX} on 12/12/2022 in #sapphire-support
sub commands
6 replies
DIAdiscord.js - Imagine an app
Created by ${RVX} on 12/7/2022 in #djs-questions
discord.js 13 vs discord.js v14
forgot there are forums lol...anyways. what are your thoughts? what are the main differences between v13,14? looking into using v14 but I just wanna know what's new? what's different. thanks for your thoughts!
7 replies