tsmi

tsmi

Better Misskey API Client for TypeScript/JavaScript

Thanks

  • MiPA and MiPAC have been helpful in many of the tsmi implementations.
    • Thanks also to Discord.py, the source of MiPA(C) implementation.
  • misskey-js

Usage

import Client from "tsmi";

const client = new Client({
host: "https://<your-misskey-server-url>",
token: "<YOUR_TOKEN_HERE>",
channels: ["main", "localTimeline", "homeTimeline"],
});

client.once("ready", async (me) => {
console.log("Client ready!");
const user = await me.user.getMe();
console.log("Logged in with @", user.name);
});

client.on("noteCreate", (note, timeline) => {
if (timeline === "localTimeline") {
console.log(note); // Only take local timeline notes
}
});

Generated using TypeDoc