MySQL

Hi! I have some problem with mySQL (mariaDB) connections. I use slash command in my bot and separated it to different folders (i send it as a picture). I define the mySQL connection in the index.js file and the other command dont see that and its variables, etc. I want the other files to see the SQL connection, bcs it connects to SQL every single time i run a command that uses SQL (i cant do it better way, its the reason why i need help). The bot started crashing bcs of this so many connections so i want to reduce its connection rate. For example i want to connect one time to the SQL and the other files get the connection from there.
No description
2 Replies
d.js toolkit
d.js toolkit12mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - Marked as resolved by OP
Toast
Toast12mo ago
Not d.js related. #other-js-ts / #useful-servers
Want results from more Discord servers?
Add your server