1.0.1 • Published 2 years ago
razu-rest v1.0.1
@razulmfao/rest
A fork of @discordjs/rest but with more features.
import { REST } from '@razulmfao/rest';
class RequestClient extends REST {
client = new REST();
authPrefix;
/**
* @param {string} token
* @param {"Bot" | "Bearer"} authPrefix
**/
construct(token, authPrefix = 'Bot') {
if (token) this.client.setToken(token);
this.authPrefix = authPrefix;
}
/**
* @description "Fetches the users information."
**/
fetchMe() {
return this.client.get('/users/@me', {
authPrefix: this.authPrefix,
});
}
}