#143 : Panels now edit after using dropdown

From now on, all panels will update/edit themselfs after a dropdown has been used. This will reset the dropdown selection in the user client which results in a smoother user experience.
This commit is contained in:
DJj123dj
2025-03-29 13:16:27 +01:00
parent 51bfb1a367
commit 6d5bdc5dd4
6 changed files with 33 additions and 15 deletions
+5 -2
View File
@@ -64,9 +64,12 @@ export const registerCommandResponders = async () => {
await instance.reply(await opendiscord.builders.messages.getSafe("opendiscord:panel-ready").build(source,{guild,channel,user,panel}))
const panelMessage = await instance.channel.send((await opendiscord.builders.messages.getSafe("opendiscord:panel").build(source,{guild,channel,user,panel})).message)
//add panel to database on auto-update
//add panel to database (this way, the bot knows where all panels are located)
const globalDatabase = opendiscord.databases.get("opendiscord:global")
await globalDatabase.set("opendiscord:panel-message",panelMessage.channel.id+"_"+panelMessage.id,panel.id.value)
//add panel to database for auto-update
if (instance.options.getBoolean("auto-update",false)){
const globalDatabase = opendiscord.databases.get("opendiscord:global")
await globalDatabase.set("opendiscord:panel-update",panelMessage.channel.id+"_"+panelMessage.id,panel.id.value)
}
}),