Giter Club home page Giter Club logo

discordbot-edgegpt's Introduction

DiscordBot-EdgeGPT

PyPI - Python Version

Try with Replit Badge

Update

2024/4/21:Supporting the Suno plugin with Copilot.

2024/3/30:Support DALLE-3(Unofficial), get api key from https://dalle.feiyuyu.net/dashboard.

2024/3/5:Images can be generated while chatting.

2024/2/2:To optimize usage, recommended to re-read the README.

2024/1/27:Add jail break version, but image uploads are currently not supported, and python version need 3.10+.

demo

Features

Slash command

will create a separate chat for each user.

  • cookies setting (set for using personal Bing Cookies): /cookies setting [cookies_file]

  • Unofficial DALLE-3 api key setting (set for using personal unofficial DALLE-3 api key, can get from https://dalle.feiyuyu.net/dashboard): /dalle3 setting

    dalle3_setting

  • copilot: /copilot [version] [style] [type]

    • A separate thread will be created, if use default version, can generate images while chatting.
      • [version]:default can chat with Copilot, jailbreak chat with Sydney, but jailbreak image uploads are not currently supported.
      • [style]:Have 3 conversation style can choose, creativebalanced and precise.
      • [type]:Options for thread type, public or private.
      • [plugin]:Currently only supports Suno.

    chat suno

  • image creator: /create image [service][prompt]

    bingimage.png dalle3image.png

  • reset conversation: /reset conversation

    reset

Mention bot

same function as the slash command, but this will reply all user messages.

  • If only the bot is mentioned, you will get a drop-down list of settings.

    dropdown1 dropdown2 mention1 mention2

Prefix command (available only to bot owner)

bot owner setting.

  • !unload [file_name_in_cogs_folder]: Disable command from the specified file.

  • !load [file_name_in_cogs_folder]: Enable the command from the specified file.

    load & unload

  • !clean: Empty discord_bot.log file.

  • !getLog: Get discord_bot.log file. Real-time tracking of the bot's operating status.

    getLog

  • !upload [.txt_file]: Same as /cookies setting, but for default cookies.

    upload

Install

pip install -r requirements.txt

Usage

  1. Rename the file.env.devto.env, then open it and edit it.

Warning

AUTO_COOKIES features are still being tested, so it may not work for everyone, and if you want to use with BING_COOKIES, you need to set BING_COOKIES first to work properly.

DISCORD_BOT_TOKEN=
 
# (Optional) If you are run with Replit, it is recommended to configure cookies using this parameter instead of using cookies.json
BING_COOKIES=
 
# (Experimental) Automatically obtain Bing cookies and regular updates 
AUTO_COOKIES=False # False/True
 
# (Optional) proxy
PROXY= 
 
# Timeout for BingImageCreator
IMAGE_TIMEOUT=300
IMAGE_MAX_CREATE_SEC=300
 
# Set unofficial DALLE-3 api key, api key can get from https://dalle.feiyuyu.net/dashboard
DALLE3_UNOFFICIAL_APIKEY=

# (Optional) Allow mention bot only in specific channel.
MENTION_CHANNEL_ID=1227670969702754857
 
# (Optional) Allow each commands in some channels.
# specific channel(s) for `/cookies setting`
COOKIES_SETTING_CHANNEL_ID=1227670969702754857,1227327094070254857
 
# specific channel(s) for `/dalle3 setting`
DALLE3_SETTING_CHANNEL_ID=122767096970275483
 
# specific channel(s) for `/copilot`
CHAT_CHANNEL_ID=
 
# specific channel(s) for `/create image`
CREATE_IMAGE_CHANNEL_ID=
 
# specific channel(s) for `/reset conversation`
RESET_CHAT_CHANNEL_ID=
 
# specific channel(s) for `/help`
HELP_CMD_CHANNEL_ID=
  1. Create the cookies.json file. (If you have set BING_COOKIES or set AUTO_COOKIES to True in the .env file, skip this step!)

    • Install the cookie editor extension for Chrome or Firefox.
    • Go to bing.com
    • Click "Export" on the buttom right.
    • Paste your cookies into a file cookies.json
  2. Start run your bot.

    python bot.py

Credits

Contributors

This project exists thanks to all the people who contribute.

Star History

Star History Chart

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.