Skip to content

ghanoubrk/Discord-Bot-using-OpenAI-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Discord-Bot-using-OpenAI-API

A Discord bot that uses the OpenAI API to generate text and images based on user prompts.

Overview

This Discord bot allows users to interact with the OpenAI API using two commands: /askMc for generating text responses and /drawMc for generating images.

Features

  • AskMc Command: Use /askMc followed by a question to get a text response generated by the OpenAI engine using "text-davinci-002" model.

  • DrawMc Command: Use /drawMc followed by a prompt to generate an image using Dall-E 2 model .

Example:

/askMc Write a short description about Algeria
/drawMc a notebook on a dark room under the sun rays

Getting Started

  1. Clone this repository:
    git clone https://github.com/ghanoubrk/Discord-Bot-using-OpenAI-API
  2. Install dependencies :
    pip install -r requirements.txt
  3. Create .env file on your project folder and add on it your discord token and your OpenAI API key :
    discord_token=YOUR_DISCORD_TOKEN
    openAi_key=YOUR_OPENAI_API_KEY
  4. Run the bot :
    python bot.py

Contribution

Contributions are welcome, If you want to contribute don't hesitate

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages