1.1.1 • Published 8 months ago

seatalk-bot v1.1.1

Weekly downloads
-
License
-
Repository
-
Last release
8 months ago

SeaTalk Bot

Getting Started

  1. Create NextJS project and install package
npx degit m0o0scar/nextjs-template my-project
cd my-project
npm i
npm i seatalk-bot
  1. Create .env with your SeaTalk bot credentials
SEATALK_APP_ID=xxx
SEATALK_APP_SECRET=xxx
  1. Setup API endpoint to handle requests from SeaTalk

pages/api/seatalk.ts

import { NextApiRequest, NextApiResponse } from 'next';
import { handleIncomingSeaTalkRequests } from 'seatalk-bot';
import { GetReplyCallback } from 'seatalk-bot/esm/src/seatalk/bot/messaging';

const getReply: GetReplyCallback = async (message: string) => {
  return message;
};

export default async function handler(req: NextApiRequest, res: NextApiResponse) {
  return handleIncomingSeaTalkRequests(getReply)(req, res);
}
  1. Setup your bot's callback url.
1.1.1

8 months ago

1.1.0

8 months ago

1.0.0

9 months ago

0.2.2

9 months ago

0.2.1

9 months ago

0.2.0

9 months ago

0.1.0

9 months ago

0.0.0

1 year ago

5.1.3

2 years ago

5.1.2

2 years ago

4.1.2

2 years ago

3.1.2

2 years ago