I keep getting this error on my discord bot: 'HTTPError [AbortError]: The user aborted a request.'

﹥>﹥吖頭↗ 提交于 2020-06-29 04:11:29

问题


What does this mean, and how do I fix it, I know for a fact my code is correct and nothing is wrong with it, I checked with multiple friends. I have no idea why this is happening and I need my bot to start working soon.


回答1:


This is an error happening within the discord.js library if a web request is stuck for a long time, which might happen due to an outage or bad internet connection. Those connections are killed with that error message to free resources.

Those errors should not be fatal and can be ignored.




回答2:


Expanding flame’s point - put your code in a try catch statement e.g.

try {
//code
} catch (error) {
//error code for example
console.log('an error has occurred')
//if you want no error has occurred log
console.log('')
// ^ will not log anything
}

Alternatively, I’ve researched that it could be something to do with a directory not being referenced properly, so check your code for that.

Hope I helped



来源:https://stackoverflow.com/questions/60889245/i-keep-getting-this-error-on-my-discord-bot-httperror-aborterror-the-user-a

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!