Skip to content

Commit 9477293

Browse files
committed
Improve the select menu reset method upon selection
1 parent d180dfc commit 9477293

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

commands/Tickets/panel.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,8 @@ module.exports = {
129129
// Send the panel embed and action row
130130
await interaction.channel
131131
.send({ embeds: [panelEmbed], components: [actionRowsMenus] })
132-
.then(async function (message) {
132+
.then(async function () {
133133
await mainDB.set(`selectMenuOptions`, options);
134-
await mainDB.set(`ticketPanelMsgID`, message.id);
135134
});
136135
logMessage(
137136
`${interaction.user.tag} sent the ticket panel in the channel #${interaction.channel.name}`,

events/interactionCreate.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,9 @@ module.exports = {
136136
} else if (interaction.isStringSelectMenu()) {
137137
if (interaction.customId === "categoryMenu") {
138138
// Reset the select menu upon selection
139-
const ticketPanelMsgID = await mainDB.get("ticketPanelMsgID");
140139
const selectMenuOptions = await mainDB.get("selectMenuOptions");
141140
await interaction.channel.messages
142-
.fetch(ticketPanelMsgID)
141+
.fetch(interaction.message.id)
143142
.then(async (message) => {
144143
const selectMenu = new StringSelectMenuBuilder()
145144
.setCustomId("categoryMenu")

0 commit comments

Comments
 (0)