#REST API
5 messages · Page 1 of 1 (latest)
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!
It doesn’t do it like discord.js. Discord.js uses @discordjs/rest and that handles the ratelimits.
I meant if I use @discordjs/rest
import { REST } from '@discordjs/rest';
import { Routes } from 'discord-api-types/v10';
class Discord extends DiscordBase {
#config
constructor(config) {
super();
this.version = '10';
this.#config = config;
}
async getGuilds() {
const rest = new REST({ version: this.version, makeRequest: fetch }).setToken(this.#config.tokenTest);
return await rest.get(Routes.userGuilds());
}
}
It would be likely the same as discord.js