Closed YpnoZ closed 5 years ago
Hello,
I think you have a problem with your config.json
file. You can put its content here for example to check that it is valid. I think it's because of the last comma : this line.
It works ! Thank you very much ^^
This doesn't work :
{ "token": "yourToken", "startCommand": ".", "userAdmin": "yourId", "nsfwChan": "nsfwChanId", "guildID": "guildID", }
But this work :
{ "token": "yourToken", "startCommand": ".", "userAdmin": "yourId", "nsfwChan": "nsfwChanId", "guildID": "guildID"} <-- HERE
Delete , and replace by }
Thank you for helping me ^^ legabiMC
Je galérais à parler anglais mais je viens de voir que vous êtes français x)
Merci de l'aide rapide ^^
En effet, mais ça permet à d'autres de suivre si jamais.
Pas de soucis. ;)
J'ai une autre question ^^' (Pas de rapport avec le sujet mais promis c'est la dernière)
Avez vous un Discord que je pourrais rejoindre pour poser des questions plus facilement, avoir des conseils ou même voir les dernières news du bot ?
Merci d'avance pour votre réponse :) legabiMC
Non pas de Discord pour ça. Les gens me contactent sur Twitter si besoin. Pour les news, faut juste suivre le dépôt Github. Mais il n'est plus très actif.
I wan't to use your code but when I try to start the bot (node src/bot.js because I don't want to use pm2) I have this error :
node src/bot.js
internal/modules/cjs/loader.js:723 throw err; ^
SyntaxError: C:\Users\savelec\Bot-Discord\config\config.json: Unexpected token } in JSON at position 213 at JSON.parse ()
at Object.Module._extensions..json (internal/modules/cjs/loader.js:720:27)
at Module.load (internal/modules/cjs/loader.js:600:32)
at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
at Function.Module._load (internal/modules/cjs/loader.js:531:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object. (C:\Users\savelec\Bot-Discord\src\bot.js:4:16)
at Module._compile (internal/modules/cjs/loader.js:701:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
I search on the net but nothing work :/
I wait your answer :) legabiMC