galnir / Master-Bot

A Discord music bot and dashboard with slash commands, playlist support, Spotify, music quiz, saved playlists, lyrics, gifs and more
MIT License
464 stars 373 forks source link

Invalid enviroment Variables on startup #777

Closed DraTrav closed 1 year ago

DraTrav commented 1 year ago

Describe the bug on startup the bot fails to load the config and prevents the bot from working at all

To Reproduce 1.Start the bot

  1. Get error

Screenshots If applicable, add screenshots to help explain your problem.

image

Desktop (please complete the following information):

Bacon-Fixation commented 1 year ago

Howdy @DraTrav,

double check and make sure "$" character is not used as a value for variables in the .env

Edit: I missed the bottom of the error NEXT_PUBLIC_INVITE_URL is missing or invalid in the .env file, you can add

NEXT_PUBLIC_INVITE_URL="https://discord.com/api/oauth2/authorize?client_id=yourclientid&permissions=8&scope=bot" 

and replace the text yourclientid in the url with your DISCORD_CLIENT_ID info that is listed in the .env should be good

A full example of the .env can be found here

I hope this help

Much Love -Bacon

Bacon-Fixation commented 1 year ago

The other thing to try if everything is correct in the .env, is using the LTS (Long Term Support) version of nodejs (18.14.2) instead of Latest (19.xx.x)

Much Love -Bacon

DraTrav commented 1 year ago

I had a $ in the password for the database password, removing it fixed the "NEXT_PUBLIC_INVITE_URL" error and the bot started up properly!