From b3c57d458389ca5c7faf98e116d76b2ec508d601 Mon Sep 17 00:00:00 2001 From: Julian Date: Sun, 6 Jun 2021 18:08:24 +0200 Subject: [PATCH] fix update for 0.4.0 --- update/0.4.0.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/update/0.4.0.js b/update/0.4.0.js index 4098993ce..799caf997 100644 --- a/update/0.4.0.js +++ b/update/0.4.0.js @@ -6,13 +6,14 @@ const GuildConfig = require('../src/GuildConfig'); async function update() { console.log('Starting update to v0.4.0'); - console.log('Updating guild log channels') + console.log('Updating guild log channels'); await database.waitForConnection(); + GuildConfig.init(database, null); const guilds = await database.queryAll('SELECT id, config FROM guilds'); let updated = 0; for (const guild of guilds) { - const gc = new GuildConfig(guild.id, guild.config); + const gc = new GuildConfig(guild.id, JSON.parse(guild.config)); if (gc.logChannel) { gc.messageLogChannel = gc.logChannel; await gc.save();