Parameters
required
Returns
Hono<BlankEnv, object, "/", string>Documentation Index
Fetch the complete documentation index at: /docs/llms.txt
Use this file to discover all available pages before exploring further.
spectrum(options: SpectrumPluginOptions): Hono<BlankEnv, object, "/", string>
import { Hono } from "hono";
import { Spectrum } from "spectrum-ts";
import { spectrum } from "@spectrum-ts/hono";
const app = await Spectrum({ ..., webhookSecret: process.env.SPECTRUM_WEBHOOK_SECRET });
const server = new Hono().route("/", spectrum({
app,
onMessage: async (space, message) => {
if (message.content.type === "text") await space.send(`echo: ${message.content.text}`);
},
}));
Hono<BlankEnv, object, "/", string>Was this page helpful?