better error handling
This commit is contained in:
parent
d845de1e02
commit
4327fd983b
@ -18,7 +18,8 @@ module.exports = (bot, trigger, lib) => {
|
||||
tmp.pop();
|
||||
var modes;
|
||||
if(user.toLowerCase() != bot.me.nick.toLowerCase()) {
|
||||
if(modes = processModes(tmp.join(''))) {
|
||||
var modes = processModes(tmp.join(''));
|
||||
if(modes.length) {
|
||||
if(checkModes(modes, allowedModes)) {
|
||||
var modesToApply = [], currentPrefix, queuedModes;
|
||||
while(modes.length) {
|
||||
@ -37,7 +38,7 @@ module.exports = (bot, trigger, lib) => {
|
||||
e.reply('Error! Allowed modes are: ' + allowedModes.join(','));
|
||||
}
|
||||
else
|
||||
e.reply('Syntax Error!');
|
||||
e.reply('No modes specified!');
|
||||
}
|
||||
else
|
||||
e.reply('f0ck you hard');
|
||||
|
Loading…
Reference in New Issue
Block a user