final version

This commit is contained in:
root
2020-03-25 17:03:18 +01:00
parent 6e0a5c704a
commit 8765b38c2f
6 changed files with 40 additions and 22 deletions

View File

@ -1,11 +1,11 @@
module.exports = async (message, args, db) => {
// eslint-disable-next-line no-undef
db.query('SELECT * FROM DSAGeld WHERE userName = ' + '"' + message.author.tag + '"', function(err, row) { //the row is the user's data
db.query('SELECT * FROM dsageld WHERE userName = ' + '"' + message.author.tag + '"', function(err, row) { //the row is the user's data
if(row.length < 1) {
// eslint-disable-next-line no-undef
db.query('INSERT INTO `DSAGeld` (`userName`, `GD`,`ST`, `BH`, `EK`) VALUES (' + '"' + message.author.tag + '"' + ', 0, 0, 0, 0)');
db.query('INSERT INTO `dsageld` (`userName`, `GD`,`ST`, `BH`, `EK`, `LP`) VALUES (' + '"' + message.author.tag + '"' + ', 0, 0, 0, 0, 0)');
message.reply('Dein Eintrag wurde registriert.');
} else if(row) {
} else if(row.length >= 1) {
message.reply('Dein Eintrag existiert bereits.');
}
});