Removed deprecated panel entries in database
This commit is contained in:
@@ -29,8 +29,6 @@ export interface ODDatabaseManagerIdMappings extends api.ODDatabaseManagerIdCons
|
||||
* It's used to generate typescript declarations for this class.
|
||||
*/
|
||||
export interface ODGlobalDatabaseIdMappings extends api.ODDatabaseIdConstraint {
|
||||
"opendiscord:panel-message":string,
|
||||
"opendiscord:panel-update":string,
|
||||
"opendiscord:option-suffix-counter":number,
|
||||
"opendiscord:option-suffix-history":string[],
|
||||
"opendiscord:last-version":string
|
||||
|
||||
@@ -372,7 +372,7 @@ export const migrations = [
|
||||
const message = await opendiscord.client.fetchChannelMessage(channelId,messageId)
|
||||
const autoUpdate = typeof (await globalDatabase.get("opendiscord:panel-update",panelMessage.key)) == "string"
|
||||
//if message still exists
|
||||
if (message) migratedPanelStates.push({channelId,messageId,panelId:panelMessage.value,autoUpdate})
|
||||
if (message) migratedPanelStates.push({channelId,messageId,panelId:panelMessage.value as string,autoUpdate})
|
||||
|
||||
await globalDatabase.delete("opendiscord:panel-message",panelMessage.key)
|
||||
await globalDatabase.delete("opendiscord:panel-update",panelMessage.key)
|
||||
|
||||
Reference in New Issue
Block a user