Guild settings

This commit is contained in:
Isaac
2021-05-21 19:58:41 +01:00
parent be462cea1d
commit c70c9b2494
9 changed files with 18 additions and 28 deletions

View File

@@ -73,11 +73,11 @@ module.exports = class CommandManager {
const i18n = this.client.i18n.getLocale(settings.locale);
let is_blacklisted = false;
if (settings.blacklist.includes(message.author.id)) {
if (settings.blacklist?.includes(message.author.id)) {
is_blacklisted = true;
this.client.log.info(`Ignoring blacklisted member ${message.author.tag}`);
} else {
settings.blacklist.forEach(element => {
settings.blacklist?.forEach(element => {
if (message.guild.roles.cache.has(element) && message.member.roles.cache.has(element)) {
is_blacklisted = true;
this.client.log.info(`Ignoring member ${message.author.tag} with blacklisted role`);