Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/flows-network/discord-chatgpt
A Discord ChatGPT Bot
https://github.com/flows-network/discord-chatgpt
automation chatgpt discord discord-chatgpt rust
Last synced: 3 months ago
JSON representation
A Discord ChatGPT Bot
- Host: GitHub
- URL: https://github.com/flows-network/discord-chatgpt
- Owner: flows-network
- License: gpl-3.0
- Created: 2023-03-30T14:02:51.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-08-29T05:05:27.000Z (about 1 year ago)
- Last Synced: 2024-07-27T09:33:30.707Z (3 months ago)
- Topics: automation, chatgpt, discord, discord-chatgpt, rust
- Language: Rust
- Homepage: https://flows.network/
- Size: 57.6 KB
- Stars: 10
- Watchers: 2
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
#
A Discord ChatGPT bot
[Deploy this function on flows.network](https://flows.network/flow/createByTemplate/discord-chatgpt), and you will get a Discord bot that uses ChatGPT to respond to every question in your Discord DM.
## Prerequisites
* You will need to bring your own [OpenAI API key](https://openai.com/blog/openai-api). If you do not already have one, [sign up here](https://platform.openai.com/signup).
* You also need a bot token to access the Discord API. Please refer to [How to create a Discord chat bot](https://flows.network/blog/discord-chat-bot-guide) to save the Discord API Token and invite the bot to your server. You can see the bot is offline now. But don't worry! After you finish all the steps, the bot will be online.## Deploy your Telegram ChatGPT bot in 3 steps
1. Create a bot from a template
2. Add your ChatGPT API key
3. Add the Discord bot token### 1 Create a bot from a template
[**Just click here**](https://flows.network/flow/createByTemplate/discord-chatgpt)
Here you can see three variables. You can customize the `system_prompt` variable to prompt ChatGPT.
Click on the **Create and Build** button.
### 2 Add the Discord token
You will now set up Discord integration. Enter your Discord token here. Please refer to [How to create a Discord chat bot](https://flows.network/blog/discord-chat-bot-guide).
Click on **Continue**.
### 3 Add your OpenAI API key
You will now set up OpenAI integration. Click on **Connect**, and enter your key.
[](https://user-images.githubusercontent.com/45785633/226564674-902933b5-8ff3-4724-93e3-2b2f67dc0b9a.png)
Close the tab and go back to the flow.network page once you are done. Click on **Deploy** button.
## Give it a try.
When the status of the flow is ready and running, you can go back to your Discord server and check out the status of the bot you just invited.
Now you can see the bot on the right `online` contact list. DM the bot or @the bot in a channel, the bot will answer your questions.
## Others
If you want to build locally, make sure you have installed Rust and added `wasm32-wasi` traget.
```
cargo build --target wasm32-wasi --release
```