This commit is contained in:
Noah committed 2021-10-27 19:20:10 -05:00
1 parent 3df591ec52
commit 78dea91e1d
1 file changed
+18 -18
+18 -18
View File
@@ -15,16 +15,17 @@ module.exports = new Command({
description: cmdconfig.SuggestCommandDesc, description: cmdconfig.SuggestCommandDesc,
slashCommandOptions: [ slashCommandOptions: [
{ {
name: "suggestion", name: "suggestion",
description: "Create a Suggestion", description: "Create a Suggestion",
type: "STRING", type: "STRING",
}, },
], ],
permission: "SEND_MESSAGES", permission: "SEND_MESSAGES",
async run(interaction) { async run(interaction) {
const suggestChannel = client.channels.cache.get(
const suggestChannel = client.channels.cache.get(supportbot.SuggestionChannel); supportbot.SuggestionChannel
);
const NoChannel = new Discord.MessageEmbed() const NoChannel = new Discord.MessageEmbed()
.setTitle("Missing Channel!") .setTitle("Missing Channel!")
@@ -33,26 +34,25 @@ module.exports = new Command({
if (!suggestChannel) return interaction.reply({ embeds: [NoChannel] }); if (!suggestChannel) return interaction.reply({ embeds: [NoChannel] });
let suggestion = let suggestion = interaction.options.getString("suggestion");
interaction.options.getString("suggestion");
const SuggestEmbed = new Discord.MessageEmbed() const SuggestEmbed = new Discord.MessageEmbed()
.addField("Suggestion", suggestion, true) .addField("Suggestion", suggestion, true)
.addField("From", `<@${interaction.user.id}>`) .addField("From", `<@${interaction.user.id}>`)
.setThumbnail(interaction.user.displayAvatarURL()) .setThumbnail(interaction.user.displayAvatarURL())
.setFooter(supportbot.EmbedFooter, interaction.user.displayAvatarURL()) .setFooter(supportbot.EmbedFooter, interaction.user.displayAvatarURL())
.setColor(supportbot.EmbedColour); .setColor(supportbot.EmbedColour);
suggestChannel.reply({ embeds: [SuggestEmbed ]}) suggestChannel.reply({ embeds: [SuggestEmbed] });
const Submitted = new Discord.MessageEmbed() const Submitted = new Discord.MessageEmbed()
.setTitle("Suggestion Submitted!") .setTitle("Suggestion Submitted!")
.setDescription(`:white_check_mark: You have successfully submitted a suggestion.`) .setDescription(
`:white_check_mark: You have successfully submitted a suggestion.`
)
.addField("Sent to:", `<#${suggestChannel.id}>`) .addField("Sent to:", `<#${suggestChannel.id}>`)
.setColor(supportbot.WarningColour); .setColor(supportbot.WarningColour);
return interaction.reply({ embeds: [Submitted] }) return interaction.reply({ embeds: [Submitted] });
}, },
}); });