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,8 +1,15 @@
// eslint-disable-next-line no-unused-vars
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
message.reply('du hast: ' + row[0].GD + ' GD, ' + row[0].ST + ' ST, ' + row[0].BH + ' BH, ' + row[0].EK + ' EK.' );
db.query('SELECT * FROM dsageld WHERE userName = ' + '"' + message.author.tag + '"', function(err, row) { //the row is the user's data
if(row && err) {
message.reply('Es gab einen Fehler.');
}
if(row.length < 1) { //if the user is not in the database
message.reply('Es existiert kein Eintrag für dich füge ihn mit !create hinzu.');
} else if(row.length >= 1){
message.reply('du hast: ' + row[0].GD + ' GD, ' + row[0].ST + ' ST, ' + row[0].BH + ' BH, ' + row[0].EK + ' EK.' + row[0].LP + ' LeP.');
}
}
);
};