MirageZoe / better-discord-antispam

Repository for [BDAS]Better Discord AntiSpam
Other
13 stars 13 forks source link

giving the error <ignoredRoles> option is not set up right! Please check it again to be an array in settings. #7

Open typicalninja opened 4 years ago

typicalninja commented 4 years ago

i tried to setup this in a discord js v12 but it would always give the error <ignoredRoles> option is not set up right! Please check it again to be an array in settings.

i will include my bots code here
https://hatebin.com/rlvmiycpon

this is similar to both bots

}})
 client.on('ready', () => {
  // Module Configuration Constructor
   antispam(client, {
        limitUntilWarn: 3, 
        limitUntilMuted: 5, 
        interval: 2000, 
        warningMessage: "if you don't stop from spamming, I'm going to punish you!", 
        muteMessage: "was muted since we don't like too much advertisement type people!", 
        maxDuplicatesWarning: 7,
        maxDuplicatesMute: 10, 
        ignoredRoles: ["owner"], 
        ignoredMembers: ["Axix#9144"],
        mutedRole: "muted", 
        timeMuted: 1000 * 600, 
        logChannel: "antispam-logs" 
      });
});

client.on('message', msg => {
  client.emit('checkMessage', msg);
});

even when I copyed it from the github code the error is same

typicalninja commented 4 years ago

if i delte the options ignored mebers and roles it works

mchccn commented 3 years ago

maybe it can't find those roles?

mchccn commented 3 years ago

anyways this should be an easy fix, make a pull request

mchccn commented 3 years ago

ok i checked the code and you should just use new Array() instead... i dont know why an array literal doesnt work