mirror of
https://github.com/arthur-pbty/gestion.git
synced 2026-06-03 23:36:35 +02:00
add prefix changeble with serveur and main prefix configurable
This commit is contained in:
@@ -56,8 +56,11 @@ module.exports = (client) => {
|
||||
const guildId = message.guild.id;
|
||||
const botInfo = GestionDb.get(botId);
|
||||
const permissions = botInfo.permissions;
|
||||
//const prefix = botTokens.coins[botId].prefix;
|
||||
const prefix = '+';
|
||||
const defaultprefix = "+";
|
||||
let mainPrefix = await GestionDb.get(`${botId}.prefix`);
|
||||
let serverPrefix = await GestionDb.get(`${botId}.${guildId}.prefix`);
|
||||
const prefix = serverPrefix !== undefined ? serverPrefix : mainPrefix !== undefined ? mainPrefix : defaultprefix;
|
||||
|
||||
if (!message.content.startsWith(prefix) || message.author.bot) return;
|
||||
|
||||
const args = message.content.slice(prefix.length).trim().split(/ +/);
|
||||
|
||||
Reference in New Issue
Block a user