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

Jnss98b/iMaAGin-E-2

 
 

Repository files navigation

DiscordBot-EdgeGPT

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

Update

2023/6/21: fix Redirect failed when using Creative style to create images.

2023/6/1 : Users not need to set cookies also can use slash command.

2023/5/21 : Anyone who wants to use slash command should set their cookies first.

Features

Slash command

will create a separate chat for each user.

  • cookies setting(use personal Bing Cookies): /bing_cookies [choice] setting

  • 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

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

  • Same as use /bing,

    mention1

    after switching styles to creative, you can also generate images!

    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]: Because Bing Cookies will expire, so this command can set new Cookies directly. 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. If you don't want a limit channel to mention a bot, you don't need to set up a MENTION_CHANNEL_ID, just leave it blank.

    DISCORD_BOT_TOKEN=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    MENTION_CHANNEL_ID=123456789
    
  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.6%
  • Dockerfile 0.4%