Skip to content
This repository has been archived by the owner on Feb 21, 2022. It is now read-only.
August (Chris) edited this page Sep 10, 2019 · 2 revisions

Laffey

🏗 Webhook handler for discord.boats

Getting Started

You must have Node.js installed (comes with NPM)

You can install it in your project by:

$ npm i laffey
# or
$ yarn add laffey

Creating a new Instance object

const { Instance, MemoryStorage } = require('laffey');
const instance = new Instance({
    port: 9999,
    auth: '',
    storage: new MemoryStorage({ name: 'awau' }),
    services: ['Boats', 'DBL']
});

instance
    .on('vote', (pkt) => console.log(`User ${pkt.user.id} has voted!`))
    .listen(() => console.log(`Now listening for vote packets on ${instance.options.port}.`);

Services

More services then discord.boats will be provided, not a viable source yet.

How to set a service?

You setup a service (or multiple) in the InstanceOptions constructor.

new Instance({
    services: ['Boats']
});

Multiple services can be added up with the services array

Clone this wiki locally