mirror of
https://github.com/pacnpal/markov-discord.git
synced 2025-12-20 11:01:04 -05:00
Delete old data on train
This commit is contained in:
@@ -174,6 +174,9 @@ async function saveGuildMessageHistory(
|
|||||||
return 'No channels configured to learn from. Set some with `/listen add`.';
|
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);
|
const channelIds = channels.map((c) => c.id);
|
||||||
L.debug({ channelIds }, `Training from text channels`);
|
L.debug({ channelIds }, `Training from text channels`);
|
||||||
|
|
||||||
@@ -501,9 +504,6 @@ async function main(): Promise<void> {
|
|||||||
const connection = await Markov.extendConnectionOptions();
|
const connection = await Markov.extendConnectionOptions();
|
||||||
await createConnection(connection);
|
await createConnection(connection);
|
||||||
await client.login(config.token);
|
await client.login(config.token);
|
||||||
|
|
||||||
// Move config if in legacy location
|
|
||||||
// TODO: import legacy DB?
|
|
||||||
}
|
}
|
||||||
|
|
||||||
main();
|
main();
|
||||||
|
|||||||
Reference in New Issue
Block a user