mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Clean up
This commit is contained in:
+14
-7
@@ -45,15 +45,22 @@ module.exports = class ReportCommand extends Command {
|
||||
const channel = await this.client.channels.fetch(REPORT_CHANNEL_ID);
|
||||
await channel.send({ embed });
|
||||
} catch (err) {
|
||||
for (const owner of this.client.owners) {
|
||||
try {
|
||||
await owner.send({ embed });
|
||||
} catch (err) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
await this.sendOwnerDM(embed);
|
||||
}
|
||||
} else {
|
||||
await this.sendOwnerDM(embed);
|
||||
}
|
||||
return msg.say(`${displayReasons[reason]} sent! Thank you!`);
|
||||
}
|
||||
|
||||
async sendOwnerDM(embed) {
|
||||
for (const owner of this.client.owners) {
|
||||
try {
|
||||
await owner.send({ embed });
|
||||
} catch (err) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user