From c61a29f48afa50244ecea9cca3194f20965338ae Mon Sep 17 00:00:00 2001 From: Matthew R Date: Sun, 27 Sep 2020 18:14:00 -0400 Subject: [PATCH] update neural network --- src/commands/train.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/commands/train.ts b/src/commands/train.ts index 7837840..3d72de7 100644 --- a/src/commands/train.ts +++ b/src/commands/train.ts @@ -29,7 +29,10 @@ export default class Train extends Command { await this.client.db.NNTrainingData.updateOne({ name: 'tc' }, { $addToSet: { data: { input: this.client.util.encode(msg.content), output: { res: Number(args[2]) } } } }); await message.delete(); - return this.success(message.channel, 'Neural Network trained successfully.'); + const done = await this.success(message.channel, 'Neural Network trained successfully.'); + return setTimeout(async () => { + await done.delete(); + }, 3000); } catch (err) { return this.client.util.handleError(err, message, this); }