Change how No Permissions error is sent, add logging.
This commit is contained in:
parent
8f2c8493bd
commit
f54d22beb7
2 changed files with 3 additions and 17 deletions
|
@ -47,22 +47,8 @@ module.exports = {
|
||||||
|
|
||||||
return returnMessage;
|
return returnMessage;
|
||||||
} else {
|
} else {
|
||||||
return {
|
console.error(`[SYSTEM] [ERR] User ${user.username} tried to reload ${args[0]}, but doesn't have permission!`);
|
||||||
embeds: [{
|
return client.generateErrorMessage("You don't have permission to run this command.", user.displayAvatarURL());
|
||||||
title: '<:AnitroxDenied:809651936642203668> **403 Forbidden**',
|
|
||||||
color: 13632027,
|
|
||||||
footer: {
|
|
||||||
icon_url: user.displayAvatarURL(),
|
|
||||||
text: config.footerTxt
|
|
||||||
},
|
|
||||||
fields: [
|
|
||||||
{
|
|
||||||
name: '**What Happened?**',
|
|
||||||
value: "You don't have the appropriate permissions to run this command!"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}]
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -43,7 +43,7 @@ module.exports = {
|
||||||
} catch (e) { console.error(e); }
|
} catch (e) { console.error(e); }
|
||||||
} else {
|
} else {
|
||||||
console.error('[SYSTEM] [ERR] User ' + user.username + " tried to restart the bot, but doesn't have permission! If this was you, Check your config.json");
|
console.error('[SYSTEM] [ERR] User ' + user.username + " tried to restart the bot, but doesn't have permission! If this was you, Check your config.json");
|
||||||
return client.generateErrorMessage('Only the bot owner can restart the bot! Stop.', user.displayAvatarURL());
|
await channel.send(client.generateErrorMessage('You do not have permission to run this command.', user.displayAvatarURL()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Reference in a new issue