misc fixes
This commit is contained in:
parent
28458ffa2a
commit
02dd19b0af
@ -433,6 +433,7 @@ class ModerationManager {
|
||||
};
|
||||
|
||||
for (const infraction of infractions) {
|
||||
if(!infraction) throw new Error('Undefined infraction');
|
||||
const callBackAt = infraction.timestamp + infraction.duration;
|
||||
if (callBackAt - currentDate <= 0) {
|
||||
await resolve(infraction);
|
||||
|
@ -27,8 +27,8 @@ class EvalCommand extends Command {
|
||||
|
||||
let response = null;
|
||||
try {
|
||||
let evaled = eval(params); //eslint-disable-line no-eval
|
||||
if (evaled instanceof Promise) await evaled;
|
||||
let evaled = await eval(params); //eslint-disable-line no-eval
|
||||
// if (evaled instanceof Promise) await evaled;
|
||||
if (typeof evaled !== 'string') evaled = inspect(evaled);
|
||||
evaled = evaled
|
||||
.replace(new RegExp(this.client.token, 'gu'), '<redacted>')
|
||||
|
@ -106,7 +106,7 @@ module.exports = class AutoModeration extends Observer {
|
||||
const { guild, author, channel, guildWrapper: wrapper } = message;
|
||||
if (!guild || author.bot) return;
|
||||
|
||||
const member = message.member || await guild.members.fetch(author.id).catch();
|
||||
const member = message.member || await guild.members.fetch(author.id).catch(() => null);
|
||||
const settings = await wrapper.settings();
|
||||
const { wordfilter: setting } = settings;
|
||||
const { bypass, ignore, enabled, silent, explicit, fuzzy, regex, whitelist, actions } = setting;
|
||||
|
Loading…
Reference in New Issue
Block a user