diff --git a/Chatbot.py b/Chatbot.py index 253e0de..613a74e 100644 --- a/Chatbot.py +++ b/Chatbot.py @@ -190,7 +190,7 @@ class Chatbot(commands.Cog): wordDict = np.load('markov_dict.npy').item() #Iterate through the last x messages from the channel: - messageIterator = channel.history(limit=nrOfMessages, before=None, after=None, reverse=False, around=None) + messageIterator = channel.history(limit=nrOfMessages, before=None, after=None, oldest_first=False, around=None) allMessages = [] for i in range(nrOfMessages): msg = yield from messageIterator.next() @@ -241,7 +241,7 @@ class Chatbot(commands.Cog): """ #Get previous message to respond to - messageIterator = ctx.channel.history(limit=3, before=None, after=None, reverse=False, around=None) + messageIterator = ctx.channel.history(limit=3, before=None, after=None, oldest_first=False, around=None) messageToRespondTo = yield from messageIterator.next() #this will be the !reageer command. skip messageToRespondTo = yield from messageIterator.next() if messageToRespondTo.content.strip()[0] == '!' or messageToRespondTo.author.bot: #another chance @@ -439,4 +439,4 @@ class Chatbot(commands.Cog): message += uitspraken[i] yield from ctx.channel.send(message) except: - pass \ No newline at end of file + pass