Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/crazywoola/dify-bot
A simple dify bot
https://github.com/crazywoola/dify-bot
Last synced: about 1 month ago
JSON representation
A simple dify bot
- Host: GitHub
- URL: https://github.com/crazywoola/dify-bot
- Owner: crazywoola
- Created: 2023-07-27T02:54:11.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-29T13:16:09.000Z (7 months ago)
- Last Synced: 2024-11-09T09:18:57.438Z (about 1 month ago)
- Language: TypeScript
- Size: 335 KB
- Stars: 29
- Watchers: 1
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Dify Bot
#### [Website](https://dify.ai) • [Docs](https://docs.dify.ai) • [Twitter](https://twitter.com/dify_ai)
## DescriptionA unified bot for Discord and Slack and etc. Powered by [Dify.AI](https://dify.ai/).
### Supported Platforms
- [x] Slack
- [x] Discord
- [ ] Coming Soon## Before you start
```bash
DEBUG=debug
MODE=chat # chat or completion
ADAPTER=slack
# Dify
DIFY_API_BASE_URL=https://api.dify.ai/v1
DIFY_API_KEY=app-OxxxxxxxxxxxxxTxxxxxxx
# Slack
SLACK_BOT_TOKEN=xoxb-xxxxxxxxxxxxx-xxxxxxxxxxxxx-V25CBgH7347xxxxxxxxxxxxx
SLACK_APP_TOKEN=xapp-1-A05KP4WSVS4-xxxxxxxxxxxxx-4208xxxxxxxxxxxxxca9dxxxxxxxxxxxxxc33a0d8bb311d40axxxxxxxxxxxxx
# Discord
DISCORD_TOKEN=MTExMjAyMTMxOxxxxxxxxxxxxx.GkPR5t.xIrYZxxxxxxxxxxxxxBN1jqkxxxxxxxxxxxxx
DISCORD_ID=1112021318955708487
```- For Slack bot you need to create a bot user and install the app to your workspace. You need SLACK_BOT_TOKEN and SLACK_APP_TOKEN to run the bot. You can find the tokens in the [Slack API](https://api.slack.com/apps) page.
- For Discord bot you need to create a bot user and get the token in the [Discord Developer Portal](https://discord.com/developers/applications). You nded DISCORD_TOKEN and DISCORD_ID to run the bot. You can find the tokens in the [Discord Developer Portal](https://discord.com/developers/applications) as well.
## OAuth Scopes
TODO
## InstallationYou will need node.js 20.0.0 or newer.
```bash
cp .env.example .env
npm install
```## Usage
```bash
npm run build
npm run start
```
docker build . -t pinkbanana/bot:latest
## Development```bash
npm run dev
```## Production
```
docker build . -t pinkbanana/bot:latest
docker run -it --env-file .env pinkbanana/bot:latest
```## License
MIT License
## Author
- [小红书](https://www.xiaohongshu.com/user/profile/55b646aa3397db5ad6136b9c) 点个关注 ➕