From e4ddb3b32c89193b4b7a5f68ab45e508f822a39c Mon Sep 17 00:00:00 2001 From: insert username here Date: Fri, 21 May 2021 20:21:56 -0400 Subject: [PATCH] Update aitrain.py --- aitrain.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/aitrain.py b/aitrain.py index 57ca6f8..79adc14 100644 --- a/aitrain.py +++ b/aitrain.py @@ -31,7 +31,7 @@ async def on_message(message): pass else: writing_function = functools.partial(add_to_train, message.clean_content) - await bot.loop.run_in_executor(None, writing_function) + await client.loop.run_in_executor(None, writing_function) @commands.is_owner() @client.command() @@ -45,9 +45,9 @@ async def train(ctx): async def stopbot(ctx): async with ctx.typing: training_function = functools.partial(textgen.train_from_file, 'train.txt', num_epochs=11) - await bot.loop.run_in_executor(None, training_function) + await client.loop.run_in_executor(None, training_function) await ctx.send("data collection done, I will now log of discord and build an a.i") - await bot.logout() + await client.logout() client.run('BOTTOKEN')