tjrgg / klasa-rest

Discord rest sub-package extracted from @klasa/core

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

@klasa/rest

This is a request handler for the discord api and is responsible for handling all ratelimits. This utilizes the latest headers for millisecond precision and hash bucket grouping. Because of that maximum throughput is possible without hard-coding any rates or limits. This library also features 100% unit test coverage.

Simple Example:

import { REST, Routes } from '@klasa/rest';
import * as config from './config.json';

const rest = new REST();

rest.token = config.token;

rest.get(Routes.oauthApplication())
    .then(console.log);

About

Discord rest sub-package extracted from @klasa/core

License:MIT License


Languages

Language:TypeScript 100.0%