Fixed commands in DMs
This commit is contained in:
parent
719fdf5871
commit
bc59550625
1 changed files with 1 additions and 1 deletions
|
@ -25,7 +25,7 @@ module.exports = async (message) => {
|
|||
|
||||
// prefix can be a mention or a set of special characters
|
||||
const guildDB = message.channel.guild ? await database.guilds.findOne({ id: message.channel.guild.id }).lean().exec() : null;
|
||||
const prefix = message.content.startsWith(message.channel.guild.members.get(client.user.id).mention) ? `${message.channel.guild.members.get(client.user.id).mention} ` : (message.channel.guild ? guildDB.prefix : "");
|
||||
const prefix = message.channel.guild ? (message.content.startsWith(message.channel.guild.members.get(client.user.id).mention) ? `${message.channel.guild.members.get(client.user.id).mention} ` : guildDB.prefix) : "";
|
||||
|
||||
// ignore other stuff
|
||||
if (message.content.startsWith(prefix) === false) return;
|
||||
|
|
Loading…
Reference in a new issue