Skip to content
Dashboard

Chat SDK adds Linq support

Content Engineer
lib/bot.ts
import { Chat } from "chat";
import { createMemoryState } from "@chat-adapter/state-memory";
import { createLinqAdapter } from "@linqapp/chat-sdk-adapter";
export const bot = new Chat({
userName: "Linq Bot",
adapters: {
linq: createLinqAdapter({
apiKey: process.env.LINQ_API_KEY,
signingSecret: process.env.LINQ_WEBHOOK_SECRET,
}),
},
state: createMemoryState(),
});
bot.onDirectMessage(async (thread, message) => {
await thread.subscribe();
await thread.post(`You said: ${message.text}`);
});
bot.onReaction(["thumbs_up"], async (event) => {
await event.thread.post("Appreciate the tapback 🫡");
});

Configure the adapter to respond to @-mentions and iMessage tapbacks

The Complete Guide to Chat SDK

Learn how Chat SDK works end-to-end: from core concepts to building your first bot to deploying it across Slack, Teams, and more.

Read the guide


Ready to deploy?