forked from Galactic/galactic-bot
yeah lets get rid of response.response
This commit is contained in:
parent
fdb31aa0f4
commit
269bd70070
@ -80,7 +80,6 @@ class ModerationManager {
|
||||
const silent = Boolean(message.guild._settings.silent || message.arguments.silent);
|
||||
const force = message.arguments?.force?.value || false;
|
||||
|
||||
const original = null;
|
||||
const responses = [];
|
||||
for (const target of targets) {
|
||||
const response = await this._handleTarget(Infraction, target, {
|
||||
@ -199,10 +198,7 @@ class ModerationManager {
|
||||
let verification = infraction.verify(info.executor, target, info.channel);
|
||||
if(verification instanceof Promise) verification = await verification;
|
||||
|
||||
if(verification.error) return {
|
||||
error: true,
|
||||
response: verification
|
||||
};
|
||||
if(verification.error) return verification;
|
||||
|
||||
if(infraction.targetType === 'USER') {
|
||||
const userTarget = target instanceof User ? target : target.user;
|
||||
@ -280,7 +276,7 @@ class ModerationManager {
|
||||
}
|
||||
}
|
||||
|
||||
if(response.error) return response.response;
|
||||
if(response.error) return response;
|
||||
|
||||
response.infraction.totalPoints = await response.infraction.target.totalPoints(guild, { points, expiration, timestamp: response.infraction.timestamp });
|
||||
return response.infraction.execute();
|
||||
|
Loading…
Reference in New Issue
Block a user