FuseFairy / DiscordBot-EdgeGPT

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

bing_cookies error #83

Closed Murat1Na closed 1 year ago

Murat1Na commented 1 year ago

I left bot running when someone used it, it gave this error in console. When console open and i stay there commands work good whats this issue pls

2023-05-24 06:25:05 INFO cogs.event -> none#0000 : 'explícame sobre la eucaristia' (・﹕bing-chat) [Style: balanced] 2023-05-24 06:45:23 ERROR discord.app_commands.tree Ignoring exception in command 'bing_cookies' Traceback (most recent call last): File "/home/container/.local/lib/python3.10/site-packages/discord/app_commands/commands.py", line 841, in _do_call return await self._callback(self.binding, interaction, **params) # type: ignore File "/home/container/cogs/edgegpt.py", line 98, in cookies_setting del users_chatbot[interaction.user.id] KeyError: 216788662480928768

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

Traceback (most recent call last): File "/home/container/.local/lib/python3.10/site-packages/discord/app_commands/tree.py", line 1248, in _call await command._invoke_with_namespace(interaction, namespace) File "/home/container/.local/lib/python3.10/site-packages/discord/app_commands/commands.py", line 867, in _invoke_with_namespace return await self._do_call(interaction, transformed_values) File "/home/container/.local/lib/python3.10/site-packages/discord/app_commands/commands.py", line 860, in _do_call raise CommandInvokeError(self, e) from e discord.app_commands.errors.CommandInvokeError: Command 'bing_cookies' raised an exception: KeyError: 216788662480928768

FuseFairy commented 1 year ago

That because he didn't set cookies first, then he use delete command, but his cookies is not exist, so you will see the error in console. I will fix it later

Murat1Na commented 1 year ago

Thank you:)