Revolt API
This package contains typings for objects in the Revolt API and a fully typed API request builder.
Example Usage
If you just need access to types:
import type { User } from 'revolt-api';
If you want to send requests:
import { API } from 'revolt-api';
const client = new API();
const client = new API({ authentication: { revolt: 'bot-token' } });
client.get('/users/@me')
.then(user => user.username);
let channel_id = "some channel id";
client.post(`/channels/${channel_id}/messages`, {
content: "some content"
});
For more details on how this works, see the README of @insertish/oapi.