From 3b086d4c03186e0c6922916df0b52c099134db31 Mon Sep 17 00:00:00 2001 From: Bobloy Date: Thu, 3 May 2018 12:55:22 -0400 Subject: [PATCH] current progress --- chatter/chat.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/chatter/chat.py b/chatter/chat.py index 42a6f6c..2b3d8ea 100644 --- a/chatter/chat.py +++ b/chatter/chat.py @@ -26,7 +26,7 @@ class Chatter: self.chatbot = ChatBot( "ChatterBot", storage_adapter='chatter.chatterbot.storage.SQLStorageAdapter', - database='./database.sqlite3' + database='chatter/database/database.sqlite3' ) self.chatbot.set_trainer(ListTrainer) @@ -91,6 +91,18 @@ class Chatter: await self.config.guild(ctx.guild).days.set(days) await ctx.send("Success") + @chatter.command() + async def backup(self, ctx, backupname): + """ + Backup your training data to a json for later use + :param ctx: + :param backupname: + :return: + """ + + self.chatbot.trainer.export_for_training('./{}.json'.format(backupname)) + + @chatter.command() async def train(self, ctx: commands.Context, channel: discord.TextChannel = None): """