forked from Galactic/galactic-bot
misc fixes
This commit is contained in:
parent
73cae5441c
commit
c70b41457a
@ -438,7 +438,7 @@ class ModerationManager {
|
||||
continue;
|
||||
}
|
||||
|
||||
this.logger.debug(`Going to resolve infraction in: ${callBackAt - currentDate} ms`);
|
||||
this.logger.debug(`Going to resolve infraction in: ${Math.floor((callBackAt - currentDate) / 1000)} s`);
|
||||
|
||||
this.callbacks.set(infraction.id, {
|
||||
timeout: setTimeout(async () => {
|
||||
|
@ -561,8 +561,8 @@ module.exports = class AutoModeration extends Observer {
|
||||
if (!match) return;
|
||||
|
||||
const result = await wrapper.checkInvite(match.groups.code);
|
||||
const invite = await this.client.fetchInvite(match.groups.code);
|
||||
if (whitelist.includes(invite.guild.id)) return;
|
||||
const invite = await this.client.fetchInvite(match.groups.code).catch(() => null);
|
||||
if (whitelist.includes(invite?.guild?.id)) return;
|
||||
|
||||
if (!result) { // Doesn't resolve to the origin server
|
||||
|
||||
|
@ -76,9 +76,9 @@ class CommandHandler extends Observer {
|
||||
emoji: 'failure', ephemeral: true
|
||||
});
|
||||
|
||||
await invoker.deferReply();
|
||||
const inhibitors = await this._handleInhibitors(invoker);
|
||||
if(inhibitors.length) return this._generateError(invoker, { type: 'inhibitor', ...inhibitors[0] });
|
||||
if (inhibitors.length) return this._generateError(invoker, { type: 'inhibitor', ...inhibitors[0] });
|
||||
await invoker.deferReply();
|
||||
|
||||
const response = await this._parseInteraction(interaction, command);
|
||||
if (await this._parseResponse(invoker, response)) return;
|
||||
|
Loading…
Reference in New Issue
Block a user