Skip to content

Latest commit

 

History

History
24 lines (17 loc) · 500 Bytes

README.md

File metadata and controls

24 lines (17 loc) · 500 Bytes

Kook JS

A Javascript SDK to program bots and webhooks for the Kook (kaiheila) application.

Example :

import { KookClient } from "./src/index.js";

const KOOK_WEBSOCKET_TOKEN = process.env.KOOK_WEBSOCKET_TOKEN;
const client = new KookClient(KOOK_WEBSOCKET_TOKEN);

client.once("ready", function () {
    console.log("Bot is ready");
});

client.on("message", function(message) {
    console.log(message.content);
});

client.login().catch(function (err) {
    console.error(err);
});