Parse JSON if its a string

This commit is contained in:
Isaac 2021-05-30 18:09:28 +01:00
parent e027e1ef84
commit bdd172ea1c
No known key found for this signature in database
GPG Key ID: F6812DBC6719B4E3

View File

@ -87,6 +87,8 @@ module.exports = class CommandManager {
const cmd = this.commands.find(cmd => cmd.aliases.includes(cmd_name)); const cmd = this.commands.find(cmd => cmd.aliases.includes(cmd_name));
if (!cmd) return; if (!cmd) return;
if (typeof settings.blacklist === 'string') settings.blacklist = JSON.parse(settings.blacklist);
let is_blacklisted = false; let is_blacklisted = false;
if (settings.blacklist?.includes(message.author.id)) { if (settings.blacklist?.includes(message.author.id)) {
is_blacklisted = true; is_blacklisted = true;