Error: Expected token to be set for this request, but none was present
I'm not sure why this is happening
20 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!
- ✅
Marked as resolved by OPPlease help me
With this error, it is shown offline on certain shards
![No description](https://cdn.answeroverflow.com/1228581823609569341/image.png)
Bots and shards turn on normally
After about two hours, the shard dies and the error occurs
Use the latest version of djs
Shard disconnected
May I know why this error occurs?
The problem is this error occurs every four hours
The shard doesn't even turn back on normally
yes
94 shards
I changed the hosting and tried it, but it was the same
If I change to djs ShardingManager, can I change the structure to multiple servers?
Yes, checkout the shardList and shardCount options of the sharding manager.
Server specifications are too broad, so what do you deal with discord bots with?
cpu? network?
![No description](https://cdn.answeroverflow.com/1229069744070463508/image.png)
It's not a single server problem
The clustering worked fine, but the error was not resolved
![No description](https://cdn.answeroverflow.com/1229082217632891110/image.png)
Shard #31 isn't the only time you die
![No description](https://cdn.answeroverflow.com/1229083109534728274/image.png)
![No description](https://cdn.answeroverflow.com/1229083109891506228/image.png)
index.js
If it's a debug event, do you mean the API log?
:event: (event) Client#debug
Emitted for general debugging information.
Please add the following code to your code base outside of any other event listeners and provide the full log output relevant to your issue.
- Note: if you initialize your Client as
bot
or other identifiers you need to use these instead of client
- If the output is too long to post consider using a bin instead: gist | paste.gg | sourceb.in | hastebinI'll give it a try.