This commit is contained in:
Erik 2022-08-04 21:32:30 +03:00
parent 58a8339e35
commit 87e205faca
Signed by untrusted user: Navy.gif
GPG Key ID: 811EC0CD80E7E5FB
3 changed files with 3 additions and 3 deletions

View File

@ -56,7 +56,7 @@ class CommandHandler extends Observer {
|| nonsilent.length && nonsilent.some((i) => i.args?.missing.includes('SendMessages'))
|| 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.bind(this.logger));
const response = await this._parseMessage(invoker, parameters);
// There was an error if _parseResponse return value is truthy, i.e. an error message was sent

View File

@ -122,7 +122,7 @@ class UtilityHook extends Observer {
const _roles = await guild.resolveRoles(setting.roles);
const roles = _roles.map((r) => r.id);
await member.roles.add(roles, 'Adding autoroles').catch(this.client.logger.error);
await member.roles.add(roles, 'Adding autoroles').catch(this.logger.error.bind(this.logger));
}

View File

@ -166,7 +166,7 @@ class MuteInfraction extends Infraction {
if (inf.id === this.id && member) {
const reason = `Case ${this.case} resolve`;
const roles = [...new Set([...member.roles.cache.map((r) => r.id), ...removedRoles])];
const roles = [...new Set([...member.roles.cache.map((r) => r.id), ...removedRoles || []])];
switch (muteType) {
case 0:
try {