diff --git a/src/events/clientEvents/msg.js b/src/events/clientEvents/msg.js index d7790c90..a11eab69 100644 --- a/src/events/clientEvents/msg.js +++ b/src/events/clientEvents/msg.js @@ -2,8 +2,8 @@ module.exports = { name: "message", async execute(client, msg, Discord) { if (msg.author.bot || !msg.guild) return; - if (!client.global.db.guilds[msg.guild.id]) return; - let prefix = client.global.db.guilds[msg.guild.id].prefix; + if (!client.global.db.guilds[msg.guild.id]) client.funcs.checkDB(client); + let prefix = client.global.db.guilds[msg.guild.id].prefix || client.config.prefix; const args = msg.content.slice(prefix.length).split(" "); if (client.config.devMode) prefix = client.config.devPrefix; if (msg.mentions.users.first()) {