import time class ChatItem: def __init__(self, event_id, timestamp, user_name, is_own_message, relates_to_event, message): self.event_id = event_id self.timestamp = timestamp self.user_name = user_name self.is_own_message = is_own_message self.relates_to_event = relates_to_event self.message = message self.num_tokens = None def __str__(self): return str("{}: {}".format(self.user_name, self.message)) def getLine(self): return str("{}: {}".format(self.user_name, self.message)) class Event: def __init__(self, timestamp_start, timestamp_stop=None, chance=1): self.timestamp_start = timestamp_start self.timestamp_stop = timestamp_stop self.chance = chance self.executed = 0 def __str__(self): return str("Event starting at timestamp {}".format(self.timestamp_start)) def loop(self): if timestamp_start > time.time(): pass