Comments (8)
Ok, from inspecting it means that fetching the reply failed and since there was no try catch, it errored and stuck your code.
For now you should try catch to avoid making your discord bot. Sorry for the incovenience.
from node_characterai.
Wait, just wondering... Is it because of the Guest mode?
from node_characterai.
Hello, can you tell me what is in
at Chat.sendAndAwaitResponse (D:\node_modules\node_characterai\chat.js:71:41)
from node_characterai.
I have the exact same problem. Authenticating with token.
This is in chat.js:71:41
for (let i = 0; i < replies.length; i++) {
When attaching the debugger it says that the response was 'Server Error (500)'
from node_characterai.
I have tried direct redirect to the code (using VS Code) but it didn't seem to work. Will let you know after checking it out.
from node_characterai.
Yep, as @Hexioum said, the code in chat.js:71:41 is-
for (let i = 0; i < replies.length; i++) {
messages.push(new Reply(this, response));
}
Just to let you know, the error happened to me when I tried using authenticate as Guest. It didn't occur ever since I changed to token method.
from node_characterai.
replies
is clearly undefined. Hence the error - "cannot read property "length" of undefined". What is happening here is the code is running, expecting the AI to generate a response, but runs anyway even know it hasn't responded yet. So here is what I think happened:
- You're sending too many messages and the AI stops (because of using guest authentication)
- The
for
loop must wait until the AI generates a full response (with Promises/await)
from node_characterai.
This issue seems to already be fixed though :)
So this issue can be closed
from node_characterai.
Related Issues (20)
- Support for typescript? HOT 4
- WSL + Puppeteer HOT 3
- Authentication hanging bug HOT 40
- "bad string" error when using sendAndAwaitResponse() right after startup HOT 38
- It never authenticate HOT 3
- stuck? HOT 1
- Messing around with that waifu thing, ERROR: The process "27224" not found. Cannot read properties of undefined (reading 'find') node HOT 17
- Using the module in Next js HOT 3
- Current implemented fixes HOT 11
- stuck at "Puppeteer - Done with setup". already tried some workarounds, still doesnt work HOT 12
- How to implement node_characterai code to WhatsApp-Web-JS HOT 1
- authenticateWithToken() hangs at the main character.ai website HOT 36
- Ability to retrieve TTS? HOT 11
- Warning: the specified Chromium path for puppeteer could not be located. HOT 6
- Error: Request is already handled! HOT 3
- Requests return 301 when using plus - Requests fail when using with NW.js/Electron HOT 9
- how to make output to json
- How To Fix ? HOT 4
- What is the maximum allowable amount of bots I can upload at once? HOT 7
- Very slow HOT 6
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 node_characterai.