Fixed faulty mysql login data for linux
changed USER to USERNAME in .env
This commit is contained in:
@ -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)
|
||||
}
|
||||
});
|
||||
|
@ -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" }
|
||||
|
Reference in New Issue
Block a user