Skip to content

Using Microsoft's Bing Chat AI and Bing Image Creator on discord bot.

License

Notifications You must be signed in to change notification settings

trevorfs/EdgeGPT

 
 

Repository files navigation

DiscordBot-EdgeGPT

Using Bing on discord bot, your Microsoft account needs to be able to access Bing first.

Update

2023/4/26 : Create a separate chat for each user.

2023/4/24 : Now can generate images by Creative style.

2023/4/19 : When old Cookies expire, the bot can set new Cookies directly by prefix command.

Features

Slash command

  • bing: /bing [message]

    USE_SUGGEST_RESPONSES: True (can change in file config.yml)
    edgegpt
    USE_SUGGEST_RESPONSES: False (can change in file config.yml)
    edgegpt
    conversation style: Creative
    creative_style
  • bing image creator: /create_image [prompt]

    bingimage.png

  • conversation style (default balanced): /switch_style [style]

    style.png

  • reset: /reset

    reset

Prefix command (available only to bot owner)

  • !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]: Because Bing Cookies will expire, so this command can set new Cookies directly and restart bot. You just need to copy bing cookies and past, the Cookies will auto convert to .txt file.

    upload

Install

pip install -r requirements.txt

Usage

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

    DISCORD_BOT_TOKEN=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    
  2. Get Bing authentication.

    • Install the cookie editor extension for Chrome or Firefox.
    • Go to bing.com
    • Click "Export" on the bottom right.
    • Paste your cookies into a file cookies.json
  3. Start run your bot, hosted locally or on a server.

    -> Recommended Free Servers: fly.io

Credits

Contributors

This project exists thanks to all the people who contribute.

About

Using Microsoft's Bing Chat AI and Bing Image Creator on discord bot.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.4%
  • Dockerfile 0.6%