def __init__(self): self.messageDictionary = {} self.cacheLocation = '..' + os.path.sep + 'cache' + os.path.sep + 'alarm.cache' if not utils.cacheExists("alarm.cache"): open(self.cacheLocation,'w') else: with open(self.cacheLocation) as f: for line in f: self.messageDictionary[line.split(",")[0]] = line.split(",")[1] timeUntilAlarm = float(line.split(",")[0]) - time.time() print("Alarm found. Will go off in {0:.2f} minutes".format(timeUntilAlarm/60))
def __init__(self): if utils.cacheExists('twitch.cache'): utils.readCache(self, 'twitch.cache') else: self.m_kappaImage = attachments.Image.file(open('..' + os.path.sep + 'assets' + os.path.sep + 'kappa.png','rb')).url self.m_elegiggleImage = attachments.Image.file(open('..' + os.path.sep + 'assets' + os.path.sep + 'elegiggle.jpg','rb')).url self.m_biblethumpImage = attachments.Image.file(open('..' + os.path.sep + 'assets' + os.path.sep + 'biblethump.png','rb')).url self.m_dansgameImage = attachments.Image.file(open('..' + os.path.sep + 'assets' + os.path.sep + 'dansgame.jpg','rb')).url self.m_kreygasmImage = attachments.Image.file(open('..' + os.path.sep + 'assets' + os.path.sep + 'kreygasm.jpg','rb')).url self.m_fourheadImage = attachments.Image.file(open('..' + os.path.sep + 'assets' + os.path.sep + '4head.png','rb')).url self.m_pogchampImage = attachments.Image.file(open('..' + os.path.sep + 'assets' + os.path.sep + 'pogchamp.jpg','rb')).url self.m_notlikethisImage = attachments.Image.file(open('..' + os.path.sep + 'assets' + os.path.sep + 'notlikethis.jpg','rb')).url utils.cacheEmotes(self)