moonstar-x / discord-tts-bot

A Text-to-Speech bot for Discord.
https://docs.moonstar-x.dev/discord-tts-bot
MIT License
98 stars 84 forks source link

bot not starting #81

Closed GarraBlanca2003 closed 2 years ago

GarraBlanca2003 commented 2 years ago

:bug: the bot not starting

i copy paste the bot token in the settings.json and gives this error /discord-tts-bot/node_modules/discord.js/src/client/Client.js:237 if (!token || typeof token !== 'string') throw new Error('TOKEN_INVALID'); ^

Error [TOKEN_INVALID]: An invalid token was provided. at TTSClient.login (/discord-tts-bot/node_modules/discord.js/src/client/Client.js:237:52) at Object. (/discord-tts-bot/src/app.js:168:8) at Module._compile (node:internal/modules/cjs/loader:1105:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10) at Module.load (node:internal/modules/cjs/loader:981:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12) at node:internal/main/run_main_module:17:47 {

}

moonstar-x commented 2 years ago

Do you have a settings.json file inside the config folder with your bot's token?

moonstar-x commented 2 years ago

Do you have a settings.json file inside the config folder with your bot's token?

Sorry I didn't see your message above entirely.

Make sure that:

  1. The config file name is settings.json and not settings.json.example.
  2. Make sure your bot token is actually valid, maybe regenerate a new one in the application page. Make sure you're using the token and not the client ID.
GarraBlanca2003 commented 2 years ago

i had a version of node to new 16.10 downgraded node fixed the depencies ,now working thanks!