obschatbot/utils/MessageQueue.py

13 lines
229 B
Python
Raw Permalink Normal View History

class MessageQueue:
messages = []
def append(self, message):
self.messages.append(message)
def shift(self):
return self.messages.pop(0)
def pending(self):
return len(self.messages) > 0