mirror of
https://github.com/Art-Portal/April.git
synced 2024-12-26 03:14:17 +01:00
22 lines
601 B
JavaScript
22 lines
601 B
JavaScript
import { EmbedBuilder } from "discord.js";
|
|
import { inspect } from "util";
|
|
|
|
const errorEmbed = new EmbedBuilder().setColor("Red");
|
|
|
|
export default {
|
|
name: "error",
|
|
async execute() {
|
|
errorEmbed
|
|
.setTitle("Discord API Error")
|
|
.setURL(
|
|
"https://discordjs.guide/popular-topics/errors.html#api-errors",
|
|
)
|
|
.setDescription(
|
|
`\`\`\`${inspect(err, { depth: 0 }).slice(0, 1000)}\`\`\``,
|
|
)
|
|
.setTimestamp();
|
|
|
|
return client.errorCatcherWebhook.send({ embeds: [errorEmbed] });
|
|
},
|
|
};
|