commit
This commit is contained in:
parent
9965a9ba6d
commit
51e6f97c5f
1 changed files with 42 additions and 39 deletions
5
app.js
5
app.js
|
@ -30,6 +30,7 @@ function addUserToDb(id, user) {
|
|||
console.error('Erreur dans la requête : ', error);
|
||||
} else {
|
||||
console.log('Les résultats de la requête : ', results);
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -198,13 +199,14 @@ client.on('interactionCreate', async interaction => {
|
|||
});
|
||||
|
||||
if (!(users.includes(interaction.member.user.id))) {
|
||||
addUserToDb(interaction.member.user.id, interaction.member.user.username)
|
||||
addUserToDb(interaction.member.user.id, interaction.member.user.username);
|
||||
addToLogs('[Discord] Added user to the database : ' + interaction.member.user.username);
|
||||
console.log('[Discord] Added user to the database : ' + interaction.member.user.username);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
setTimeout(() => {
|
||||
connection.query('SELECT quota FROM users WHERE userid = '+ interaction.member.user.id, (error, results, fields) => {
|
||||
if (error) {
|
||||
console.error('Erreur dans la requête : ', error);
|
||||
|
@ -244,6 +246,7 @@ client.on('interactionCreate', async interaction => {
|
|||
}
|
||||
}
|
||||
});
|
||||
}, 100);
|
||||
}
|
||||
|
||||
else if (interaction.commandName === 'info') {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue