Skip to content

flows-network/discord-chatgpt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Discord ChatGPT bot

flows.network Discord flows.network Twitter Create a flow

Deploy this function on flows.network, 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. If you do not already have one, # here.
  • You also need a bot token to access the Discord API. Please refer to How to create a Discord chat bot 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

image

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.

image

Click on Continue.

3 Add your OpenAI API key

You will now set up OpenAI integration. Click on Connect, and enter your key.

image

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