diff --git a/Chatbot.py b/Chatbot.py index 9d83b66..3a3f21d 100644 --- a/Chatbot.py +++ b/Chatbot.py @@ -207,7 +207,7 @@ class Chatbot(commands.Cog): 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() + msg = yield from anext(messageIterator) allMessages.append(msg) i = 0 @@ -256,10 +256,10 @@ class Chatbot(commands.Cog): #Get previous message to respond to 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() + messageToRespondTo = yield from anext(messageIterator) #this will be the !reageer command. skip + messageToRespondTo = yield from anext(messageIterator) if messageToRespondTo.content.strip()[0] == '!' or messageToRespondTo.author.bot: #another chance - messageToRespondTo = yield from messageIterator.next() #but it's not a huge problem if he responds to himself + messageToRespondTo = yield from anext(messageIterator) #but it's not a huge problem if he responds to himself if messageToRespondTo.content.strip()[0] == '!': wordsToRespondTo = [] else: