Skip to content

An extension of slack bolt-js framework to help manage your sessions and installations

License

Notifications You must be signed in to change notification settings

roger-king/conductorjs

Repository files navigation

Still in Development

Conductor

An extension of slack bolt-js framework to help manage your sessions, installations, conversations, and channel event routing.

Development

    yarn install
    yarn link

    # starts a tsc -w
    yarn dev

Usage

        const receiver = new ExpressReceiver({ signingSecret: slackConfig.signingSecret });
        const router = receiver.router;
        
        const c = new Conductor({
            host: '127.0.0.1',
            router: router
        });
        
        this.app = new SlackApp({
            signingSecret: slackConfig.signingSecret,
            clientId: slackConfig.clientId,
            clientSecret: slackConfig.clientSecret,
            // stateSecret: 'super-duper-secret',
            scopes: slackConfig.scopes,
            // authorize: lb.authorize,
            // In your app instance
            installationStore: {
                storeInstallation: async (installation) => {
                    return await c.saveInstallation(installation.team.id, installation);
                },
                fetchInstallation: async (InstallQuery) => {
                    return await c.fetchInstallation(InstallQuery.teamId);
                },
            },
            receiver,
        });

        this.app.error(lb.handleError);
        this.app.use((args) => c.listen({ ...args }));
        this.app.use((args) => c.shouldProcess({ ...args }));

About

An extension of slack bolt-js framework to help manage your sessions and installations

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published