This commit is contained in:
Erik 2022-07-25 01:33:08 +03:00
parent 0b23085b71
commit ac0af3f35e
Signed by untrusted user: Navy.gif
GPG Key ID: 811EC0CD80E7E5FB

View File

@ -46,7 +46,7 @@ class CommandHandler extends Observer {
const silent = inhibitors.filter((i) => i.inhibitor.silent); const silent = inhibitors.filter((i) => i.inhibitor.silent);
const nonsilent = inhibitors.filter((i) => !i.inhibitor.silent); const nonsilent = inhibitors.filter((i) => !i.inhibitor.silent);
if (silent.length && silent.some((i) => i.inhibitor.id === 'channelIgnore') if (silent.length && silent.some((i) => i.inhibitor.id === 'channelIgnore')
|| nonsilent.length && nonsilent.some((i) => i.args.missing.includes('SendMessages')) || nonsilent.length && nonsilent.some((i) => i.args?.missing.includes('SendMessages'))
|| silent.length && !nonsilent.length) return; || silent.length && !nonsilent.length) return;
if (inhibitors.length) return this._generateError(invoker, { type: 'inhibitor', ...inhibitors[0] }).catch(this.logger.error); if (inhibitors.length) return this._generateError(invoker, { type: 'inhibitor', ...inhibitors[0] }).catch(this.logger.error);