# botpot

> Bot Toolkit for Slack and Discord Bots

Latest version **0.1.0** (published 2018-04-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install botpot
pnpm add botpot
yarn add botpot
bun add botpot
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2018-04-19 |
| First published | 2018-04-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | ^8.10.0 |
| Dependencies | 7 |
| Unpacked size | 16.6 KB |
| Known vulnerabilities | 0 (+4 in 3 direct dependencies) |
| Install scripts | no |
| Author | Patrick Bruns |
| Maintainers | procrastech |

## Links

- npm: https://www.npmjs.com/package/botpot
- npm.io page: https://npm.io/package/botpot

## Dependencies (7)

- [pg](https://npm.io/package/pg.md) ^7.4.1
- [knex](https://npm.io/package/knex.md) ^0.14.6
- [log4js](https://npm.io/package/log4js.md) ^2.5.3
- [express](https://npm.io/package/express.md) ^4.16.3
- [request](https://npm.io/package/request.md) ^2.85.0
- [discord.js](https://npm.io/package/discord.js.md) ^11.3.2
- [@slack/client](https://npm.io/package/@slack/client.md) ^4.0.1

## Recent versions

- 0.1.0 (latest) — 2018-04-19
- 0.0.9 — 2018-04-19

## README

# botpot
Use botpot in your nodejs app to create and host Discord and Slack bots  

## Installation
Run `npm install botpot`

## Usage
Currently botpot accepts only postgresql connections. 
Get the router and use it ``app.use('/slack', botpot.getRouter());``  
Set the database connection ``botpot.setConn(process.env.DATABASE_URL);``  
Set your Discord Token ``botpot.setDiscordToken(process.env.DISCORD_TOKEN);``  
Create SlackRoutes  ``const general = botpot.createSlackRoute('action-endpoint', 'animGif-endpoint');``  
Set the SlackBot Token ``general.setToken(process.env.SLACK_TOKEN);``  
Create your BotEvents  
``general.createBotEvent({``<br>
    ``triggerString: 'Hello There',``<br>
    ``responseString: 'General Kenobi',``<br>
    ``reaction: undefined,``<br>
    ``gifResponse: 'https://lh3.googleusercontent.com/-xv1hKxae6hE/WJvjnHjKuEI/AAAAAAAABvE/kZTbR_iH9iEewYpFeWfd2UpeEGB6tS-RACJoC/w500-h150/general.gif',``<br>
    ``followUp: 'Your Move',``<br>
    ``isFollowUp: false,``<br>
``});``<br>
``general.createBotEvent({``<br>
    ``triggerString: 'Your Move',``<br>
   `` responseString: 'You Fool! I have been trained in your jedi arts by Count Dooku.',``<br>
    ``reaction: 'rage',``<br>
    ``gifResponse: undefined,``<br>
    ``followUp: undefined,``<br>
    ``isFollowUp: true,``<br>
``});``<br>


## Credits
Credit and a big thanks to FrankMazarella

---
_Source: https://npm.io/package/botpot · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
