FuseFairy / DiscordBot-EdgeGPT

Using Copilot, Bing Image Creator and DALLE-3 on Discord bot.
GNU General Public License v2.0
159 stars 41 forks source link

Slash commands not being properly synced after uploading "cookies_files.json" using "/bing setting" #113

Closed GustavRaispits closed 10 months ago

GustavRaispits commented 10 months ago

For some reason ONLY AFTER loading the "cookies_file.json" file through the "/bing setting [choice]" every other slash commands suddenly disappear after displaying the "INFO: Chatbot set successful!" message. I tried to use the !unload / !load commands for reloading the edgegpt cog, but I couldn't fix the issue.

The CMD doesn't display any output error:

image

I've properly copied and pasted the cookies of the bing chat site without being logged inside the "cookies.json" file, the one stored inside the "DiscordBot-EdgeGPT" folder.

The "cookies_file.json" file contains the cookies of my Bing Chat AI session while being logged with my Microsoft account.

I'm currently using the script through Python 3.9.0 because I couldn't install PyYAML 6.0 through the latest Python version due to wheel build issues, could the slash commands disappearing issue be related to the version of Python I'm using?

I don't know if it matters, but when I attempt to use the "/bing" command before setting my personal cookies file, my bot crashes and outputs this error:

Traceback (most recent call last):
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\app_commands\commands.py", line 827, in _do_call
    return await self._callback(self.binding, interaction, **params)  # type: ignore
  File "C:\Users\Administrator\Desktop\DiscordBot-EdgeGPT\cogs\edgegpt.py", line 61, in bing
    logger.info(f"{username}: {usermessage} ({channel}) [Style: {users_chatbot[user_id].get_conversation_style()}]")
KeyError: 1136944140748337213

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\app_commands\tree.py", line 1248, in _call
    await command._invoke_with_namespace(interaction, namespace)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\app_commands\commands.py", line 853, in _invoke_with_namespace
    return await self._do_call(interaction, transformed_values)
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\app_commands\commands.py", line 846, in _do_call
    raise CommandInvokeError(self, e) from e
discord.app_commands.errors.CommandInvokeError: Command 'bing' raised an exception: KeyError: 1136944140748337213

How can I fix this issue? Thank you in advance <3

FuseFairy commented 10 months ago

Maybe you're doing something wrong, because I've tested it myself and it's fine, make sure you're using the latest version.

GustavRaispits commented 10 months ago

Maybe you're doing something wrong, because I've tested it myself and it's fine, make sure you're using the latest version.

Okay, I'll update you whenever I'll be available

GustavRaispits commented 10 months ago

Maybe you're doing something wrong, because I've tested it myself and it's fine, make sure you're using the latest version.

Hello, I managed to make the bot work, but now I'm getting a "Error: CaptchaChallenge: User needs to solve CAPTCHA to continue." error.

I know a lot of people mentions this thread: https://github.com/acheong08/EdgeGPT/issues/586 but I don't really understand what's the solution

FuseFairy commented 10 months ago

Go to the bing chat website page and you'll see CAPTCHA

GustavRaispits commented 10 months ago

Go to the bing chat website page and you'll see CAPTCHA

Unfortunately I'm not receiving any captcha, I think I'll try to add this script to my bot another time, thanks for the support