Fixed faulty mysql login data for linux

changed USER to USERNAME in .env
This commit is contained in:
steev
2022-12-21 10:29:43 +01:00
parent c81c9b5e52
commit f002da6439
3 changed files with 11 additions and 9 deletions

View File

@ -1,16 +1,18 @@
const sql = require('mysql');
const Database = async (db) => {
const server = sql.createConnection({
host : db.HOST,
user : db.USER,
password : db.PASSWORD,
user : db.USERNAME,
password : db.PASSWORD
,
database : db.DATABASE
});
server.connect(function(err) {
if (err) {
console.error('error connecting: ' + err.stack);
console.error('error connecting Database in Data.Database: ' + err.stack);
process.exit(1)
}
});

View File

@ -5,7 +5,7 @@ const discord = require("discord.js")
@param {string} roleName name of role to assign a user
@param {discord.Client} bot the bots instance
*/
const AddRole = async (userVal, roleName, bot, reason) => {
const AddRole = async (userVal, roleName, bot) => {
// error handling
if (userVal == undefined) { throw "error user was undefined" }