An example of a Discord bot powered by the OpenAI API.
- Create a Discord bot and invite it to your server.
- Create a
.env
file in the root directory of the project or set up the proper environment variables on your deployment environment. Use the.env.example
file as a template. - Run
pnpm deploy-commands
to register your bot commands. - Run
pnpm dev
to start the bot.
/chatgpt start
- Start a thread with ChatGPT./gpt-3 complete
- Generate text using the GPT-3 API./gpt-3 models
- Lists all GPT-3 based models./ping
- Responds with a GPT-3 generated poem.