https://github.com/subztep/chatbot
Discord chatbot that uses Google’s Dialogflow
https://github.com/subztep/chatbot
ai chatbot dialogflow discord discord-bot ml nodejs typescript
Last synced: about 2 months ago
JSON representation
Discord chatbot that uses Google’s Dialogflow
- Host: GitHub
- URL: https://github.com/subztep/chatbot
- Owner: SubZtep
- License: mit
- Created: 2019-04-17T15:10:36.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2020-06-24T07:24:28.000Z (almost 6 years ago)
- Last Synced: 2025-07-01T04:37:40.550Z (12 months ago)
- Topics: ai, chatbot, dialogflow, discord, discord-bot, ml, nodejs, typescript
- Language: TypeScript
- Homepage:
- Size: 204 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Chatbot :tongue:
Discord chatbot using Dialogflow agent.
After the start, it sends a message to the configured user.
Only one-to-one DM is possible at the moment.
## Setup
1. Install [NodeJS](https://nodejs.org/) and [Yarn](http://yarnpkg.com/).
2. [Create](https://console.dialogflow.com/api-client) **Dialogflow agent**, use v2 API and turn on beta features.
3. Create key and save JSON config from Service Account to `assets/dialogflow/filename.json`.
4. [Create](https://discordapp.com/developers/applications/) **Discord BOT** and [add to a server](https://discordjs.guide/preparations/adding-your-bot-to-servers.html#bot-invite-links) if you wish.
5. Clone (or download) repository.
6. Run `yarn install` for download dependencies.
7. Create `.env` file:
```bash
DISCORD_TOKEN="XXX6TESTTESTTESTTEST9XXX"
KEY_FILE="./assets/dialogflow/small-talk-1-xyz-example.json"
PIC_FILE="./assets/pictures/test.jpg"
CHAT_WITH_USER_ID="123456789012345678"
```
8. Run `yarn build` for build project.
9. Run `yarn start` for start BOT.
## BOT Commands
| Chat Message | Description |
| ------------ | -------------- |
| `!die` | Kill BOT |
| `!pic` | Send a picture |
## License
MIT