forked from Galactic/galactic-bot
bugfixes
This commit is contained in:
parent
58a8339e35
commit
87e205faca
@ -56,7 +56,7 @@ class CommandHandler extends Observer {
|
|||||||
|| 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.bind(this.logger));
|
||||||
|
|
||||||
const response = await this._parseMessage(invoker, parameters);
|
const response = await this._parseMessage(invoker, parameters);
|
||||||
// There was an error if _parseResponse return value is truthy, i.e. an error message was sent
|
// There was an error if _parseResponse return value is truthy, i.e. an error message was sent
|
||||||
|
@ -122,7 +122,7 @@ class UtilityHook extends Observer {
|
|||||||
|
|
||||||
const _roles = await guild.resolveRoles(setting.roles);
|
const _roles = await guild.resolveRoles(setting.roles);
|
||||||
const roles = _roles.map((r) => r.id);
|
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));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -166,7 +166,7 @@ class MuteInfraction extends Infraction {
|
|||||||
|
|
||||||
if (inf.id === this.id && member) {
|
if (inf.id === this.id && member) {
|
||||||
const reason = `Case ${this.case} resolve`;
|
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) {
|
switch (muteType) {
|
||||||
case 0:
|
case 0:
|
||||||
try {
|
try {
|
||||||
|
Loading…
Reference in New Issue
Block a user