Erreur discord.js

Fermé
Neutrino3500 Messages postés 72 Date d'inscription lundi 11 novembre 2019 Statut Membre Dernière intervention 25 juillet 2020 - 17 juil. 2020 à 18:55
 LeKermit - 24 juil. 2020 à 17:40
Bonjour,
Voici mon code:
const Discord = require('discord.js')
const client = new Discord.Client()
client.login('id')


Voici mon erreur:

(node:2980) UnhandledPromiseRejectionWarning: FetchError: request to https://discordapp.com/api/v7/gateway/bot failed, reason: unable to verify the first certificate
at RequestHandler.execute (C:\Users\julie\Documents\$Downloads\dbt\node_modules\discord.js\src\rest\RequestHandler.js:107:21)
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:2980) 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)
(node:2980) [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.

Qu'est ce qui ne va pas ?
Merci d'avance.

1 réponse

Tu ne dois pas mettre l'id du bot mais le token
https://mtxserv.com/forums/threads/creation-dun-bot-discord-creer-une-application-lui-ajouter-des-permissions.53558/
0