From 6f53ffb0afbf40bb23d341f571dd06fb9f7987b6 Mon Sep 17 00:00:00 2001 From: Charlie Laabs Date: Thu, 23 Dec 2021 23:01:10 -0600 Subject: [PATCH] Delete old data on train --- src/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/index.ts b/src/index.ts index 2f893e9..a097807 100644 --- a/src/index.ts +++ b/src/index.ts @@ -174,6 +174,9 @@ async function saveGuildMessageHistory( return 'No channels configured to learn from. Set some with `/listen add`.'; } + L.debug('Deleting old data'); + await markov.delete(); + const channelIds = channels.map((c) => c.id); L.debug({ channelIds }, `Training from text channels`); @@ -501,9 +504,6 @@ async function main(): Promise { const connection = await Markov.extendConnectionOptions(); await createConnection(connection); await client.login(config.token); - - // Move config if in legacy location - // TODO: import legacy DB? } main();