From cc50384f201c95ee8fed4de35e492fe6ef523dbb Mon Sep 17 00:00:00 2001 From: Luke Robles <98352913+lrobles-iterable@users.noreply.github.com> Date: Sun, 18 Sep 2022 21:20:49 -0700 Subject: [PATCH] drop messages to 15k and remove the check for bot commands --- app/cogs/markov.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/app/cogs/markov.py b/app/cogs/markov.py index 9a7bb172..1f77b960 100644 --- a/app/cogs/markov.py +++ b/app/cogs/markov.py @@ -13,12 +13,8 @@ class Markov(commands.Cog): # Get messages from passed in user authors_mesages = [] - for message in await ctx.history(limit=20000).flatten(): - if ( - message.author.id == user.id - and "https" not in message.content - and message.content[0] != "!" - ): + for message in await ctx.history(limit=15000).flatten(): + if message.author.id == user.id and "https" not in message.content: authors_mesages.append(message.content) # Make the model @@ -33,8 +29,7 @@ class Markov(commands.Cog): for i in range(10): dummy.append(str(user_model.make_sentence(max_words=25, tries=100))) await ctx.send( - "Heres a markov chain based on %s's shitposts" - + user.mention + "Heres a markov chain based on %s's shitposts" % user.mention + "\n\n" + " ".join(dummy) )