Verified Commit 53982d3f authored by recette lemonweed's avatar recette lemonweed 🇮🇸

small fix

parent 1840ef1d
...@@ -56,12 +56,12 @@ function assignAliases(id, message, args){ ...@@ -56,12 +56,12 @@ function assignAliases(id, message, args){
for(let alias of inaliases){ for(let alias of inaliases){
let [trigger, command] = alias.split("="); let [trigger, command] = alias.split("=");
if(!(trigger && command)) if(!(trigger && command))
return message.reply("Syntax is:\n```??config --aliases\nsaynice=say nice\nddg=g --ddg```"); return message.reply(`Syntax is:\n\`\`\`${Config.trigger}config --aliases\nsaynice=say nice\nddg=g --ddg\`\`\``);
if(trigger.match(/[^\w]/)) if(trigger.match(/[^\w]/))
return message.reply("Triggers need to be regular characters."); return message.reply("Triggers need to be regular characters.");
trigger = trigger.toLowerCase(); trigger = trigger.toLowerCase();
command = command.replace(/\\(?=-)/, "").split(" "); command = command.replace(/\\(?=-)/, "").split(" ");
if(trigger === module.exports.name) if(trigger === module.exports.name.toLowerCase())
return message.reply("You're not allowed to brick this command."); return message.reply("You're not allowed to brick this command.");
aliases[trigger] = command; aliases[trigger] = command;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment