Comments (11)
Done.
from bard-discord-bot.
I suspect it might be related to the formatting used on text in the chat prompt - notice the "queen - obscene" part.
I was able to get it to fail with "/chat what about this?"
from bard-discord-bot.
Interestingly an asterisk works as a math operator like with "/chat what is 4 * 2?" but does not when you use a pair of them to format the text between them.
from bard-discord-bot.
Can you paste the text that you are inputting here?
from bard-discord-bot.
I did in my example "/chat what about this?" but this interface is also applying the style so you can't see it. The word "this" is surrounded by asterisks in my example.
from bard-discord-bot.
from bard-discord-bot.
After the latest git pull it is now working for me as well.
from bard-discord-bot.
I just got this exception again. I have no clue what might be causing it.
[2023-05-18 21:47:03] [ERROR ] discord.app_commands.tree: Ignoring exception in command 'chat'
Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\discord\app_commands\commands.py", line 842, in _do_call
return await self._callback(interaction, **params) # type: ignore
File "C:\Bard-Discord-bot\main.py", line 148, in chat
await interaction.channel.send(chunk)
File "C:\Users\Administrator\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\discord\abc.py", line 1561, in send
data = await state.http.send_message(channel.id, params=params)
File "C:\Users\Administrator\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\discord\http.py", line 744, in request
raise HTTPException(response, data)
discord.errors.HTTPException: 400 Bad Request (error code: 50006): Cannot send an empty message
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\discord\app_commands\tree.py", line 1248, in _call
await command._invoke_with_namespace(interaction, namespace)
File "C:\Users\Administrator\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\discord\app_commands\commands.py", line 867, in _invoke_with_namespace
return await self._do_call(interaction, transformed_values)
File "C:\Users\Administrator\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\discord\app_commands\commands.py", line 860, in _do_call
raise CommandInvokeError(self, e) from e
discord.app_commands.errors.CommandInvokeError: Command 'chat' raised an exception: HTTPException: 400 Bad Request (error code: 50006): Cannot send an empty message
from bard-discord-bot.
The user above reposted the same /chat as in the screenshot afterwards, and it worked that time. I cannot pin down any reason why it is intermittent like that.
The only people who were trying this at this time were myself and one other (and not simultaneously), so I do not think that concurrency is the issue.
Right after it worked again, it then failed twice and worked the 3rd time after a reset. The reset may have helped but am not confident of that. This may well be an issue with the projects this is based on and nothing you can do about that part, other than perhaps some error handling to display a graceful message when the call fails.
from bard-discord-bot.
This is most likely an issue with the reversed Bard API that the bot uses.
from bard-discord-bot.
I agree - perhaps could put a generic error similar to the other one, when the call fails?
from bard-discord-bot.
Related Issues (20)
- Error when launching bot that indicates a privileged intent is being requested that was not enabled - I have enabled "message content" intent in discord developer portal HOT 1
- Exception while using /chat HOT 4
- use the example code from README result >>> chatbot = Chatbot(token) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/ubuntu/test/venv/lib/python3.11/site-packages/Bard.py", line 63, in __init__ self.async_chatbot = self.loop.run_until_complete( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete return future.result() ^^^^^^^^^^^^^^^ File "/home/ubuntu/test/venv/lib/python3.11/site-packages/Bard.py", line 143, in create instance.SNlM0e = await instance.__get_snlm0e() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/ubuntu/test/venv/lib/python3.11/site-packages/Bard.py", line 196, in __get_snlm0e raise Exception( Exception: Response code not 200. Response Status is 302 HOT 2
- Bot keeps responding with images even though using command to change it to no images HOT 1
- couldn't generate a response HOT 8
- error while starting the bot HOT 1
- No Responses HOT 1
- Help no response HOT 3
- RuntimeWarning: coroutine 'AsyncChatbot.create' was never awaited HOT 1
- /help command issue HOT 1
- Bard not responding HOT 2
- /reset command throwing exception and failing to complete HOT 2
- Bot not starting (AttributeError: 'Bot' object has no attribute 'tree')
- /reset command does not seem to always reset context HOT 16
- Exception when using /chat command HOT 3
- Request to save state (whether /private is on or not) so that it persists if the bot gets restarted
- Request to be able to restrict commands like /public, /private, /toggledm, /toggleactive, /togglechannel to a list of userids and/or roleids HOT 2
- Returned message format HOT 1
- Remove the bot token! HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bard-discord-bot.