map and move interaction handlers
This commit is contained in:
9 files changed
+622
-584
No files matched your search
+19
-2
@@ -46,7 +46,6 @@ module.exports = {
|
||||
],
|
||||
SlashCommand: {
|
||||
/**
|
||||
*
|
||||
* @param {require("../structures/QuarksBot")} client
|
||||
* @param {import("discord.js").Message} message
|
||||
* @param {string[]} args
|
||||
@@ -94,7 +93,7 @@ module.exports = {
|
||||
const opt = new ActionRowBuilder()
|
||||
.addComponents(
|
||||
new ButtonBuilder()
|
||||
.setCustomId(`311-delete`)
|
||||
.setCustomId(`Delete311`)
|
||||
.setLabel("Delete")
|
||||
.setStyle(ButtonStyle.Danger),
|
||||
)
|
||||
@@ -115,4 +114,22 @@ module.exports = {
|
||||
return interaction.send({ content: 'A report has been sent via 311.' });
|
||||
},
|
||||
},
|
||||
Interactions: {
|
||||
|
||||
Delete311: {
|
||||
run: async (client, interaction, GuildDB) => {
|
||||
if (!interaction.member._roles.includes(GuildDB.dispatcherRole)) {
|
||||
return interaction.reply({
|
||||
content: "This button is not for you",
|
||||
flags: (1 << 6)
|
||||
})
|
||||
}
|
||||
const successEmbed = new EmbedBuilder()
|
||||
.setColor(client.config.Colors.Green)
|
||||
.setTitle(`Successfully Deleted 311 Report.`)
|
||||
|
||||
return interaction.update({ embeds: [successEmbed], components: [] });
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user