简体   繁体   English

尝试启动Discord机器人时出现“错误:无法验证第一个证书”

[英]'Error: unable to verify the first certificate' when trying to start discord bot

I've encountered an error when setting up a discord bot using Visual Studio Code & Node. 使用Visual Studio Code&Node设置Discord bot时遇到错误。
This is the code that makes the bot go online: 这是使机器人联机的代码:

const Discord = require('discord.js');
const bot = new Discord.Client();
bot.login('[the token i recieved for my bot]');

The error I get from running this is: 我从运行此得到的错误是:

(node:7064) UnhandledPromiseRejectionWarning: Error: unable to verify the first certificate    warning.js:18
 at TLSSocket.onConnectSecure (_tls_wrap.js:1049:34)
 at TLSSocket.emit (events.js:182:13)
 at TLSSocket._finishInit (_tls_wrap.js:631:8)
(node:7064) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either 
 by throwing inside of an async function without a catch block, or by rejecting a promise which was not
 handled with .catch(). (rejection id: 2)    warning.js:18
(node:7064) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future,
 promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.    warning.js:18

Can anyone help me debug this or not get this error? 谁能帮助我调试此错误或无法得到此错误?

I was not able to reproduce your error, using the exact same setup. 使用完全相同的设置,我无法重现您的错误。

discord.js: v11.4.2 and Visual Studio Code: v1.28.2 discord.js: v11.4.2Visual Studio Code: v1.28.2

If you still experience this issue, maybe this can help you . 如果您仍然遇到此问题, 也许可以为您提供帮助

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用命令提示符启动离子时无法验证第一个证书 - Unable to verify the first certificate when ionic start using command prompt 节点:错误:尝试访问 ASP.NET 核心应用程序时无法验证第一个证书 - Node: Error: unable to verify the first certificate when trying to reach ASP.NET Core app 请求,错误:无法验证第一个证书 - Request, Error: unable to verify the first certificate 错误:无法验证nodejs中的第一个证书 - Error: unable to verify the first certificate in nodejs 错误:无法验证 Nestjs 中的第一个证书 - Error: unable to verify the first certificate in Nestjs 无法验证第一个证书 - Unable to verify the first certificate SwagQL - 无法验证第一个证书 - SwagQL - Unable to verify the first certificate 无服务器:发生可恢复错误(无法验证第一个证书), - Serverless: Recoverable error occurred (unable to verify the first certificate), 错误:无法验证nodejs中的第一个证书azure队列存储createMessage - Error: unable to verify the first certificate in nodejs azure queue storage createMessage Node-RED和nodemailer - 错误:无法验证第一个证书 - Node-RED and nodemailer - Error: unable to verify the first certificate
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM