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.
17 lines
773 B
TypeScript
17 lines
773 B
TypeScript
import {opendiscord, api, utilities} from "../../index"
|
|
|
|
export const migrations = [
|
|
//MIGRATE TO v4.0.0
|
|
new utilities.ODVersionMigration(api.ODVersion.fromString("opendiscord:version","v4.0.0"),async () => {},async () => {}),
|
|
|
|
//MIGRATE TO v4.0.1
|
|
new utilities.ODVersionMigration(api.ODVersion.fromString("opendiscord:version","v4.0.1"),async () => {},async () => {
|
|
//AFTER INIT MIGRATION
|
|
|
|
//add opendiscord:panel-message properties for all existing panels.
|
|
const globalDatabase = opendiscord.databases.get("opendiscord:global")
|
|
for (const panel of (await globalDatabase.getCategory("opendiscord:panel-update") ?? [])){
|
|
globalDatabase.set("opendiscord:panel-message",panel.key,panel.value)
|
|
}
|
|
})
|
|
] |