Giter Club home page Giter Club logo

discordbot-edgegpt's Introduction

GitHub stats

discordbot-edgegpt's People

Contributors

fusefairy avatar hello-navi avatar nqngo avatar zaazu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

discordbot-edgegpt's Issues

Mention Channel Error

When you put channel id in .env, the bot reply every single message even without mentioning
like i talk with friends in another channel normally the bot reply with that
Replying with: Can only be mentioned at .....

Discord dividing long messages

Hi, the app is working fine. However long outputs seems to be suddenly divided into multiple messages (See attached picture).

Is it possible to make it all output in single message?

EdgeGPT_Err

Suggestion (not a bug)

  1. Could you make it so that when we reply to its message, it could reply us back with suitable response (without using "/"commands. just replying to what she might have previously answered)

  2. Also, please make it so that whenever it gets the Sydney token error, it automatically resets conversation and retries with the given query.

  3. Also, mentioning the bot doesn't do anything. (I thought it will give option to change its style)

Error

[2023-03-23 17:49:41] [INFO ] discord.client: logging in using static token
[2023-03-23 17:49:43] [INFO ] discord.gateway: Shard ID None has connected to Gateway (Session ID: a0935931e1e2a1ed3a1d25fb82a08ca4).
�[30;1m2023-03-23 17:49:45�[0m �[34;1mINFO �[0m �[35m__main__�[0m -> Bing#5232 is now running!
[2023-03-23 17:49:45] [ERROR ] discord.client: Ignoring exception in on_ready
Traceback (most recent call last):
File "C:\Users\Dzhizus\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ext\commands\bot.py", line 934, in _load_from_module_spec
spec.loader.exec_module(lib) # type: ignore
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "D:\Рабочий стол\DiscordBot-EdgeGPT-main\cogs\edgegpt.py", line 7, in
from src.response import send_message
File "D:\Рабочий стол\DiscordBot-EdgeGPT-main\src\response.py", line 7, in
from config.load_config import config
ModuleNotFoundError: No module named 'config.load_config'

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

Traceback (most recent call last):
File "C:\Users\Dzhizus\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\client.py", line 409, in _run_event
await coro(*args, **kwargs)
File "D:\Рабочий стол\DiscordBot-EdgeGPT-main\bot.py", line 38, in on_ready
await bot.load_extension(f'cogs.{Filename[:-3]}')
File "C:\Users\Dzhizus\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ext\commands\bot.py", line 1012, in load_extension
await self._load_from_module_spec(spec, name)
File "C:\Users\Dzhizus\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ext\commands\bot.py", line 937, in _load_from_module_spec
raise errors.ExtensionFailed(key, e) from e
discord.ext.commands.errors.ExtensionFailed: Extension 'cogs.edgegpt' raised an error: ModuleNotFoundError: No module named 'config.load_config'

New ideas

Hi! I have some cool ideas for your amazing bot!

Bing has a "surprise me" button, which is really cool! You could make a /surprise command as well.

Also, I would really like to see a "regenerate" button after an image generates.

These are just recommendations, so if you don't have time or you don't want to make these, it's all right :D.

'conversationSignature' error

Exception has occurred: KeyError
'conversationSignature'
File "C:\Users\VovaLT\Downloads\DiscordBot-EdgeGPT-main\cogs\event.py", line 27, in
chatbot = Chatbot(cookies=cookies)
^^^^^^^^^^^^^^^^
File "C:\Users\VovaLT\Downloads\DiscordBot-EdgeGPT-main\bot.py", line 8, in
from cogs.event import set_chatbot
KeyError: 'conversationSignature'

Getting some error. Updated cookies few times, used vpn - nothing helped.

[Feature Request] user = own chat

I wish there was a setting that would create a separate chat for each user, so that the conversations would not get mixed up in one chat. For instance, if I asked what if Corvette C8 was an SUV and then asked what question I asked, it should reply that I asked if Corvette C8 was an SUV. But if another Discord user asked about the question that was asked, it should start a new chat with them, while remembering the old chat with me.

Suggestion

I dont know if its easy or hard tbh, i'll just suggest it and up to you

Make option to user to choose setting his own cookies as user set or server set (maybe just owner or everyone up to you)
Like user set, will let user talk from the cookies he set
Server set, will let everyone in server talk from the cookies he set

Can I change the timeout limit somehow?

Bing Image Creator has now a limit of how many times it can generate images quickly. After that, it will take much longer to generate an image, and the bot always says "Timeout". Can I change the timeout limit?

Response Error

2023-05-15 22:47:05 ERROR src.response -> Error while sending message: Throttled: Request is throttled.
Traceback (most recent call last):
File "/home/container/src/response.py", line 63, in send_message
reply = await chatbot.ask(prompt=user_message, conversation_style=ConversationStyle.balanced, wss_link="wss://sydney.bing.com/sydney/ChatHub")
File "/home/container/.local/lib/python3.10/site-packages/EdgeGPT.py", line 644, in ask
async for final, response in self.chat_hub.ask_stream(
File "/home/container/.local/lib/python3.10/site-packages/EdgeGPT.py", line 548, in ask_stream
raise Exception(f"{response['item']['result']['value']}: {response['item']['result']['message']}")
Exception: Throttled: Request is throttled.

Cookie Upload

Good day, the bot works fine for me this is more of a question in the previous version of the bot a user could of upload a cookie and it could be used by everyone on the server using that single cookie. Now it only works on individual cookies per person. Is there a way I an allow my cookie to just be the default so anyone can use it, as it just a small server I have among friends.

ERROR WHILE RUN

File "bot.py", line 68, in
bot.run(os.getenv("DISCORD_BOT_TOKEN"))
File "/usr/local/lib/python3.8/dist-packages/discord/client.py", line 828, in run
asyncio.run(runner())
File "/usr/lib/python3.8/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
return future.result()
File "/usr/local/lib/python3.8/dist-packages/discord/client.py", line 817, in runner
await self.start(token, reconnect=reconnect)
File "/usr/local/lib/python3.8/dist-packages/discord/client.py", line 746, in start
await self.connect(reconnect=reconnect)
File "/usr/local/lib/python3.8/dist-packages/discord/client.py", line 672, in connect
raise PrivilegedIntentsRequired(exc.shard_id) from None
discord.errors.PrivilegedIntentsRequired: Shard ID None is requesting privileged intents that have not been explicitly enabled in the developer portal. It is recommended to go to https://discord.com/developers/applications/ and explicitly enable the privileged intents within your application's page. If this is not possible, then consider disabling the privileged intents instead.

Privileged Gateway Intents

Hello, can you explain why the bot needs these 2 gateways intents pls, I don't see any future in the bot needs them both, just message content the bot needs it yes.
Server Members Intent, Presence Intent, when i turn any of them off the bot doesn't work, so can you tell me which commands that use these 2 pls

Server Members Intent
This intent allows your bot to see the list of members in a Discord server. This is necessary for many bot features, such as moderation, role management, and user management.
,
Presence Intent
This intent allows your bot to see the online status of users in Discord servers. This is necessary for many bot features, such as chat bots, notifications, and game integrations.

help wanted

When running bot.ry locally, the console gives an error.
And in the discord, the bot does not respond to commands.

[2023-04-06 19:52:36] [INFO ] discord.client: logging in using static token
[2023-04-06 19:52:38] [INFO ] discord.gateway: Shard ID None has connected to Gateway (Session ID: 366a9bbd117e1689e53b565c8842990d).
←[30;1m2023-04-06 19:52:40←[0m ←[34;1mINFO ←[0m ←[35m__main__←[0m -> GPT5#0426 is now running!
[2023-04-06 19:52:41] [ERROR ] discord.client: Ignoring exception in on_ready
Traceback (most recent call last):
File "C:\Users\Lenovo\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ext\commands\bot.py", line 935, in _load_from_module_spec
spec.loader.exec_module(lib) # type: ignore
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "C:\Users\Lenovo\Desktop\DiscordBot-EdgeGPT-main\cogs\edgegpt.py", line 10, in
chatbot = Chatbot("./cookies.json")
File "C:\Users\Lenovo\AppData\Local\Programs\Python\Python310\lib\site-packages\EdgeGPT.py", line 341, in init
self.chat_hub: ChatHub = ChatHub(
File "C:\Users\Lenovo\AppData\Local\Programs\Python\Python310\lib\site-packages\EdgeGPT.py", line 269, in init
conversation_signature=conversation.struct["conversationSignature"],
KeyError: 'conversationSignature'

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

Traceback (most recent call last):
File "C:\Users\Lenovo\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\client.py", line 441, in _run_event
await coro(*args, **kwargs)
File "C:\Users\Lenovo\Desktop\DiscordBot-EdgeGPT-main\bot.py", line 38, in on_ready
await bot.load_extension(f'cogs.{Filename[:-3]}')
File "C:\Users\Lenovo\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ext\commands\bot.py", line 1013, in load_extension
await self._load_from_module_spec(spec, name)
File "C:\Users\Lenovo\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\ext\commands\bot.py", line 938, in _load_from_module_spec
raise errors.ExtensionFailed(key, e) from e
discord.ext.commands.errors.ExtensionFailed: Extension 'cogs.edgegpt' raised an error: KeyError: 'conversationSignature'

Screenshot:
image

New Future

As there is daily limitation in bing, Is it possible to make future like users add there cookies to use the bot, like that will let everyone use the bot, now 1 user can finish daily of bing

Question

It is personal help yes but i hope you do not mind helping me with this, I want to remove logs, and turn off MESSAGE CONTENT INTENT,
Is there any way to do this ?

Invalid Form Body

I get the error Invalid Form Body In name: Username cannot contain "discord" when I use the /bing command.

Traceback (most recent call last):
File "Python\Python311\site-packages\discord\app_commands\tree.py", line 1248, in _call
await command._invoke_with_namespace(interaction, namespace)
File "Python\Python311\site-packages\discord\app_commands\commands.py", line 867, in _invoke_with_namespace
return await self._do_call(interaction, transformed_values)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "Python\Python311\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' raised an exception: HTTPException: 400 Bad Request (error code: 50035): Invalid Form Body
In name: Username cannot contain "discord"
[2023-05-05 16:18:26] [ERROR ] discord.app_commands.tree: Ignoring exception in command 'bing'
Traceback (most recent call last):
File "Python\Python311\site-packages\discord\app_commands\commands.py", line 841, in _do_call
return await self.callback(self.binding, interaction, **params) # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\Downloads\DiscordBot-EdgeGPT-main\DiscordBot-EdgeGPT-main\cogs\edgegpt.py", line 34, in bing
await interaction.response.defer(ephemeral=False, thinking=True)
File "Python\Python311\site-packages\discord\interactions.py", line 638, in defer
await adapter.create_interaction_response(
File "Python\Python311\site-packages\discord\webhook\async
.py", line 221, in request
raise HTTPException(response, data)
discord.errors.HTTPException: 400 Bad Request (error code: 50035): Invalid Form Body
In name: Username cannot contain "discord"

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

Traceback (most recent call last):
File "Python\Python311\site-packages\discord\app_commands\tree.py", line 1248, in _call
await command._invoke_with_namespace(interaction, namespace)
File "Python\Python311\site-packages\discord\app_commands\commands.py", line 867, in _invoke_with_namespace
return await self._do_call(interaction, transformed_values)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "Python\Python311\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' raised an exception: HTTPException: 400 Bad Request (error code: 50035): Invalid Form Body
In name: Username cannot contain "discord"

`

BardGPT

EdgeGPT is fantastic! I was hoping you could make a BardGPT version of your bot.

ie; https://github.com/armintum/Bard-Discord-bot

It currently connects through __Secure-1PSID

The functions of your EdgeGPT bot being able to upload cookies per user and how it functions is amazing. It would be good to have the same for Bard. Bard tends to display tables a lot. One thing I've noticed when using any GPT AI through discord is the tables don't carry through. I'm not sure if its possible for them to carry through to Discord properly.

Anyway, I digress. Happy to sponsor.

Same cookies file after restart

Is there a way to prevent uploading the same cookies.json file after restart? I would restart the bot quite often, but that means that every time I restart the bot, everybody who want's to use slash command has to upload the cookies.json file again.

Image Generation (Error: Redirect failed)

Hello, i've just installed a bot, it's running locally on my machine.
On every image generation attempt bot sends me "Error: Redirect failed" message (tried both /create_image and /bing). I've tried to update cookies, but that didn't solve the issue.
Tell me if you need logs, I'll send them here.

Suggestions text issue

Hey the bot is great, there is an issue with suggestions text down after each chat with the bot, try to choose any suggest form the 3 suggestions, it will always choose the last one, like you press on first one it will reply as its the third suggestion.

Problem starting the bot

So I ran pip install -r requirements.txt, renamed .env.dev to .env and filled out DISCORD_BOT_TOKEN, and pasted my cookies into cookies.json but somehow it's still complaining that EdgeGPT module is missing?
image

I can even see it under ib site-packages and I set the PATH variable to point to site-packages already too
image

Getting "The application did not respond"

Using Python 3.8 and 3.11 (on separate machines). Every installed correctly and the bot is showing running,

Bot is Up and Ready!
Synced 2 commands 

But when I use /chat command, it only returns 'The application did not respond'.


Got it working. It wasn't /chat (message) but /bing (message) command that worked for me.

Links coming through to discord incorrect

Thank you for your hard work! I have noticed a bug with the links as they are delivered to discord.

When bing chat is giving multiple links suggestions on its web chat, it puts a number next to it. These are making the links open incorrectly when clicked though Discord.

Example pictures attached:
image
image2

Thank you

New features

The bot so nice and there is 2 features will make it even better

*Targeting channel like let server owner setup channel for replyall messsages.
*Make suggest text for the create_image too like the website when you create image there is suggest like add hat, glasses etc...

Use the cookies that were uploaded by the author.

Hi! How can I make that the default option, that when I use the slash commands, it will automaticly use the cookies that were uploaded by the author? I don't want to make everyone use the /bing_setting set command.

Automatic reset

Hi! When I use the /bing command, it mostly returns the UnauthorizedRequest error. When this happens, I have to do the /reset command. I was just wondering if it would be possible that the bot automaticly resets if this error occures, and after that it sends the request again to Bing (without sending the error in Discord, just the answer, and nobody knows that in the background it did a reset). This would be super helpful, but if this is impossible or you don't have the time for this, than I can understand that.

When I try using /bing, it gives an error

When I try using /bing, it gives an error like this in the console:

ERROR    src.response -> Error while sending message: 200, message='Invalid response status', url=URL('wss://sydney.bing.com/sydney/ChatHub')
Traceback (most recent call last):
  File "/home/container/src/response.py", line 61, in send_message
    reply = await chatbot.ask(prompt=user_message, conversation_style=ConversationStyle.balanced)
  File "/home/container/.local/lib/python3.10/site-packages/EdgeGPT.py", line 652, in ask
    async for final, response in self.chat_hub.ask_stream(
  File "/home/container/.local/lib/python3.10/site-packages/EdgeGPT.py", line 458, in ask_stream
    self.wss = await self.session.ws_connect(
  File "/home/container/.local/lib/python3.10/site-packages/aiohttp/client.py", line 795, in _ws_connect
    raise WSServerHandshakeError(
aiohttp.client_exceptions.WSServerHandshakeError: 200, message='Invalid response status', url=URL('wss://sydney.bing.com/sydney/ChatHub')

What can I do?

Not Working Properly

Using /bing message: hi:
2023-11-15 19:12:22 ERROR src.response -> Error while sending message: CaptchaChallenge: User needs to solve CAPTCHA to continue.

/create_image prompt: A 3D text logo saying "MAR":
2023-11-15 19:10:13 ERROR src.image_create -> Error while create image: No auth cookie provided
Even tho the cookies are present in the cookies.jSON

Used /bing_setting choice: set
INFO: Chatbot set successful! (using bot owner cookies)

problem with the bot

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/websockets/legacy/client.py", line 655, in await_impl_timeout
return await self.await_impl()
File "/usr/local/lib/python3.10/dist-packages/websockets/legacy/client.py", line 676, in await_impl
await protocol.wait_closed()
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/DiscordBot-EdgeGPT/cogs/event.py", line 120, in send_message
reply = await chatbot.ask(prompt=user_message, conversation_style=ConversationStyle.balanced, simplify_response=True)
File "/usr/local/lib/python3.10/dist-packages/EdgeGPT/EdgeGPT.py", line 116, in ask
async for final, response in self.chat_hub.ask_stream(
File "/usr/local/lib/python3.10/dist-packages/EdgeGPT/chathub.py", line 102, in ask_stream
async with connect(
File "/usr/local/lib/python3.10/dist-packages/websockets/legacy/client.py", line 637, in aenter
return await self
File "/usr/local/lib/python3.10/dist-packages/websockets/legacy/client.py", line 654, in await_impl_timeout
async with asyncio_timeout(self.open_timeout):
File "/usr/local/lib/python3.10/dist-packages/websockets/legacy/async_timeout.py", line 169, in aexit
self._do_exit(exc_type)
File "/usr/local/lib/python3.10/dist-packages/websockets/legacy/async_timeout.py", line 252, in _do_exit
raise asyncio.TimeoutError
asyncio.exceptions.TimeoutError

Big problem

Hello! I have this trace when I start up, but everything is installed according to the instructions. What can it be? ==== RESTART: C:\Users\1111\Desktop\DiscordBot-EdgeGPT-main\bot.py ====
Traceback (most recent call last):
File "C:\Users\1111\Desktop\DiscordBot-EdgeGPT-main\bot.py", line 1, in
import discord
ModuleNotFoundError: No module named 'discord'

Rate Limits

how to fix and avoid this error pls
raise HTTPException(response, data)
discord.errors.HTTPException: 429 Too Many Requests (error code: 0): You are being blocked from accessing our API temporarily due to exceeding our rate limits frequently. Please read our docs at https://discord.com/developers/docs/topics/rate-limits to prevent this moving forward.

Error when starting the bot

The bot stopped working. This is the error:

Exception has occurred: KeyError
'conversationSignature'
File "C:\Users\hero\Fontos\DiscordBot-EdgeGPT-main\cogs\event.py", line 27, in
chatbot = Chatbot(cookies=cookies)
^^^^^^^^^^^^^^^^
File "C:\Users\hero\Fontos\DiscordBot-EdgeGPT-main\bot.py", line 8, in
from cogs.event import set_chatbot
KeyError: 'conversationSignature'

What should I do?

ERROR src.imageCreate -> Error while create image: Redirect failed

I give this error in terminal, when i want to a generate a image:

Traceback (most recent call last):
File "/home/pi/BING/src/imageCreate.py", line 20, in create_image
images = await image_generator.get_images(prompt)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/pi/.local/lib/python3.11/site-packages/BingImageCreator.py", line 312, in get_images
raise Exception("Redirect failed")
Exception: Redirect failed

"/create_image" doesn't work

` [BingImageCreator]
ERROR: <bound method ClientResponse.text of <ClientResponse(https://www.bing.com/images/create?q=a%20cat%20drawind%20a%20landscape%20of%20green%20mountains&rt=3&FORM=GENCRE) [200 OK]>
<CIMultiDictProxy('Content-Length': '41111', 'Content-Type': 'text/html; charset=utf-8', 'Cache-Control': 'no-cache, no-store, must-revalidate', 'Content-Encoding': 'gzip', 'Expires': '-1', 'Pragma': 'no-cache', 'Vary': 'Accept-Encoding', 'UserAgentReductionOptOut': 'A7kgTC5xdZ2WIVGZEfb1hUoNuvjzOZX3VIV/BA6C18kQOOF50Q0D3oWoAm49k3BQImkujKILc7JmPysWk3CSjwUAAACMeyJvcmlnaW4iOiJodHRwczovL3d3dy5iaW5nLmNvbTo0NDMiLCJmZWF0dXJlIjoiU2VuZEZ1bGxVc2VyQWdlbnRBZnRlclJlZHVjdGlvbiIsImV4cGlyeSI6MTY4NDg4NjM5OSwiaXNTdWJkb21haW4iOnRydWUsImlzVGhpcmRQYXJ0eSI6dHJ1ZX0=', 'Content-Security-Policy-Report-Only': "script-src https: 'strict-dynamic' 'report-sample' 'nonce-L6U+wCzYpxT+nQmbcSXHCgeIawuWHTOUkATQhqWKMXU='; base-uri 'self';report-to csp-endpoint", 'Report-To': '{"group":"csp-endpoint","max_age":86400,"endpoints":[{"url":"https://aefd.nelreports.net/api/report?cat=bingcsp"}]}', 'P3P': 'CP="NON UNI COM NAV STA LOC CURa DEVa PSAa PSDa OUR IND"', 'Date': 'Sat, 08 Apr 2023 21:54:18 GMT', 'Connection': 'keep-alive', 'Set-Cookie': 'GI_FRE_COOKIE=gi_prompt=2; domain=.bing.com; path=/; secure; SameSite=None', 'Alt-Svc': 'h3=":443"; ma=93600', 'X-CDN-TraceID': '0.76b91302.1680990858.5c91ab86')>

←[30;1m2023-04-09 00:54:19←[0m ←[31mERROR ←[0m ←[35msrc.imageCreate←[0m -> Error while create image: Redirect failed
←[31mTraceback (most recent call last):
File "C:\Users\user\Bot\DiscordBot-EdgeGPT-main\src\imageCreate.py", line 25, in create_image
images = await image_generator.get_images(prompt)
File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\BingImageCreator.py", line 237, in get_images
raise Exception("Redirect failed")
Exception: Redirect failed←[0m`

Cookies File Doesn't Work

I Copy Cookie Information From bing.com with Chrome And I Save It Cookies File But I Try To Recopy It a Couple Of Times It's Still Doesn't Work It's Giving Me This Error I Don't Know What Should I Do But I Think The Error Related To The Cookies File Itself And The Error Message Is Here:

Traceback (most recent call last):
File "C:\Users^w^ Loona ^w^\Desktop\DiscordBot-EdgeGPT-main\bot.py", line 8, in
from cogs.event import set_chatbot
File "C:\Users^w^ Loona ^w^\Desktop\DiscordBot-EdgeGPT-main\cogs\event.py", line 26, in
cookies = json.load(file)
^^^^^^^^^^^^^^^
File "C:\Users^w^ Loona ^w^\AppData\Local\Programs\Python\Python311\Lib\json_init_.py", line 293, in load
return loads(fp.read(),
^^^^^^^^^^^^^^^^
File "C:\Users^w^ Loona ^w^\AppData\Local\Programs\Python\Python311\Lib\json_init_.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users^w^ Loona ^w^\AppData\Local\Programs\Python\Python311\Lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users^w^ Loona ^w^\AppData\Local\Programs\Python\Python311\Lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

pycharm64_4Eaw8JZZZb

Discloud hosting, problem with image generator and URL.

Not really related to the actual code because it's working pretty well locally on my PC. However, for some odd reason, when I'm using a free hosting service called "Discloud," it gives me an error when trying to generate an image:

Error: 400 Bad Request (error code: 50035): Invalid Form Body
In embeds.0.image.url: Not a well-formed URL.

I have tried to fix it myself, but nothing has helped. I suspect it is something with their hosting. Is it possible to somehow bypass this issue, or should I contact their support?

Wrong button

When I press the first or second suggested response button, it always thinks I pressed the third button instead.

Help command

Can you make help command pls, Its better if it will be as Embed ,It will look better as normal command, thanks:)

bing_cookies error

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

[Feature Request] Clickable source links

The source links look pretty ugly and take up a lot of space, with both the titles and the bare URLs in the code block. Is it possible to make them clickable links that just show the title and source number? Using embeds.

Cant start bot.py

leexh@DESKTOP-VK4N2SO:~/DiscordBot-EdgeGPT$ python3 bot.py
2023-03-27 21:35:57 INFO discord.client logging in using static token
Traceback (most recent call last):
File "/home/leexh/DiscordBot-EdgeGPT/bot.py", line 68, in
bot.run(os.getenv("DISCORD_BOT_TOKEN"))
File "/home/leexh/.local/lib/python3.10/site-packages/discord/client.py", line 860, in run
asyncio.run(runner())
File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/lib/python3.10/asyncio/base_events.py", line 646, in run_until_complete
return future.result()
File "/home/leexh/.local/lib/python3.10/site-packages/discord/client.py", line 849, in runner
await self.start(token, reconnect=reconnect)
File "/home/leexh/.local/lib/python3.10/site-packages/discord/client.py", line 777, in start
await self.login(token)
File "/home/leexh/.local/lib/python3.10/site-packages/discord/client.py", line 609, in login
raise TypeError(f'expected token to be a str, received {token.class.name} instead')
TypeError: expected token to be a str, received NoneType instead

Clickable URLS

Thank you for fixing the broken URL links displayed in Discord chat. It works and functions a lot better now.

Is it possible for the URLS Bing provides in it's answers to carry through to discord as clickable links or will that break it?

For example:

image

image

Thanks again! You're amazing

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.