Add guildName et userName (pour facilité la lecture de la bd)

This commit is contained in:
*x1
2024-06-18 08:28:06 +02:00
parent 3194771634
commit ba95973f1b
3 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -6,7 +6,7 @@ module.exports = {
async execute(guild) {
db.run(`INSERT OR IGNORE INTO config (guildId, name, value) VALUES (?, ?, ?)`, [guild.id, 'prefix', '&']);
guild.members.cache.forEach(member => {
db.run(`INSERT OR IGNORE INTO users (guildId, userId) VALUES (?, ?)`, [guild.id, member.id]);
db.run(`INSERT OR IGNORE INTO users (guildId, guildName, userId, userName) VALUES (?, ?)`, [guild.id, guild.name, member.id, member.name]);
});
},
};