The HTTP REST API client for foxogram.js
Install with npm / yarn / pnpm:
npm install @foxogram/rest
yarn add @foxogram/rest
pnpm add @foxogram/rest
import { REST } from "@foxogram/rest";
import { APIRoutes } from "@foxogram/api-types";
const rest = new REST().setToken(TOKEN);
try {
await rest.post(APIRoutes.messages(CHANNEL_ID), {
body: {
content: "floof by coof",
},
});
} catch (error) {
console.error(error);
}