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