Fix mention not working as prefix
This commit is contained in:
parent
e56d8e768c
commit
39ca3ee322
1 changed files with 1 additions and 1 deletions
|
@ -8,12 +8,12 @@ module.exports = function(client, owners, message, globalPrefix){
|
|||
prefix = serverPrefix;
|
||||
}
|
||||
|
||||
if (!message.guild || message.author.bot || !message.content.startsWith(prefix)) return;
|
||||
|
||||
if(message.content.startsWith(`<@${client.user.id}>`)){
|
||||
let regex = new RegExp("(<@" + client.user.id + ">) *")
|
||||
message.content = message.content.replace(regex, prefix);
|
||||
}
|
||||
if (!message.guild || message.author.bot || !message.content.startsWith(prefix)) return;
|
||||
let args = message.content.slice(prefix.length).split(" ")
|
||||
if(args[0] !== "fm" && args[0].startsWith("fm")){
|
||||
let firstElement = args[0];
|
||||
|
|
Loading…
Add table
Reference in a new issue