nyx/command/Utilities/report.js

49 lines
1.2 KiB
JavaScript
Raw Normal View History

2022-10-26 12:38:28 +02:00
const { EmbedBuilder } = require("discord.js");
2021-09-06 12:38:25 +02:00
module.exports = {
name: "report",
description: "Report a bug of the bot",
category: "Utilities",
2022-10-26 12:38:28 +02:00
2021-09-06 12:38:25 +02:00
options: [
{
type: 3,
name: "bug",
description: "The bug you want to report",
required: true,
},
],
run: async (client, interaction, args) => {
const bug = args[0];
interaction.followUp({
2021-09-06 12:38:25 +02:00
embeds: [
2022-10-26 12:38:28 +02:00
new EmbedBuilder()
2021-09-06 12:38:25 +02:00
.setTitle("SUCCESS!")
.setDescription(
"You have reported a bug.\nPlease wait for us to solve it"
)
2022-10-26 12:38:28 +02:00
.setFooter({
text: `Made by ${client.author}`,
iconURL: client.user.displayAvatarURL(),
})
2021-09-06 12:38:25 +02:00
.setTimestamp()
.setColor("Green"),
2021-09-06 12:38:25 +02:00
],
});
const ch = client.channels.cache.get(client.config.Report);
2021-09-06 12:38:25 +02:00
ch.send({
embeds: [
2022-10-26 12:38:28 +02:00
new EmbedBuilder()
2021-09-06 12:38:25 +02:00
.setAuthor(
interaction.user.tag,
2021-09-06 12:38:25 +02:00
interaction.user.displayAvatarURL({ dynamic: true })
)
.setTitle("New Bug")
.setDescription(bug)
.setColor("ORANGE")
.setTimestamp(),
],
});
},
};