Repository
Current version released
5 years ago
Versions
π Keystone
A WIP library providing simple, low-level wrappers for the Discord API.
Keystone is a minimal library to help you interact with the Discord API. It provides separate wrappers for the gateway and REST endpoints, and is inspired by libraries like βοΈ detritus.js.
Usage
import { GatewaySocket, Packet } from "https://deno.land/x/keystone/ws/mod.ts";
const socket = new GatewaySocket({
intents: 32509,
token: "MY DISCORD TOKEN",
});
socket.addEventListener("dispatch", (evt: CustomEvent<Packet>) => {
const { d, t } = evt.detail;
if (t === "MESSAGE_CREATE") {
console.log(d.content);
}
});
socket.connect();