mirror of
https://github.com/arthur-pbty/bot-discord-coins.git
synced 2026-06-15 00:02:43 +02:00
ajout du prefix dans le help
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
const db = require('./database.js');
|
||||
|
||||
module.exports = async function getPrefix(serverId) {
|
||||
const prefix = await new Promise((resolve, reject) => {
|
||||
db.get(`SELECT * FROM config WHERE guildId = ? AND name = ?`, [serverId, 'prefix'], (err, row) => {
|
||||
if (err) reject(err);
|
||||
resolve(row);
|
||||
});
|
||||
});
|
||||
|
||||
return prefix ? prefix.value : '&';
|
||||
}
|
||||
Reference in New Issue
Block a user